[prev in list] [next in list] [prev in thread] [next in thread] 

List:       autoconf-bug
Subject:    Re: "The `-a', `-o', `(', and `)' operands are not portable": please clarify
From:       Eric Blake <ebb9 () byu ! net>
Date:       2009-09-11 2:17:56
Message-ID: 4AA9B354.9090803 () byu ! net
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Reuben Thomas on 8/12/2009 8:08 AM:
> When I actually looked at the manual in git, almost everything you
> mentioned was already documented, except for two things:
> 
> 1. The hint you gave about AS_INIT being automatically called in
> configure and config.status. I attach a patch to remedy that.
> 
> 2. The bits about AS_REQUIRE_SHELL_FN. But that macro is not yet
> documented anyway.
> 
> diff --git a/doc/autoconf.texi b/doc/autoconf.texi
> index 6bac0c3..c441ff3 100644
> --- a/doc/autoconf.texi
> +++ b/doc/autoconf.texi
> @@ -12939,7 +12939,8 @@ generated from, and code to sanitize the environment for the rest of the
>  script.  Among other initializations, this sets @env{SHELL} to the shell
>  chosen to run the script (@pxref{CONFIG_SHELL}), and @env{LC_ALL} to
>  ensure the C locale.  Finally, it changes the current diversion to
> -@code{BODY}.
> +@code{BODY}.  @code{AS_INIT} is called automatically in @code{configure}
> +and @code{config.status}.

Thanks for the idea.  I ended up rewording it a bit (configure is a shell
script, and shell scripts don't call m4 macros).

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqps1QACgkQ84KuGfSFAYA2zACcCHanwvUxhX4a0ig+yBpZymDo
DgcAmgIO72imzPEWEdBlnI/nt2a905Rp
=buaK
-----END PGP SIGNATURE-----

["autoconf.patch232" (text/plain)]

>From 4d490cb54907bce022a338ad908a0d3dc956bb53 Mon Sep 17 00:00:00 2001
From: Eric Blake <ebb9@byu.net>
Date: Thu, 10 Sep 2009 20:16:46 -0600
Subject: [PATCH] Document that AS_INIT is automatically used.

* doc/autoconf.texi (Initialization Macros) <AS_INIT>: Add words
to clarify that only bare-bones scripts need a direct AS_INIT.
Suggested by Reuben Thomas.

Signed-off-by: Eric Blake <ebb9@byu.net>
---
 ChangeLog         |    6 ++++++
 doc/autoconf.texi |    5 ++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ff99666..529dfaf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,14 @@
 2009-09-10  Eric Blake  <ebb9@byu.net>

+	Document that AS_INIT is automatically used.
+	* doc/autoconf.texi (Initialization Macros) <AS_INIT>: Add words
+	to clarify that only bare-bones scripts need a direct AS_INIT.
+	Suggested by Reuben Thomas.
+
 	Clarify portability pitfall of test.
 	* doc/autoconf.texi (Limitations of Builtins) <test>: Give more
 	reasons why -a and -o are not portable.
+	Reported by Reuben Thomas.

 2009-09-04  Reuben Thomas <rrt@sc3d.org>  (tiny change)

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 36eba53..669e812 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -12941,7 +12941,10 @@ Initialization Macros
 script.  Among other initializations, this sets @env{SHELL} to the shell
 chosen to run the script (@pxref{CONFIG_SHELL}), and @env{LC_ALL} to
 ensure the C locale.  Finally, it changes the current diversion to
-@code{BODY}.
+@code{BODY}.  @code{AS_INIT} is called automatically by @code{AC_INIT}
+and @code{AT_INIT}, so shell code in @file{configure},
+@file{config.status}, and @file{testsuite} all benefit from a sanitized
+shell environment.
 @end defmac

 @defmac AS_INIT_GENERATED (@var{file}, @ovar{comment})
-- 
1.6.3.3.334.g916e1



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic