I have a variable like aaa/bbb/ccc/xxx.html and I need to create the path in the makefile. So I need to trim the location of the file from given variable and create the path using mkdir -p aaa/bbb/ccc. How can I get the location (aaa/bbb/ccc) from the variable (aaa/bbb/ccc/xxx.html) in the makefile?
I have a variable like aaa/bbb/ccc/xxx.html and I need to create the path in
Share
GNU make’s
dirfunction extracts the directory part of a path:generates the directory of the rule’s target, for example. Compare
notdirand the GNU make manual.