0
便攜式Makefile的clean
目標的適當表單是什麼? $(RM)
不適用於我。我從Windows(7)命令提示符和Eclipse中都可以工作。他們都報告提出的相同版本(我有我的路多):什麼會在Makefile中創建一個好的可移植的乾淨目標?
make --version
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
在Eclipse:
make clean
rm -f *.o testScaffolding_* runner.cpp runner.exe *.d
從CMD:
rm -f *.o testScaffolding_* runner.cpp runner.exe *.d
process_begin: CreateProcess(NULL, rm -f *.o testScaffolding_* runner.cpp runner.exe *.d, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [clean] Error 2
兩個報告$(OS)
爲Windows_NT
和$(RM)
作爲rm -f
。我也安裝了它,如果我在Makefile中調用它,兩個環境都會報告相同的路徑。