[cmake-developers] .SUFFIXES: not used in Xcode CreateCustomRulesMakefile

Johan Björk phb at spotify.com
Tue Jan 11 04:58:39 EST 2011


Hi everyone,

The Makefile generation code in cmGlobalXCodeGenerator.cxx
(cmGlobalXCodeGenerator::CreateCustomRulesMakefile) does not add a
.SUFFIXES: call, resulting in make having implicit rules in place.

The fix should be trivial, simply adding
makefileStream << ".SUFFIXES: " << "\n"; after the first two lines will
disable the implicit rules.

The issue is easy to reproduce, just create a custom rule that has an output
foo.source.cpp depending in foo.source.
In the case of foo.source.cpp already existing, and with a newer timestamp
then foo.source, the implicit rule with take precedence and attempt to build
foo.source by compiling foo.source.cpp

This is really only an issue if you generate the files in the source tree,
which we stopped doing, but the fix is trivial and it's already done for the
standard unix makefile generator.

Thanks
/Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20110111/219fe28d/attachment.html>


More information about the cmake-developers mailing list