[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: more doc about _PYTHON
From: |
Alexandre Duret-Lutz |
Subject: |
Re: FYI: more doc about _PYTHON |
Date: |
Tue, 21 Feb 2006 21:26:56 +0100 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) |
>>> "SK" == Stepan Kasal <address@hidden> writes:
SK> Hello,
SK> I think there was a consensus that manuals should consistently use full
SK> quoting in autoconf code.
Right. Let's clean this up.
2006-02-21 Alexandre Duret-Lutz <address@hidden>
* doc/automake.texi (Complete, Extending aclocal, Public macros)
(Python, Conditionals, API versioning): Always quote macro arguments.
Report from Stepan Kasal.
Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.128
diff -u -r1.128 automake.texi
--- doc/automake.texi 16 Feb 2006 21:03:05 -0000 1.128
+++ doc/automake.texi 21 Feb 2006 20:25:55 -0000
@@ -810,7 +810,7 @@
@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 @@
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 @@
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 @@
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 @@
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 @@
@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 @@
as follows.
@example
- AM_PATH_PYTHON(,, :)
+ AM_PATH_PYTHON(,, [:])
AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
@end example
@@ -7404,14 +7406,14 @@
option.
@example
-AC_ARG_ENABLE(debug,
+AC_ARG_ENABLE([debug],
[ --enable-debug Turn on debugging],
[case "address@hidden@}" in
yes) debug=true ;;
no) debug=false ;;
- *) AC_MSG_ERROR(bad value address@hidden@} for --enable-debug) ;;
+ *) AC_MSG_ERROR([bad value address@hidden@} 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 @@
@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}:
--
Alexandre Duret-Lutz
Shared books are happy books. http://www.bookcrossing.com/friend/gadl