* doc/automake.texi (Complete, Extending aclocal, Public macros)
authorAlexandre Duret-Lutz <adl@gnu.org>
Tue, 21 Feb 2006 20:27:05 +0000 (20:27 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Tue, 21 Feb 2006 20:27:05 +0000 (20:27 +0000)
(Python, Conditionals, API versioning): Always quote macro arguments.
Report from Stepan Kasal.

ChangeLog
doc/automake.texi
doc/stamp-vti
doc/version.texi

index 4fd7f7c..04fcca2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-02-21  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * doc/automake.texi (Complete, Extending aclocal, Public macros)
+       (Python, Conditionals, API versioning): Always quote macro arguments.
+       Report from Stepan Kasal.
+
 2006-02-16  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * doc/automake.texi (Python): More examples.
index ffc1a5f..90d60bd 100644 (file)
@@ -810,7 +810,7 @@ commands that @command{automake} needs.  The way to do this is to add an
 @code{AM_INIT_AUTOMAKE} call just after @code{AC_INIT}:
 
 @example
-AC_INIT(zardoz, 1.0)
+AC_INIT([zardoz], [1.0])
 AM_INIT_AUTOMAKE
 @dots{}
 @end example
@@ -2001,7 +2001,7 @@ AX_BAR
 should be rewritten as
 @example
 AC_DEFUN([AX_FOOBAR],
-[AC_PREREQ(2.57)dnl
+[AC_PREREQ([2.57])dnl
 AC_REQUIRE([AX_SOMETHING])dnl
 AX_FOO
 AX_BAR
@@ -2012,7 +2012,9 @@ Wrapping the @code{AC_PREREQ} call inside the macro ensures that
 Autoconf 2.57 will not be required if @code{AX_FOOBAR} is not actually
 used.  Most importantly, quoting the first argument of @code{AC_DEFUN}
 allows the macro to be redefined or included twice (otherwise this
-first argument would be expanded during the second definition).
+first argument would be expanded during the second definition).  For
+consistency we like to quote even arguments such as @code{2.57} that
+do not require it.
 
 If you have been directed here by the @command{aclocal} diagnostic but
 are not the maintainer of the implicated macro, you will want to
@@ -2391,16 +2393,16 @@ form).
 If your @file{configure.ac} has:
 
 @example
-AC_INIT(src/foo.c)
-AM_INIT_AUTOMAKE(mumble, 1.5)
+AC_INIT([src/foo.c])
+AM_INIT_AUTOMAKE([mumble], [1.5])
 @end example
 
 @noindent
 you can modernize it as follows:
 
 @example
-AC_INIT(mumble, 1.5)
-AC_CONFIG_SRCDIR(src/foo.c)
+AC_INIT([mumble], [1.5])
+AC_CONFIG_SRCDIR([src/foo.c])
 AM_INIT_AUTOMAKE
 @end example
 
@@ -5872,7 +5874,7 @@ If @var{ACTION-IF-NOT-FOUND} is not specified, as in the following
 example, the default is to abort @command{configure}.
 
 @example
-AM_PATH_PYTHON(2.2)
+AM_PATH_PYTHON([2.2])
 @end example
 
 @noindent
@@ -5881,7 +5883,7 @@ If Python >= 2.2 was only @emph{optional} to the package,
 @code{AM_PATH_PYTHON} could be called as follows.
 
 @example
-AM_PATH_PYTHON(2.2,, :)
+AM_PATH_PYTHON([2.2],, [:])
 @end example
 
 @code{AM_PATH_PYTHON} creates the following output variables based on
@@ -5899,7 +5901,7 @@ to setup a conditional in order to disable the relevant part of a build
 as follows.
 
 @example
-  AM_PATH_PYTHON(,, :)
+  AM_PATH_PYTHON(,, [:])
   AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
 @end example
 
@@ -7404,14 +7406,14 @@ conditional that is true if the user uses the @option{--enable-debug}
 option.
 
 @example
-AC_ARG_ENABLE(debug,
+AC_ARG_ENABLE([debug],
 [  --enable-debug    Turn on debugging],
 [case "$@{enableval@}" in
   yes) debug=true ;;
   no)  debug=false ;;
-  *) AC_MSG_ERROR(bad value $@{enableval@} for --enable-debug) ;;
+  *) AC_MSG_ERROR([bad value $@{enableval@} for --enable-debug]) ;;
 esac],[debug=false])
-AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
+AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
 @end example
 
 Here is an example of how to use that conditional in @file{Makefile.am}:
@@ -8003,7 +8005,7 @@ older releases will not be used.  For instance, use this in your
 @file{configure.ac}:
 
 @example
-  AM_INIT_AUTOMAKE(1.6.1)    dnl Require Automake 1.6.1 or better.
+  AM_INIT_AUTOMAKE([1.6.1])    dnl Require Automake 1.6.1 or better.
 @end example
 @noindent
 or, in a particular @file{Makefile.am}:
index 58b10b5..86ad4df 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 16 February 2006
+@set UPDATED 21 February 2006
 @set UPDATED-MONTH February 2006
 @set EDITION 1.9a
 @set VERSION 1.9a
index 58b10b5..86ad4df 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 16 February 2006
+@set UPDATED 21 February 2006
 @set UPDATED-MONTH February 2006
 @set EDITION 1.9a
 @set VERSION 1.9a