[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MAKECMDGOALS
From: |
Sébastien Hinderer |
Subject: |
MAKECMDGOALS |
Date: |
Mon, 1 Feb 2021 11:49:14 +0100 |
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.
- MAKECMDGOALS,
Sébastien Hinderer <=
- Re: MAKECMDGOALS, Kaz Kylheku (gmake), 2021/02/01