www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/25/03:20:41

Date: Sun, 25 Jun 2000 10:20:00 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Make file wildcards
In-Reply-To: <f6o9lscq22r6v3q730c5voj0ute3d321vs@4ax.com>
Message-ID: <Pine.SUN.3.91.1000625101936.25761D-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 24 Jun 2000, Jason Green wrote:

> Ok, slight technicality. ;-) This rule:
> 
> %.o : %.c %.cpp %.h
> 	$(CC) $(CFLAGS) -c $<
> 
> will produce test.o given test.c *and* test.cpp *and* test.h
> 
> Since test.c does not exist, make prefers the built-in rule:
> 
> %.o: %.cpp
>         $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

That is true, but it is irrelevant to the point I wanted to make: that
implicit rules do not *override* one another.  Instead, Make remembers
them all and will use the first one it sees fit.

- Raw text -


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