[cmake-developers] disabling implicit rules ?

Bill Hoffman bill.hoffman at kitware.com
Thu Aug 31 16:34:41 EDT 2006


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.

I did notice that the toplevel Makefile has the .SUFFICES thing much
lower in the makefile than it used to.  It maybe an inadvertent change.
Try moving it to the top of the toplevel Makefile and see if it fixes your problem.

-Bill




More information about the cmake-developers mailing list