Hello,
I am using GNU make 4.3. The manual says:
'Make' will set the special variable 'MAKECMDGOALS' to the list of
goals you specified on the command line. If no goals were given on
the command line, this variable is empty.
If I define the following Makefile:
ifeq "$(MAKECMDGOALS)" ""
MAKECMDGOALS := default
endif
all:
@echo MAKECMDGOALS=$(MAKECMDGOALS)
and then run
make --warn-undefined-variables
I get the following warning:
Makefile:1: warning: undefined variable 'MAKECMDGOALS'
Am I correct that there is a mismatch between make's documented and real
behaviour?
Thanks,
Sébastien.