[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[regression] make 4.0+ breaks 'export' when '-e' option is given
From: |
Enrico Scholz |
Subject: |
[regression] make 4.0+ breaks 'export' when '-e' option is given |
Date: |
Tue, 09 Feb 2016 18:57:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Hello,
to pass down *all* environment variables given on cmdline to sub-makes,
I used to write
| export ${MAKEOVERRIDES}
Unfortunately, this seems to be broken beginning with make 4.0 when '-e'
is specified:
--- /tmp/x.mk ---
FOO = bar
export ${MAKEOVERRIDES}
a:
${MAKE} -f ${firstword ${MAKEFILE_LIST}} b
b:
@echo TEST1 '>${a-b}<'
@echo TEST2 '>${a_b}<'
----
## working make
$ make -v
GNU Make 3.82
## working 'make' without '-e'
$ env -i PATH=/usr/bin:/bin make -f /tmp/x.mk -s \
a-b='ok ab $(FOO) a-b=XXX' \
a_b='ok ab ${FOO} a_b=XXX'
TEST1 >ok ab bar a-b=XXX<
TEST2 >ok ab bar a_b=XXX<
## working 'make' with '-e'
$ env -i PATH=/usr/bin:/bin make -f /tmp/x.mk -s -e \
a-b='ok ab $(FOO) a-b=XXX' \
a_b='ok ab ${FOO} a_b=XXX'
TEST1 >ok ab bar a-b=XXX<
TEST2 >ok ab bar a_b=XXX<
----
## broken make
$ ./make -v
GNU Make 4.1
## broken 'make' without '-e'; result ok
$ env -i PATH=/usr/bin:/bin ./make -f /tmp/x.mk -s \
a-b='ok ab $(FOO) a-b=XXX' \
a_b='ok ab ${FOO} a_b=XXX'
TEST1 >ok ab bar a-b=XXX<
TEST2 >ok ab bar a_b=XXX<
## broken 'make' with '-e'; result bad
$ env -i PATH=/usr/bin:/bin ./make -f /tmp/x.mk -s -e \
a-b='ok ab $(FOO) a-b=XXX' \
a_b='ok ab ${FOO} a_b=XXX'
TEST1 >XXX=<
TEST2 >XXX=<
----
Enrico
- [regression] make 4.0+ breaks 'export' when '-e' option is given,
Enrico Scholz <=