Checking if variables are defined in a makefile
问题 I have a GNU Makefile (version 3.81) that looks like the following: .PHONY: SPOneDot SPOneDot: ifndef X X=0.05 $$(info X undefined, changed to $X) endif ifndef Y Y=0.05 $$(info Y undefined, changed to $Y) endif python ./Submit3DSP.py -f OneDot.qdt -x $(X) -y $(Y) I execute with the following command line: make X=0.1 Y=0.1 SPOneDot but I get the following result: ifndef X make: ifndef: Command not found make: *** [SPOneDot] Error 127 I've looked in the makefile documentation and seen others