Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Mar 2017 06:31:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 217613] FreeBSD make -- local variable $(.PREFIX) does not strip preceding directory components
Message-ID:  <bug-217613-8-ZMHTjN4HNd@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-217613-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-217613-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217613

--- Comment #6 from Simon J. Gerraty <sjg@FreeBSD.org> ---
The handling of .PREFIX et al, is rather contorted.
Despite what the man page says, the trimming of dirs etc does not apply to
those explicitly specified.

For example :

% cat tmf
.SUFFIXES: .ext .c

.PATH: /tmp

target.ext: $*.c
        @echo '@=$@ *=$* >=$>'
        @echo '.TARGET=${.TARGET} .PREFIX=${.PREFIX} .ALLSRC=${.ALLSRC}'

all: target.ext
%
% mkdir obj
% touch target.ext
% touch target.c
% bmake -r -f tmf
@=/tmp/target.ext *=target >=/tmp/target.c
.TARGET=/tmp/target.ext .PREFIX=target .ALLSRC=/tmp/target.c
%

both target.c and target.ext were found via .PATH
and we can see that .PREFIX (*) was set to the basename without extension as
documented.  But if you make that an explicit /tmp/target.ext:
It does not.

-- 
You are receiving this mail because:
You are the assignee for the bug.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-217613-8-ZMHTjN4HNd>