1
聲明我知道,Makefile文件,我們可以寫出下面的集團使用如果Makefile.am(automake的)
ifneq ($(MYAPP_REVISION)_,_)
ifneq ($(MYAPP_REVISION),exported)
myapp_CFLAGS+=-DMYAPP_REVISION=\"$(MYAPP_REVISION)\"
myapp_LDFLAGS+=-DMYAPP_REVISION=\"$(MYAPP_REVISION)\"
endif
endif
但如果寫這個集團在makefile.am
(autoconf的)我會得到構建不工作。
任何關於在makefile.am
中編寫相應的這個區塊的想法?
你有沒有試過手冊? http://www.gnu.org/software/automake/manual/html_node/Conditionals.html#Conditionals另請參閱http://www.sourceware.org/autobook/autobook/autobook_179.html – Hasturkun
您可以編寫這樣的東西在Makefile中,但不是所有版本的make都能識別它。 automake的一個要點是它生成(大部分)便攜式makefile。將不可移植的語法編寫到Makefile.am中會起反作用。 –