Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.bin/make

In article <krbu04$2j1$>,
Christos Zoulas <> wrote:
>>Module Name:  src
>>Committed By: sjg
>>Date:         Sat Jul  6 18:19:17 UTC 2013
>>Modified Files:
>>      src/usr.bin/make: main.c var.c
>>Log Message:
>>If using gmake's MAKELEVEL; use it the same way
>Now you put it back the way it was before which is wrong. Gmake does not
>behave this way. Before your change the following Makefile printed:

This is still broken. Renaming the variable is not a fix either.
Consider the case where we switched from bmake to gmake as the
pkgsrc wrapper. The packages that depend on $MAKELEVEL being 0 or
unset would still break. So the proper fix for the 2 packages that
broke is to make pkgsrc unset MAKELEVEL before invoking gmake.

So to fix those:
- revert the changes so that MAKELEVEL again works the same way as in gmake.
- add glue to invoke gmake with MAKELEVEL unset.


>--- Makefile ---
>       echo makelevel=${MAKELEVEL} make=${MAKE} makeflags=${MAKEFLAGS}
>       echo .makelevel=${.MAKELEVEL}
>       ${MAKE} l1
>       echo makelevel=${MAKELEVEL} make=${MAKE} makeflags=${MAKEFLAGS}
>       echo .makelevel=${.MAKELEVEL}
>--- Output gmake ---
>    echo makelevel=0 make=gmake makeflags=
>    makelevel=0 make=gmake makeflags=
>    echo .makelevel=
>    .makelevel=
>    gmake l1
>    gmake[1]: Entering directory `/u/christos'
>    echo makelevel=1 make=gmake makeflags=w
>    makelevel=1 make=gmake makeflags=w
>    echo .makelevel=
>    .makelevel=
>    gmake[1]: Leaving directory `/u/christos'
>--- Output make before your fixes ---
>    echo makelevel=0 make=make makeflags= 
>    makelevel=0 make=make makeflags=
>    echo .makelevel=0
>    .makelevel=0
>    make l1
>    echo makelevel=1 make=make makeflags= 
>    makelevel=1 make=make makeflags=
>    echo .makelevel=1
>    .makelevel=1
>--- Output make after your fixes --
>    echo makelevel=1 make=/usr/src/usr.bin/make/obj.amd64/make makeflags= 
>    makelevel=1 make=/usr/src/usr.bin/make/obj.amd64/make makeflags=
>    echo .makelevel=
>    .makelevel=
>    /usr/src/usr.bin/make/obj.amd64/make l1
>    echo makelevel=2 make=/usr/src/usr.bin/make/obj.amd64/make makeflags= 
>    makelevel=2 make=/usr/src/usr.bin/make/obj.amd64/make makeflags=
>    echo .makelevel=
>    .makelevel=
>As I mentioned before, it makes no sense to keep the variable internally at
>X and pass it to the program at X + 1, and as demonstrated, this is not
>what gmake does.

Home | Main Index | Thread Index | Old Index