summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-05-13 02:48:04 -0400
committerPaul Smith <psmith@gnu.org>2013-05-13 02:48:18 -0400
commitc7732bd5add31b38fea113c9ab4ad4d97a0870c7 (patch)
treea5a83eb8d54fa5cc32ab8e40ad619ca6d0f45d2f /doc
parent2627d8322136eac2b499dd12e2769eb01d7c74bc (diff)
downloadgunmake-c7732bd5add31b38fea113c9ab4ad4d97a0870c7.tar.gz
Add a new variable: GNUMAKEFLAGS
This allows you to write portable makefiles that set GNU make-specific command line options in the environment or makefile: add them to GNUMAKEFLAGS instead of MAKEFLAGS and they will be seen by GNU make but ignored by other implementations of make.
Diffstat (limited to 'doc')
-rw-r--r--doc/make.texi20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/make.texi b/doc/make.texi
index 8a35780..e3e5135 100644
--- a/doc/make.texi
+++ b/doc/make.texi
@@ -4798,6 +4798,16 @@ itself. For instance, the @samp{-t}, @samp{-n}, and @samp{-q} options, if
put in one of these variables, could have disastrous consequences and would
certainly have at least surprising and probably annoying effects.@refill
+If you'd like to run other implementations of @code{make} in addition
+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.
+
@node -w Option, , Options/Recursion, Recursion
@subsection The @samp{--print-directory} Option
@cindex directories, printing them
@@ -11968,6 +11978,16 @@ recipe line: its contents may not be quoted correctly for use in the
shell. Always allow recursive @code{make}'s to obtain these values
through the environment from its parent.
+@item GNUMAKEFLAGS
+
+Other flags parsed by @code{make}. You can set this in the environment or
+a makefile to set @code{make} command-line flags. GNU @code{make}
+never sets this variable itself. This variable is only needed if
+you'd like to set GNU @code{make}-specific flags in a POSIX-compliant
+makefile. This variable will be seen by GNU @code{make} and ignored
+by other @code{make} implementations. It's not needed if you only use
+GNU @code{make}; just use @code{MAKEFLAGS} directly.
+
@item MAKECMDGOALS
The targets given to @code{make} on the command line. Setting this