Skip to content

Commit

Permalink
Previous revision didn't fix all cases. For example,
Browse files Browse the repository at this point in the history
testing for variables that are always defined (e.g.,
"make -V CC") would still print a false warning.  Fix
this by only passing a submake the MAKEOBJDIRPREFIX=*
argument if it was present.  As a result, we loose
the check for -DMAKEOBJDIRPREFIX, or an esoteric
"MAKEOBJDIRPREFIX = foo" (with embedded spaces), but
these are unorthodox enough to not care about them.

The make(1) bug mentioned in the previous revision
was just fixed in make/main.c,v 1.109.
  • Loading branch information
ru authored and ru committed Dec 16, 2004
1 parent de05db1 commit 4b04260
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ TGTS+= ${BITGTS}

PATH= /sbin:/bin:/usr/sbin:/usr/bin
MAKEOBJDIRPREFIX?= /usr/obj
_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} ${.MAKEFLAGS} \
-f /dev/null -V MAKEOBJDIRPREFIX dummy
_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} \
${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} \
-f /dev/null -V MAKEOBJDIRPREFIX dummy
.if !empty(_MAKEOBJDIRPREFIX)
.error MAKEOBJDIRPREFIX can only be set in environment, not as a global\
(in /etc/make.conf) or command-line variable.
Expand Down

0 comments on commit 4b04260

Please sign in to comment.