I am just learning about Makefiles and am having trouble with ifeq.
Version = GNU Make 3.82
Here is my simple Makefile:
CHECK := 0
CHECK2 := 0
check :
@echo "Check=${CHECK}"
@echo "Check2=${CHECK2}"
ifeq (${CHECK2},${CHECK})
@echo "EQUAL"
else
@echo "NOT EQUAL"
endif
Here is the output:
Check=0
Check2=0
NOT EQUAL
Why am I not seeing "EQUAL"?
Thanks!
Makefiles (and make) are extremely white-spaces sensitive. You seem to have a lot of white spaces in definition of
CHECK2
(but not forCHECK
), so they are not equal.