NetBSD-Bugs archive

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

bin/53136: bmake evaluates MAKEFLAGS like command line argument



>Number:         53136
>Category:       bin
>Synopsis:       bmake evaluates MAKEFLAGS like command line argument
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 27 21:30:00 +0000 2018
>Originator:     Steffen
>Release:        any
>Organization:
>Environment:
n.r.
>Description:
POSIX says for MAKEFLAGS

  The difference between the contents of MAKEFLAGS and the make utility command line is that the contents of the variable shall not be subjected to the word expansions

but the following fails with BSD, not with GNU make:

#?1[steffen@essex tmp]$ cat xxx.mk
all: setup
        $(MAKE) -f xxx.mk stage2
setup:
        @echo 'MAKEFLAGS=" .MAKE.LEVEL.ENV=MAKELEVEL VAL_RANDOM=ssl\ arc4\ builtin";export MAKEFLAGS;' > xxx.dat
stage2:
        @$(_prestop); LC_ALL=C $(MAKE) -f xxx.mk stage3
stage3:
        @$(_prestop); LC_ALL=C; echo "stage 3: $${MAKEFLAGS},VAL_RANDOM=$${VAL_RANDOM}"; rm -f xxx.dat
__prestop = true
_prestop = $(__prestop);\
        < ./xxx.dat read __ev__; eval $${__ev__}; unset __ev__
#?0[steffen@essex tmp]$ MAKE=bmake bmake -f xxx.mk 
bmake -f xxx.mk stage2
bmake[2]: don't know how to make arc4. Stop

bmake[2]: stopped in /home/steffen/tmp
*** Error code 2

Stop.
bmake[1]: stopped in /home/steffen/tmp
*** Error code 1

Stop.
bmake: stopped in /home/steffen/tmp
>How-To-Repeat:
As above.
>Fix:



Home | Main Index | Thread Index | Old Index