diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/make.texi | 15 |
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 |