autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.63-38-g


From: Paolo Bonzini
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-38-g45f4733
Date: Mon, 13 Oct 2008 16:01:52 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=45f473304f1a13b9909a3236d8d154316fe7eddf

The branch, master has been updated
       via  45f473304f1a13b9909a3236d8d154316fe7eddf (commit)
      from  0ba284a888653fbaa2c05d9476eca4a33060341e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 45f473304f1a13b9909a3236d8d154316fe7eddf
Author: Paolo Bonzini <address@hidden>
Date:   Fri Oct 10 09:02:36 2008 +0200

    Add and document AS_INIT_GENERATED.
    
    * lib/m4sugar/m4sh.m4 (AS_INIT_GENERATED): New.
    * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Use it.
    * doc/autoconf.texi (Initialization macros): Document it.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |    7 +++++++
 doc/autoconf.texi      |   35 +++++++++++++++++++++++++++++++++++
 lib/autoconf/status.m4 |    6 +-----
 lib/m4sugar/m4sh.m4    |   11 +++++++++++
 4 files changed, 54 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 418aff6..bd108ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-10-13  Paolo Bonzini  <address@hidden>
+
+       Add and document AS_INIT_GENERATED.
+       * lib/m4sugar/m4sh.m4 (AS_INIT_GENERATED): New.
+       * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Use it.
+       * doc/autoconf.texi (Initialization macros): Document it.
+
 2008-10-13  Eric Blake  <address@hidden>
 
        Use consistent shell function style.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index d9d82aa..ff81c2e 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -11943,6 +11943,41 @@ generated from, and code to sanitize the environment 
for the rest of the
 script.  Finally, it changes the current diversion to @code{BODY}.
 @end defmac
 
address@hidden AS_INIT_GENERATED
address@hidden
+Initialize the M4sh environment.  This macro emits again all the
+code that is generated by @code{AS_INIT}, including the expansion of
address@hidden and @code{AS_SHELL_SANITIZE}.  It is meant
+to be used in a quoted here document when generating other shell scripts.
+
+Note that @code{AS_INIT_GENERATED} does not emit the entire prolog.
+In particular, a line containing @code{#!$SHELL} must have already been
+emitted to the child script; you should not use @code{#!/bin/sh}, or the
+child script will not use the more modern shell that the parent script
+might have detected.  Currently, the suggested idiom for writing a M4sh
+shell script from within another script is:
+
address@hidden
+m4_rename([AS_MESSAGE_LOG_FD], [save_AS_MESSAGE_LOG_FD])dnl
+cat > "@var{file}" <<__EOF__
+#! $SHELL
+# Generated by $as_me.
+# ...
+
address@hidden@}
+__EOF__
+
+cat >>"@var{file}" <<\__EOF__
+AS_INIT_GENERATED
+# ...
+__EOF__
+m4_rename([save_AS_MESSAGE_LOG_FD], [AS_MESSAGE_LOG_FD])dnl
address@hidden example
+
+This, however, may change in the future as the M4sh interface is
+stabilized further.
address@hidden defmac
+
 @defmac AS_LINENO_PREPARE
 @asindex{LINENO_PREPARE}
 @evindex LINENO
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index ddc5f47..6d622b9 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -1332,11 +1332,7 @@ SHELL=\${CONFIG_SHELL-$SHELL}
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-AS_SHELL_SANITIZE
-dnl Watch out, this is directly the initializations, do not use
-dnl AS_PREPARE, otherwise you'd get it output in the initialization
-dnl of configure, not config.status.
-_AS_PREPARE
+AS_INIT_GENERATED
 exec AS_MESSAGE_FD>&1
 
 # Save the log message, to keep $[0] and so on meaningful, and to
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 2e6b2f2..9c09dc0 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -1695,6 +1695,17 @@ m4_define([AS_VAR_POPDEF],
 ## ----------------- ##
 
 
+# AS_INIT_GENERATED
+# -----------------
+# Emit m4sh initialization code in a suitable form for a quoted
+# here document.  Does not emit the `#!' sequence, which should be
+# generated with `#! $SHELL'; see the manual or autoconf/status.m4
+# for more detail.
+m4_defun([AS_INIT_GENERATED],
+[m4_require([AS_PREPARE])dnl
+AS_SHELL_SANITIZE
+_AS_PREPARE])
+
 # AS_INIT
 # -------
 # Initialize m4sh.


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

[Prev in Thread] Current Thread [Next in Thread]