[cmake-developers] disabling implicit rules ?
Brad King
brad.king at kitware.com
Fri Sep 8 10:46:28 EDT 2006
Alexander Neundorf wrote:
> Hi,
>
> On Thursday 31 August 2006 22:34, Bill Hoffman wrote:
>> At 04:21 PM 8/31/2006, Alexander Neundorf wrote:
>>> Hi,
>>>
>>> yesterday I learnt that make has an implicit rule to generate a binary
>>> from a file name "*.sh" by simply copying it.
>>> For an OpenBSD user this had the effect that he wasn't able to compile
>>> (guess what) kdelibs, because simply copied one of the shell wrapper
>>> scripts (genembed.sh) to genembed, instead of building genembed. Renaming
>>> the file from genembed.sh to genembed.shell helped against this problem.
>>> The issue can be reproduced with the attached makefile, simply enter
>>> "make" and it will copy the file.
>>> Is there a way to disable this implicit rule ?
>> We are already attempting to do this:
>>
>> See a build.make file :
>>
>> # Disable implicit rules so canonical targets will work.
>> .SUFFIXES:
>>
>>
>> Some makes are funny about this stuff, and maybe BSD make has
>> a different syntax for getting rid of implicit rules. Or maybe the
>> order in the makefile counts.
The following changes put the .SUFFIXES rule as close to the top as
possible. I have not confirmed whether this helps but it makes the
generators a bit cleaner anyway.
/cvsroot/CMake/CMake/Source/cmGlobalUnixMakefileGenerator3.cxx,v <--
cmGlobalUnixMakefileGenerator3.cxx
new revision: 1.97; previous revision: 1.96
/cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v <--
cmLocalUnixMakefileGenerator3.cxx
new revision: 1.172; previous revision: 1.171
/cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v <--
cmMakefileTargetGenerator.cxx
new revision: 1.42; previous revision: 1.41
-Brad
More information about the cmake-developers
mailing list