help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple rules for same target: what is the order of prerequisites i


From: Renaud Pacalet
Subject: Re: Multiple rules for same target: what is the order of prerequisites in $^ and what does $< expand to?
Date: Wed, 27 Sep 2023 16:50:31 +0200



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/



reply via email to

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