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: Colm Aengus Murphy
Subject: Re: Problem using -R in MAKEFLAGS
Date: Mon, 06 Nov 2006 17:16:14 +0000
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

Hi John,

Looking good :)
I'll go for option 3 as we have a mixed windows/linux environment and I want to put as much as possible inside the makefiles.

Thanks for you help.

Colm A

John Graham-Cumming wrote:
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.

--
---------------------------------------------------------------------
Colm Aengus Murphy,                Tel       : +353 1 2911000
Senior Hardware Design Engineer,   Direct Tel: +353 1 2911373
Silicon & Software Systems,        Fax       : +353 1 2911001
South County Business Park,
Leopardstown,                      E-mail: address@hidden
Dublin 18.                         WWW   : www.s3group.com
Ireland
---------------------------------------------------------------------


The information contained in this e-mail and in any attachments is confidential 
and is designated solely for the attention of the intended recipient(s). If you 
are not an intended recipient, you must not use, disclose, copy, distribute or 
retain this e-mail or any part thereof. If you have received this e-mail in 
error, please notify the sender by return e-mail and delete all copies of this 
e-mail from your computer system(s).
Please direct any additional queries to: address@hidden
Thank You.




reply via email to

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