Colm Aengus Murphy wrote:
I tried using ".SUFFIXES:".
Its a lot better but it still doesn't stop all of the built in rules.

For the simple makefile:
.SUFFIXES: %.exe : %.c
   gcc -o $(@F) $<

I still get:
 Considering target file `helloworld.c'.
  Looking for an implicit rule for `helloworld.c'.

Right. .SUFFIXES: only kills off the old-style suffix rules, and not the pattern rules. Hence there are some (quite a few actually, that are still in effect). If you want to kill the pattern rules then you have three choices:

1. Specify -r on the command-line
2. Set -r in MAKEFLAGS in the environment before make is run
3. Kill them off one by one in the Makefile.

To do #3 for your example, you need to kill off the following:

%.c: %.w %.ch
%:: RCS/%,v
%:: RCS/%
%:: SCCS/s.%
%:: %,v
%:: s.%

Just writing those lines above in your Makefile will be enough. You can use make -p to print out a list of the rules that are in effect if you need to kill others.

John.
--
John Graham-Cumming
[EMAIL PROTECTED]

Home: http://www.jgc.org/
Blog: http://www.jgc.org/blog/

POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/
GNU Make Debugger: http://gmd.sf.net/
Fast, Parallel Builds: http://www.electric-cloud.com/

Sign up for my Spam and Anti-spam Newsletter
at http://www.jgc.org/

Help out in the fight against spam
http://www.spamorham.org/


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to