From: Jason Green 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: 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> <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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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" 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.