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

2011-01-11 Thread Johan Björk
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
___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


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

2011-01-11 Thread David Cole
Thanks for the suggestion.

I just committed this change and pushed it to 'next':
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66d9cd83519962f320d4b6edefeb15ae250107ae


Cheers,
David


On Tue, Jan 11, 2011 at 4:58 AM, Johan Björk p...@spotify.com wrote:

 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


 ___
 cmake-developers mailing list
 cmake-developers@cmake.org
 http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


___
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers