help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem using -R in MAKEFLAGS


From: John Graham-Cumming
Subject: Re: Problem using -R in MAKEFLAGS
Date: Mon, 06 Nov 2006 17:59:15 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Thunderbird/0.5 Mnenhy/0.6.0.104

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
address@hidden

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]