Non-POSIX compliant pmake with secondary expansion?

Harti Brandt hartmut.brandt at dlr.de
Mon Jul 5 19:34:35 UTC 2010


Hi Garret,

On Wed, 30 Jun 2010, Garrett Cooper wrote:

GC>    I currently set:
GC>
GC>.POSIX=

I think this should be actually a target (the first one in the Makefile):

.POSIX:

GC>
GC>    In a Makefile thinking that it would enable only POSIX
GC>functionality, and was fidgeting around with the Makefile trying to
GC>get it to work. In short, I used secondary expansion, it worked, then
GC>compared the output from gmake and it failed (because they have the
GC>.SECONDEXPANSION keyword). POSIX doesn't mention secondary expansion,
GC>so obviously it's not a POSIX feature.
GC>    So I was wondering if secondary expansion is enabled by default
GC>with .POSIX instead of being disabled like it should on pmake?

I remember that .POSIX does almost nothing (it switches of 
auto-makefile-dependency processing, set the %POSIX variable and 
disables banners for parallel makes). This is because of the way 
processing works in our make. I had Posix-compatibility of make on my list 
for some time but dropped it. This would require large rewrites of the 
code. Even the parser would need to be different because there are subtle 
differences.

harti


GC>Thanks,
GC>-Garrett
GC>
GC>$ cat test_Makefile
GC>.POSIX=
GC>
GC>TARGETS=
GC>
GC>all: $$(TARGETS)
GC>
GC>TARGETS+=	idontexist
GC>
GC>idontexist:
GC>	@echo $@
GC>$ make -f test_Makefile all
GC>idontexist
GC>$ gmake -f test_Makefile
GC>gmake: *** No rule to make target `$(TARGETS)', needed by `all'.  Stop.
GC>$ uname -a
GC>FreeBSD bayonetta.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r206173M:
GC>Mon Apr 26 22:45:06 PDT 2010
GC>root at bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA.ata  amd64
GC>_______________________________________________
GC>freebsd-hackers at freebsd.org mailing list
GC>http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
GC>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
GC>
GC>


More information about the freebsd-hackers mailing list