0
的Makefile:問題與Makefile文件執行shell腳本
$(shell ./test.sh)
實驗1:test.sh
echo "hi"
錯誤,我得到:
Makefile:1: *** missing separator. Stop.
實驗2: test.sh
echo("hi")
錯誤,我得到:
./test.sh: line 1: syntax error near unexpected token `"hi"'
./test.sh: line 1: `echo("hi")'
沒有任何意義......它看起來好像「製作」試圖強加給它的外殼語法腳本,但shell腳本也需要它自己的腳本。
我試過了,但它說:「Makefile:1:*** missing separator。Stop。」以及。我不知道該怎麼做.. – Blub
哦,該死的,顯然我不能把這條線放在任何地方,它必須是一個配方。謝謝你的幫助! – Blub
不完全是,你可以使用$(警告$(shell ...)),警告保證產生空輸出,然後你可以使用(假)賦值AAA:= $(shell ...) - 這一切都取決於您的特殊需求。 – pmod