【发布时间】:2013-05-19 07:37:36
【问题描述】:
我有一个 GNU Makefile(3.81 版),如下所示:
.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)
我使用以下命令行执行:make X=0.1 Y=0.1 SPOneDot,但得到以下结果:
ifndef X
make: ifndef: Command not found
make: *** [SPOneDot] Error 127
我查看了makefile documentation 和others use it。任何帮助表示赞赏,这可能是愚蠢的。
【问题讨论】:
-
这是什么牌子的? GNU 制造? BSD? POSIX?
-
这里使用的是 GNU Make 3.81 版。
标签: makefile conditional environment-variables gnu-make