hey,
I noticed that when setting a variable on the commandline and using
-e, the variable is set in the environment instead of in
MAKEFLAGS. Should it not also be set in MAKEFLAGS?
I found that this was causing unexpected results in a situation where
three levels of makefiles were being called like this:
-------- Makefile.1----------
all:
$(MAKE) FOO=bar -e -f Makefile.2
-------- Makefile.1----------
-------- Makefile.2----------
all:
$(MAKE) -f Makefile.3
-------- Makefile.2----------
-------- Makefile.3----------
FOO = baz
all:
@echo FOO is $(FOO)
-------- Makefile.3----------
make -f Makefile.1 will output "FOO is baz"
But, if we remove the -e in Makefile.1, we get "FOO is bar".
It seems strange to me that -e would affect this when $FOO is not part
of the initial environment, but maybe that is by design?
(Using make 3.81)
--
dann frazier
_______________________________________________
Bug-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-make