https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217613
Bug ID: 217613 Summary: FreeBSD make -- local variable $(.PREFIX) does not strip preceding directory components Product: Base System Version: 11.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: e...@nordstroem.no Created attachment 180603 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=180603&action=edit BSDmakefile From the make(1) man page: Local variables are all built in and their values vary magically from target to target. It is not currently possible to define new local variables. The seven local variables are as follows: [...] .PREFIX The file prefix of the target, containing only the file portion, no suffix or preceding directory components; also known as ‘*’. The suffix must be one of the known suffixes declared with .SUFFIXES or it will not be recognized. However, it seems that preceding directory components are not actually stripped. $ mkdir -p ~/tmp/hello $ cd ~/tmp/hello/ Place the attached BSDmakefile in this directory and after you've done that, create the hello world program in src/main.c. $ mkdir src $ cat > src/hello.c <<EOF #include <stdio.h> int main() { printf("Hello, World!"); } EOF $ make make: don't know how to make src/build/hello.c. Stop make: stopped in /usr/home/erikn/tmp/hello As you can see from the output above when I attempt to run make, the prefix was not stripped of preceding directory components. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"