delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/24/09:01:51

From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Make file wildcards
Date: Sat, 24 Jun 2000 13:48:48 +0100
Organization: Customer of Planet Online
Lines: 25
Message-ID: <qab9lsochni2om19ur20cshpkad7fphpqq@4ax.com>
References: <395309A1 DOT 881A2311 AT pacbell DOT net> <200006230948 DOT MAA02794 AT mailgw1 DOT netvision DOT net DOT il> <3953D200 DOT 897086E1 AT pacbell DOT net> <mjq7lskslq2g3h46oeobjouvhjuuujantm AT 4ax DOT com> <200006240638 DOT JAA15429 AT alpha DOT netvision DOT net DOT il>
NNTP-Posting-Host: modem-27.plutonium.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: news6.svr.pol.co.uk 961851040 14007 62.136.66.155 (24 Jun 2000 12:50:41 GMT)
NNTP-Posting-Date: 24 Jun 2000 12:50:41 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Agent 1.7/32.534
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> wrote:

> > > > This is expected behavior.  As written, the implicit rule you used
> > > > is just another implicit rule, not unlike the one that Make already
> > > > knows about.  When Make sees more than one implicit rule to build the
> > > > same target, it chooses the first one, which will always be the one
> > > > that's built into Make.
> > 
> > Do you really mean that?  I don't follow.  Normally if you redefine a
> > rule it should overide the built in rule.
> 
> Implicit rule is not a rule, in the sense you mean above.
> 
> A Makefile can legitimately have several different implicit rules for
> the same %.o pattern, and they are all valid.  Make will chose
> whatever it sees fit out of them.

Sorry, I still don't get it.  I understand your original reply to mean
that there are cases where a built-in implicit rule takes precedence
over an implicit rule defined in the makefile.  Can you give an
example of this (if you really mean that)?

The original makefile did not contain a rule (implicit or otherwise)
to compile a .cpp file, that is why the built-in rule was invoked.
The corrections I posted will override the built-in rule.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019