當使用b uilt-in $(error text)
and $(warning text)
functions of GNU Make時,如何在沒有雜技的情況下將斷線輸入錯誤/警告輸出?如何合成GNU中的換行符做出警告或錯誤?
通過雜技我的意思是有趣的方法,因爲這兩個:
$(warning $(shell /bin/echo -e "something\nfoo\nbar\nbaz"))
$(warning $(shell /bin/bash -c 'echo -e "something\nfoo\nbar\nbaz"'))
其中,順便說一句,並沒有爲我用GNU工作在Ubuntu 10.04製作3.81。
理由:我想在我的GNUmakefile
更具可讀性條件的部分(ifeq
,ifneq
)錯誤輸出。
對我來說,目前的解決方法是使用每一行:
$(warning ...)
終於最後一行:
$(error ...)
'make'和空格不是很好的朋友,我很害怕。 –