From 257b82ac1ff8ba13428b93ca774d44d1c2febb61 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 11 Sep 2022 14:37:10 -0400 Subject: * doc/make.texi (How Make Works): Clarify default goal exceptions. --- doc/make.texi | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'doc') diff --git a/doc/make.texi b/doc/make.texi index 920e6460..b1ff72ef 100644 --- a/doc/make.texi +++ b/doc/make.texi @@ -716,13 +716,13 @@ to ignore errors from @code{rm} or any other command. @cindex processing a makefile @cindex makefile, how @code{make} processes -By default, @code{make} starts with the first target (not targets whose -names start with @samp{.}). This is called the @dfn{default goal}. -(@dfn{Goals} are the targets that @code{make} strives ultimately to -update. You can override this behavior using the command line -(@pxref{Goals, , Arguments to Specify the Goals}) or with the -@code{.DEFAULT_GOAL} special variable (@pxref{Special Variables, , -Other Special Variables}). +By default, @code{make} starts with the first target (not targets whose names +start with @samp{.} unless they also contain one or more @samp{/}). This is +called the @dfn{default goal}. (@dfn{Goals} are the targets that @code{make} +strives ultimately to update. You can override this behavior using the +command line (@pxref{Goals, , Arguments to Specify the Goals}) or with the +@code{.DEFAULT_GOAL} special variable (@pxref{Special Variables, , Other +Special Variables}). @cindex default goal @cindex goal, default @cindex goal @@ -1919,15 +1919,13 @@ the @dfn{recipe} to use to create or update the target. @cindex default goal @cindex goal, default -The order of rules is not significant, except for determining the -@dfn{default goal}: the target for @code{make} to consider, if you do -not otherwise specify one. The default goal is the target of the first -rule in the first makefile. If the first rule has multiple targets, -only the first target is taken as the default. There are two -exceptions: a target starting with a period is not a default unless it -contains one or more slashes, @samp{/}, as well; and, a target that -defines a pattern rule has no effect on the default goal. -(@xref{Pattern Rules, ,Defining and Redefining Pattern Rules}.) +The order of rules is not significant, except for determining the @dfn{default +goal}: the target for @code{make} to consider, if you do not otherwise specify +one. The default goal is the first target of the first rule in the first +makefile. There are two exceptions: a target starting with a period is not a +default unless it also contains one or more slashes, @samp{/}; and, a target +that defines a pattern rule has no effect on the default goal. (@xref{Pattern +Rules, ,Defining and Redefining Pattern Rules}.) Therefore, we usually write the makefile so that the first rule is the one for compiling the entire program or all the programs described by -- cgit v1.2.1