It can be verified with a minimal Makefile that "make --print-data-base"
shows an absence of built-in rules if MAKEFLAGS += --no-builtin-rules is
present, and likewise that --no-builtin-variables causes the variables
to disappear.
> [...]
Well, let's verify it then:
Contents of file "makefile":
MAKEFLAGS += --no-builtin-variables
$(info CC: $(CC))
Commands I used to test this scenario:
$ make --version
GNU Make 4.3
Built for x86_64-pc-linux-gnu
$ echo "The value of CC is: $CC"
The value of CC is:
$ make --file makefile
CC: cc
make: *** No targets. Stop.
$ make --file makefile --no-builtin-variables
CC:
make: *** No targets. Stop.
So it looks like "MAKEFLAGS += --no-builtin-variables" is not working, is it?
Note that --no-builtin-rules does work. I meant that adding --no-builtin-variables to MAKEFLAGS does not automatically enable --no-builtin-rules, as
it does when --no-builtin-variables is specified on the command line (as documented).
Regards,
rdiez