List Info

Thread: Problem using -R in MAKEFLAGS




Problem using -R in MAKEFLAGS
user name
2006-11-06 16:59:15
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
jgcjgc.org

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-cl
oud.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
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )