Hi, I think this looks like a bug, unless I'm forgetting some details about how variables are expanded within recipes.
alx@debian:~/tmp/bug$ ls Makefile alx@debian:~/tmp/bug$ cat Makefile | nl -ba 1 MAKEFLAGS += --warn-undefined-variables 2 3 foo := foo 4 5 all:; echo $(foo) 6 7 undefine foo alx@debian:~/tmp/bug$ make Makefile:5: warning: undefined variable 'foo' echo As I understand it, the variable foo is expanded immediately in the definition of the recipe, and make(1) shouldn't care if I undefine it after the definition of the recipe, right? make(1) should create the recipe with the contents of the variable, and not with the variable itself. Am I missing anything? I'm using Debian Sid: $ make --version | head -n1 GNU Make 4.4.1 Have a lovely night! Alex -- <https://www.alejandro-colomar.es> Use port 80 (that is, <...:80/>).
signature.asc
Description: PGP signature