Makefile
my_test:
ifdef $(toto)
@echo 'toto is defined'
else
@echo 'no toto around'
endif
Expected behavior
$ make my_test
no toto around
$ make my_test toto
toto is defined
Current behavior
$ make my_test
no toto around
$ make my_test toto
no toto around
make: *** No rule to make target `toto'. Stop.
When I run make my_test I get the else text as expected no toto around. However
make my_test toto
no toto around
make: *** No rule to make target `toto'. Stop.
Makefile version
$ make -v
GNU Make 3.81
SLE version
$ cat /etc/*release
VERSION_ID="11.4"
PRETTY_NAME="SUSE Linux Enterprise Server 11 SP4"
PS
The point is to make make my_test verbose if toto, if toto not given then the command will run silently