[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking application of dependencies from make rules without recipes
From: |
Paul Smith |
Subject: |
Re: Checking application of dependencies from make rules without recipes |
Date: |
Tue, 20 Jun 2017 19:16:29 -0400 |
On Tue, 2017-06-20 at 14:19 +0200, SF Markus Elfring wrote:
> > This applies only to implicit rules, not explicit rules.
> > > Can an explicit make rule also be cancelled anyhow?
> > No.
>
> Thanks for this clarification.
>
> This distinction has got important consequences on how the different
> make rule types can and should be ordered relative to each other.
I don't see why it makes a difference in how rule types should be
ordered (I assume that by "ordered" you mean which rules are defined
first in the makefile).
Regardless of the order in which rules appear, an explicit rule is
always used to build a target if it exists.
Only if an explicit rule does not exist will an implicit rule search be
performed.
This is true regardless of whether the explicit rule comes before or
after the implicit rule when parsing the makefile.
Remember that make parses everything in all the makefiles first,
constructing a set of internal data structures representing all the
rules defined in all the makefiles and all of their explicit
relationships, _before_ it tries to build any target. So by the time
make is ready to build its first target, it already knows everything
defined anywhere in the makefile.
Makefiles are not like the shell or other interpreted languages where
commands are executed as they are parsed.
- Re: How to avoid the double execution of a make info call?, (continued)
- Re: How to avoid the double execution of a make info call?, Paul Smith, 2017/06/22
- Re: How to avoid the double execution of a make info call?, SF Markus Elfring, 2017/06/22
- Re: Improving dependency specifications in make rules?, SF Markus Elfring, 2017/06/28
- Re: Checking application of dependencies from make rules without recipes, SF Markus Elfring, 2017/06/27
- Re: Checking application of dependencies from make rules without recipes, SF Markus Elfring, 2017/06/20
- Re: Checking application of dependencies from make rules without recipes, Paul Smith, 2017/06/20
- Re: Checking application of dependencies from make rules without recipes, SF Markus Elfring, 2017/06/20
- Re: Checking application of dependencies from make rules without recipes,
Paul Smith <=
- Re: Checking application of dependencies from make rules without recipes, SF Markus Elfring, 2017/06/21
- RE: Checking application of dependencies from make rules without recipes, Martin Dorey, 2017/06/21
- Re: Checking application of dependencies from make rules without recipes, SF Markus Elfring, 2017/06/21
- Message not available
- Re: Checking application of dependencies from make rules without recipes, SF Markus Elfring, 2017/06/21
- Re: Checking application of dependencies from make rules without recipes, Henrik Carlqvist, 2017/06/18