On Sat, 2016-04-16 at 03:51 +0000, Mark Galeck wrote: > The failure case is: > Makefile: > export VAR-Y := val > .PHONY: all > all: $(MAKE) -f Makefile1 > > Makefile1: > $(warning VAR-Y $(VAR-Y)) > all: > > > Here, if I call > >make > the original Make works correctly, the value is printed in Makefile1, > but after the above modification, no value is printed (the value is > empty).
Make isn't doing anything differently so it must be your shell. Note that if I modify Makefile to ensure make uses the slow path to invoke the sub-make (by adding ":;" for example), I get the "correct" behavior you report. I can't get make to show the incorrect behavior you report (although I've not tried to change the code). Note that "VAR-Y" is not a valid environment variable name; shell variables must match the regex [A-Za-z][A-Za-z0-9_]*. It could be that for some reason your shell is suppressing variables in the environment which have illegal names, but only when you invoke it using your changes. _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make