-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
POSIX defines $(@D)
thusly:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html#tag_20_76_13_08
Each of the internal macros has an alternative form. When an uppercase 'D' or 'F' is appended to any of the macros, the meaning shall be changed to the directory part for 'D' and filename part for 'F'. The directory part is the path prefix of the file without a trailing ; for the current directory, the directory part is '.'. When the$?
macro contains more than one prerequisite filename, the$(?D)
and$(?F)
(or${?D}
and${?F}
) macros expand to a list of directory name parts and filename parts respectively.
example Makefile:
all: file dir/file
file:
@echo $@ : $(@D) : $(@F)
dir/file:
@echo $@ : $(@D) : $(@F)
GNU make works:
$ make
file : . : file
dir/file : dir : file
but dmake handles $(@D)
wrong in both cases:
file : : file
dir/file : dir/ : file
- it should have emitted
.
in the first case - it should have omitted the trailing
/
in the second case
Metadata
Metadata
Assignees
Labels
No labels