我試圖自動化處理有時包含GNU Make的「等號」的文件。例如,假設文件名稱爲hello=world.txt
和Makefile
如下:如何在GNU Make中處理等號的文件名?
default: hello=world.txt.gz
hello=world.txt.gz : hello=world.txt
gzip hello=world.txt
echo done
您會收到以下錯誤:
test.make:5: *** commands commence before first target. Stop.
你怎麼能逃脫等號?我嘗試了反斜槓,雙引號和單引號。有任何想法嗎?
這對我很好。謝謝。 – swdev