Skip to main content
1 of 2
yaegashi
  • 12.6k
  • 2
  • 39
  • 42

You need to put ifeq in the beginning of a line:

test_target: 
ifeq ($(TEST),"TRUE")
    echo "Do something"
endif

Also note that it compares $(TEST) with "TRUE" as is:

$ make TEST=TRUE
make: Nothing to be done for 'test_target'.

$ make TEST='"TRUE"'
echo "Do something"
Do something
yaegashi
  • 12.6k
  • 2
  • 39
  • 42