diff options
author | Paul Smith <psmith@gnu.org> | 2022-10-02 09:30:20 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2022-10-02 09:30:20 -0400 |
commit | d51ac701227e89cbab8c88668d71198ff52f92a7 (patch) | |
tree | c5a9321bd6531c652fbbd5e9aab8a50f9735dde1 /doc | |
parent | 3cb84fe9335228f10257ac049b838a166fb531c4 (diff) | |
download | make-git-d51ac701227e89cbab8c88668d71198ff52f92a7.tar.gz |
* doc/make.texi (Prerequisite Types): [SV 58056] Clarify ordering.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/make.texi | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/doc/make.texi b/doc/make.texi index 2ad5ec25..4bcd4fbe 100644 --- a/doc/make.texi +++ b/doc/make.texi @@ -2075,26 +2075,25 @@ extra features (@pxref{Recipes, ,Writing Recipes in Rules}). @cindex normal prerequisites @cindex prerequisites, order-only @cindex order-only prerequisites -There are actually two different types of prerequisites understood by -GNU @code{make}: normal prerequisites such as described in the -previous section, and @dfn{order-only} prerequisites. A normal -prerequisite makes two statements: first, it imposes an order in which -recipes will be invoked: the recipes for all prerequisites of a target -will be completed before the recipe for the target is run. Second, it -imposes a dependency relationship: if any prerequisite is newer than -the target, then the target is considered out-of-date and must be +There are two different types of prerequisites understood by GNU @code{make}: +normal prerequisites, described in the previous section, and @dfn{order-only} +prerequisites. A normal prerequisite makes two statements: first, it imposes +an order in which recipes will be invoked: the recipes for all prerequisites +of a target will be completed before the recipe for the target is started. +Second, it imposes a dependency relationship: if any prerequisite is newer +than the target, then the target is considered out-of-date and must be rebuilt. Normally, this is exactly what you want: if a target's prerequisite is updated, then the target should also be updated. -Occasionally, however, you have a situation where you want to impose a -specific ordering on the rules to be invoked @emph{without} forcing -the target to be updated if one of those rules is executed. In that -case, you want to define @dfn{order-only} prerequisites. Order-only -prerequisites can be specified by placing a pipe symbol (@code{|}) -in the prerequisites list: any prerequisites to the left of the pipe -symbol are normal; any prerequisites to the right are order-only: +Occasionally you may want to ensure that a prerequisite is built before a +target, but @emph{without} forcing the target to be updated if the +prerequisite is updated. @dfn{Order-only} prerequisites are used to create +this type of relationship. Order-only prerequisites can be specified by +placing a pipe symbol (@code{|}) in the prerequisites list: any prerequisites +to the left of the pipe symbol are normal; any prerequisites to the right are +order-only: @example @var{targets} : @var{normal-prerequisites} | @var{order-only-prerequisites} |