[Top][All Lists]

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

Re: Last configure args

From: Ralf Wildenhues
Subject: Re: Last configure args
Date: Fri, 20 May 2005 13:17:37 +0200
User-agent: Mutt/1.4.1i

Hi Paul, others,

I'm sorry I completely forgot about this thread.  Stepan was so nice to
remind me.  Quoted generously because of the long time ago (Paul's quote
also contains an archive reference to the thread).

* Paul Eggert wrote on Wed, Feb 02, 2005 at 07:44:36PM CET:
> Ralf Wildenhues writes:
> > Any comments?
> 1.  The NEWS file would need a patch too.
> 2.  The added "exit 0" in status.m4 should be plain "exit".  I see
> that there are similar problems already there; I'll fix them.
> 3.  I tried running with that patch
> <>
> in an Emacs shell window (which sets EMACS=t in the environment), and
> got this behavior:
>   $ ./config.status --config
>   configure '--prefix=/tmp/prefix' 'EMACS=t'
> That "EMACS=t" is bogus; can you fix it somehow?

I don't think it's bogus.  Autoconf looks for EMACS.  It's exactly what
`./config.status --recheck' will set as well (with or without my patch),
if the original `configure' was called from within emacs.

Blame the editor if you think that's wrong.  :-)

> 4.  The documentation change could be tightened up a bit.  How about
> this instead?  But it needs a further improvement: a brief explanation
> as to why the two commands are equivalent.

Would a cross reference to the corresponding section suffice, or
do you think we need to explain how shell quoting works?

Updated patch below, with other comments addressed.


        * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): New option
        `--config' for config.status, to output the configuration command
        suitable for reuse with `eval'.
        * NEWS, doc/autoconf.texi (config.status Invocation): Document it.

Index: NEWS
RCS file: /cvsroot/autoconf/autoconf/NEWS,v
retrieving revision 1.340
diff -u -r1.340 NEWS
--- NEWS        14 May 2005 18:33:30 -0000      1.340
+++ NEWS        20 May 2005 09:35:19 -0000
@@ -50,6 +50,9 @@
   as in `${LIBOBJDIR}alloca.o'.  LIBOBJDIR is meant to be defined from
   `' in case the object files lie in a different directory.
+** config.status 
+  Supports --config now to allow extraction of the current configuration.
 * Major changes in Autoconf 2.59b
   Released 2004-08-20, by Paul Eggert.
Index: doc/autoconf.texi
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.898
diff -u -r1.898 autoconf.texi
--- doc/autoconf.texi   14 May 2005 18:33:30 -0000      1.898
+++ doc/autoconf.texi   20 May 2005 09:35:20 -0000
@@ -13847,6 +13848,26 @@
 @itemx -V
 Print the version number of Autoconf and exit.
address@hidden --config
+Print the command to recreate the current configuration, quoted for use
+inside a shell @code{eval}.  For example, the following two commands are
+equivalent, @pxref{Automatic Remaking}.
+eval `./config.status --config`
+./config.status --recheck && ./config.status
address@hidden example
+To build a slightly different configuration, you can edit the output of
address@hidden/config-status --config} and pass the result as an argument to
address@hidden  For example:
+set x `./config.status --config`
+shift; shift
+./configure "$@@" CFLAGS='-g'
address@hidden example
 @item --silent
 @itemx --quiet
 @itemx -q
Index: lib/autoconf/status.m4
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.56
diff -u -r1.56 status.m4
--- lib/autoconf/status.m4      17 May 2005 09:29:05 -0000      1.56
+++ lib/autoconf/status.m4      20 May 2005 09:35:20 -0000
@@ -1371,6 +1371,7 @@
   -h, --help       print this help, then exit
   -V, --version    print version number, then exit
+      --config     print configuration
   -q, --quiet      do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
@@ -1407,11 +1408,13 @@
+ac_cs_config="`echo "$ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`"
 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl
-configured by $[0], generated by m4_PACKAGE_STRING,
-  with options \\"`echo "$ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`\\"
+configured by \$ac_cs_configure, generated by m4_PACKAGE_STRING,
+  with options \\"\$ac_cs_config\\"
 Copyright (C) 2005 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
@@ -1456,6 +1459,8 @@
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
     echo "$ac_cs_version"; exit ;;
+  --config | --conf* )
+    echo "$ac_cs_configure $ac_cs_config"; exit  ;;
   --he | --h)
     # Conflict between --help and --header
     AC_MSG_ERROR([ambiguous option: $[1]

reply via email to

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