bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Documentation issue


From: Peter Marshall
Subject: Documentation issue
Date: Thu, 5 Sep 2019 16:49:58 -0400

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]