Hello,
Consider the following makefiles:
$ cat Makefile
MAKEFLAGS+=VAR=foo
all:
$(info make VAR=$(VAR))
@echo "env VAR=$$VAR"
$(MAKE) -C lib
$ cat lib/Makefile
all:
@echo "env VAR=$$VAR"
$(info make VAR=$(VAR))
With GNU Make 4.4 and older, the output is:
$ make --no-print-directory
make VAR=foo
env VAR=foo
make -C lib
make VAR=foo
env VAR=foo
With GNU Make 4.4.1, the output is:
$ make --no-print-directory
make VAR=foo
env VAR=
make -C lib
make VAR=
env VAR=
I have a makefile that depends on VAR being set in the sub-make as in Make 4.4.
Was I depending on a bug or undefined behavior or is this a bug in Make 4.4.1?