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. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make