summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-09-29 13:15:00 -0400
committerPaul Smith <psmith@gnu.org>2013-09-29 13:15:00 -0400
commit543521cd475e7182e30a17bd032b9fe2bb740bcb (patch)
treefda9c6a2c91276cc5a847a1c9eeded682002a29a /doc
parente8122ecb5d726e8b805a7854f844d9a4222f1564 (diff)
downloadgunmake-543521cd475e7182e30a17bd032b9fe2bb740bcb.tar.gz
Reset GNUMAKEFLAGS after parsing.
If we don't do this we'll continually add flags on recursion. This is mainly for users to set in their environment before invoking make.
Diffstat (limited to 'doc')
-rw-r--r--doc/make.texi15
1 files changed, 11 insertions, 4 deletions
diff --git a/doc/make.texi b/doc/make.texi
index f89f8b7..42cec7f 100644
--- a/doc/make.texi
+++ b/doc/make.texi
@@ -4808,10 +4808,17 @@ to GNU @code{make}, and hence do not want to add GNU
@code{make}-specific flags to the @code{MAKEFLAGS} variable, you can
add them to the @code{GNUMAKEFLAGS} variable instead. This variable
is parsed just before @code{MAKEFLAGS}, in the same way as
-@code{MAKEFLAGS}. Note, however, that when @code{make} constructs
-@code{MAKEFLAGS} to pass to a recursive @code{make} it will include
-all flags. GNU @code{make} never sets the @code{GNUMAKEFLAGS}
-variable itself.
+@code{MAKEFLAGS}. When @code{make} constructs @code{MAKEFLAGS} to
+pass to a recursive @code{make} it will include all flags, even those
+taken from @code{GNUMAKEFLAGS}. As a result, after parsing
+@code{GNUMAKEFLAGS} GNU @code{make} sets this variable to the empty
+string to avoid duplicating flags during recursion.
+
+It's best to use @code{GNUMAKEFLAGS} only with flags which won't
+materially change the behavior of your makefiles. If your makefiles
+require GNU make anyway then simply use @code{MAKEFLAGS}. Flags such
+as @samp{--no-print-directory} or @samp{--output-sync} may be
+appropriate for @code{GNUMAKEFLAGS}.
@node -w Option, , Options/Recursion, Recursion
@subsection The @samp{--print-directory} Option