]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* doc/autoconf.texi (The Make Macro MAKEFLAGS): New node.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 14 Jun 2006 19:49:00 +0000 (19:49 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 14 Jun 2006 19:49:00 +0000 (19:49 +0000)
(Special Chars in Names): Renamed from Leading _ in Macro Names.
Mention other special chars, too.

ChangeLog
doc/autoconf.texi

index f782c417f0a7819d572168294e1a4a892e36d212..fd388fca8614d466200eecbc6cf7d75ea08a8bfe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,12 @@
        * doc/autoconf.texi (Initializing configure, Shell Substitutions):
        Warn about $@ not persisting.  Problem reported by Julien Danjou in
        <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=372179>.
+       (Special Chars in Names): Renamed from Leading _ in Macro Names.
+       Mention other special chars, too.
+
+2006-06-14  Eric Blake  <ebb9@byu.net>
+
+       * doc/autoconf.texi (The Make Macro MAKEFLAGS): New node.
 
 2006-06-13  Paul Eggert  <eggert@cs.ucla.edu>
 
index 2bfd8df184fec942feaccc9c5d44a0f47b7257e8..b8e541b9837b3fce4b550273761b8fcaacbb3462 100644 (file)
@@ -484,11 +484,12 @@ Portable Make Programming
 
 * $< in Ordinary Make Rules::   $< in ordinary rules
 * Failure in Make Rules::       Failing portably in rules
-* Leading _ in Macro Names::    $(_FOO) on ancient hosts
+* Special Chars in Names::      $(.FOO), $(_FOO), $(007), etc.
 * Backslash-Newline-Newline::   Empty last lines in macro definitions
 * Backslash-Newline Comments::  Spanning comments across line boundaries
 * Long Lines in Makefiles::     Line length limitations
 * Macros and Submakes::         @code{make macro=value} and submakes
+* The Make Macro MAKEFLAGS::    @code{$(MAKEFLAGS)} portability issues
 * The Make Macro SHELL::        @code{$(SHELL)} portability issues
 * Comments in Make Rules::      Other problems with Make comments
 * obj/ and Make::               Don't name a subdirectory @file{obj}
@@ -13616,11 +13617,12 @@ itself.
 @menu
 * $< in Ordinary Make Rules::   $< in ordinary rules
 * Failure in Make Rules::       Failing portably in rules
-* Leading _ in Macro Names::    $(_FOO) on ancient hosts
+* Special Chars in Names::      $(.FOO), $(_FOO), $(007), etc.
 * Backslash-Newline-Newline::   Empty last lines in macro definitions
 * Backslash-Newline Comments::  Spanning comments across line boundaries
 * Long Lines in Makefiles::     Line length limitations
 * Macros and Submakes::         @code{make macro=value} and submakes
+* The Make Macro MAKEFLAGS::    @code{$(MAKEFLAGS)} portability issues
 * The Make Macro SHELL::        @code{$(SHELL)} portability issues
 * Comments in Make Rules::      Other problems with Make comments
 * obj/ and Make::               Don't name a subdirectory @file{obj}
@@ -13659,8 +13661,13 @@ implementations of the @option{-e} option of @command{sh} and
 about porting to buggy BSD shells it may be simpler to migrate
 complicated @command{make} actions into separate scripts.
 
-@node Leading _ in Macro Names
-@section Leading @samp{_} in Make Macro Names
+@node Special Chars in Names
+@section Special Characters in Make Macro Names
+
+Posix limits macro names to nonempty strings containing only
+@acronym{ASCII} letters and digits, @samp{.}, and @samp{_}.  Many
+@command{make} implementations allow a wider variety of characters, but
+portable makefiles should avoid them.
 
 Some ancient @command{make} implementations don't support leading
 underscores in macro names.  An example is @acronym{NEWS-OS} 4.2R.
@@ -13825,6 +13832,31 @@ two:
 You need to foresee all macros that a user might want to override if
 you do that.
 
+@node The Make Macro MAKEFLAGS
+@section The Make Macro MAKEFLAGS
+@cindex @code{MAKEFLAGS} and @command{make}
+@cindex @command{make} and @code{MAKEFLAGS}
+
+Posix requires @command{make} to use @code{MAKEFLAGS} to affect the
+current and recursive invocations of make, but allows implementations
+several formats for the variable.  It is tricky to parse
+@code{$MAKEFLAGS} to determine whether @option{-s} for silent execution
+or @option{-k} for continued execution are in effect.  For example, you
+cannot assume that the first space-separated word in @code{$MAKEFLAGS}
+contains single-letter options, since in the Cygwin version of
+@acronym{GNU} @command{make} it is either @option{--unix} or
+@option{--win32} with the second word containing single-letter options.
+
+@example
+$ @kbd{cat Makefile}
+all:
+       @@echo MAKEFLAGS = $(MAKEFLAGS)
+$ @kbd{make}
+MAKEFLAGS = --unix
+$ @kbd{make -k}
+MAKEFLAGS = --unix -k
+@end example
+
 @node The Make Macro SHELL
 @section The Make Macro @code{SHELL}
 @cindex @code{SHELL} and @command{make}