bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Behavior change related to MAKEFLAGS and recursive make in version 4.4.1


From: Ouellette, Paul
Subject: Behavior change related to MAKEFLAGS and recursive make in version 4.4.1
Date: Thu, 25 Jan 2024 15:28:09 +0000

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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]