clean
可移植 Makefile 目标 的适当形式是什么?$(RM)
对我不起作用。我在 Windows (7) 命令提示符和 Eclipse 中工作。他们都报告了相同版本的make(我的路径上有多个):
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
从命令:
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 中调用它,两个环境都会报告相同的路径。