Re: Multiple rules for same target: what is the order of prerequisites in $^ and what does $< expand to?

Renaud Pacalet <[email protected]>
Newsgroups gmane.comp.gnu.make.general
Organization Telecom ParisTech
Message-ID <[email protected]>

On 9/27/23 16:32, Bahman Movaqar wrote:
> On Wed, 2023-09-27 at 12:16 +0200, Renaud Pacalet wrote:
> 
>> 3. Ignore all other implicit rules (which seems to contradict 4.11).
> 
> Make only ignores the implicit rules for which there are
> explicit/static equivalents.

Thanks for your answer, Bahman. Not sure what "equivalent" means but with the following Makefile:

%.a: %.b

a.a: a.c
     echo $^

I would not say that the pattern rule and the explicit rule are equivalent because they have different prerequisite lists, the former has no recipe, the latter has one. Yet, running 'touch a.c a.b; make -s a.a' prints only 'a.c', which shows that the pattern rule is ignored.

> 
>> Can someone confirm?
> 
> Good summary!  That makes sense as my understanding goes.
> 
> 

-- 
Renaud Pacalet
Télécom Paris
Campus SophiaTech
450 Route des Chappes, CS 50193
06904 Biot Sophia Antipolis cedex, FRANCE
Tel : +33 (0) 4 9300 8402
Web : http://www.telecom-paris.fr/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.