Hello, I think I found a documentation issue in the GNU make manual. Section 5.3 of the GNU make manual *implies *that $(@D) and $(@F) expand to the prerequisite path and file respectively, but section 10.5.3 says they expand according to the filename of the target. https://www.gnu.org/software/make/manual/make.html#Execution See the following excerpts from the manual: 5.3 Recipe Execution
foo : bar/lose cd $(@D) && gobble $(@F) > ../$@ *10.5.3 Automatic Variables* *‘$(@D)’* The directory part of the file name of the target, with the trailing slash removed. If the value of ‘$@’ is dir/foo.o then ‘$(@D)’ is dir. This value is . if ‘$@’ does not contain a slash. *‘**$(@F)**’* The file-within-directory part of the file name of the target. If the value of ‘$@’ is dir/foo.o then ‘$(@F)’ is foo.o. ‘$(@F)’ is equivalent to ‘$(notdir $@)’. Thanks, Peter
_______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make