NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/53136: bmake evaluates MAKEFLAGS like command line argument
The following reply was made to PR bin/53136; it has been noted by GNATS.
From: Steffen Nurpmeso <steffen%sdaoden.eu@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: bin/53136: bmake evaluates MAKEFLAGS like command line
argument
Date: Wed, 28 Mar 2018 18:20:55 +0200
Hi.
Valery Ushakov <uwe%stderr.spb.ru@localhost> wrote:
|The following reply was made to PR bin/53136; it has been noted by GNATS.
|
|From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
|To: gnats-bugs%NetBSD.org@localhost
|Cc:
|Subject: Re: bin/53136: bmake evaluates MAKEFLAGS like command line argument
|Date: Wed, 28 Mar 2018 16:43:12 +0300
|
| On Tue, Mar 27, 2018 at 21:30:00 +0000, steffen%sdaoden.eu@localhost wrote:
|
|> 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
|
| This paragraph is probably not pertinent here. See below.
|
|> #?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
|
| I wonder if you realize that your backslashes do not survive
|
| read __ev__
They do not survive the eval, yes. I have committed a fix to
where this comes from, we now simply ". FILE" dot include that.
| so you end up with MAKEFLAGS that contains
|
| .MAKE.LEVEL.ENV=MAKELEVEL VAL_RANDOM=ssl arc4 builtin
|
| it's just gmake treats those "arc4" and "builtin" differently, not
| VAL_RANDOM assignment.
That is the point, right. gmake honours POSIX, bmake does not.
With reproducer this time. ^_^
Ciao,
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
Home |
Main Index |
Thread Index |
Old Index