Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的makefile有这个规则/配方:
%o: %cpp Makefile g++ -Wall -Wextra -MMD -MP -O2 -c -o $@ $<
在我最近升级 Cygwin 并获得 Make 3.82.90(以前的版本可能是 3.81)之前,这一直很好。
现在使用 make 3.82,它会忽略我的规则,而是使用内置规则来编译每个文件,例如:
g++ -c -o Foo.o Foo.cpp
我的模式没有分隔百分号和扩展名的点(句点)。改成这样解决了问题:
%.o: %.cpp Makefile g++ -Wall -Wextra -MMD -MP -O2 -c -o $@ $<