I am trying to understand a Makefile, but I don't understand the recipe line with the comment.
...
...
sample.a:
cd ../$(basename $(notdir $@)) && make ##i don't understand this
...
...
I'm still a newbie at this. Can you give me a very simple explanation about:
$(basename $(notdir $@))
If you break it down:
$(notdir $@)
takes away the path from the file name leaving just the file name (so /x/y/foo.a
becomes foo.a
)
$(basename ...)
takes away the extension (so foo.a
becomes foo
)
There's a decent reference here: http://www.gnu.org/software/make/manual/html_node/File-Name-Functions.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With