79665175

Date: 2025-06-13 17:03:55
Score: 2.5
Natty:
Report link

I have always used it this way:

ifndef MAKECMDGOALS
        @echo "$$(MAKECMDGOALS) is not defined"
    else 
        @echo "$(MAKECMDGOALS) is defined"
    endif

No parentheses, or "$" sign. A lesson hard learned, or was it? What is the difference in these two syntaxes?

ifndef $(MAKECMDGOALS)
        @echo "$$(MAKECMDGOALS) is not defined"
    else 
        @echo "$(MAKECMDGOALS) is defined"
    endif
Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Clarkman