Ho un GNU Makefile (versione 3.81), che è simile al seguente:Verificando variabili sono definite in un makefile
.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)
eseguo con la seguente riga di comando: make X=0.1 Y=0.1 SPOneDot
ma ottengo il seguente risultato:
ifndef X
make: ifndef: Command not found
make: *** [SPOneDot] Error 127
Ho cercato nel makefile documentation e visto others use it. Qualsiasi aiuto è apprezzato, è probabilmente qualcosa di sciocco.
Che tipo di marca è questa? Fare GNU? BSD? POSIX? – Jens
GNU Fare qui la versione 3.81. –