autoconf-patches
[Top][All Lists]
Advanced

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

Re: Should -i mkdir?


From: Akim Demaille
Subject: Re: Should -i mkdir?
Date: Fri, 03 Oct 2003 09:32:22 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

 > On Sat, 2003-09-27 at 02:20, Alexandre Duret-Lutz wrote:
 adl> autopoint and libtoolize usually run before automake
 adl> and put things into this directory too.  So if some tools has to
 adl> create the directory, I think it should be autopoint.
 >> 
 >> Sorry, I meant "it should be autoreconf".

 > /if it's used/

I'm installing the following.  Thanks.

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * lib/autom4te.in (Autoreconf-preselections): Trace AC_CONFIG_AUX_DIR.
        * bin/autoreconf.in (autoreconf_current_directory): Create the
        AUX_DIR if needed, for sake of automake --add-missing etc.
        Suggested by Alexandre Duret-Lutz.
        
Index: NEWS
===================================================================
RCS file: /cvsroot/autoconf/autoconf/NEWS,v
retrieving revision 1.311
diff -u -u -r1.311 NEWS
--- NEWS 1 Oct 2003 10:29:39 -0000 1.311
+++ NEWS 3 Oct 2003 07:28:59 -0000
@@ -1,4 +1,10 @@
-* Major changes in Autoconf 2.57f                       -*- outline -*-
+* Major changes in Autoconf 2.57g                       -*- outline -*-
+
+** autoreconf and auxiliary directory
+  Autoreconf creates the auxiliary directory if needed.  This is
+  especially useful for initial "bootstrapping" of fresh CVS checkouts.
+
+* Major changes in Autoconf 2.57f
 
   Released 2003-10-01, by Akim Demaille.
 
Index: bin/autoreconf.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autoreconf.in,v
retrieving revision 1.119
diff -u -u -r1.119 autoreconf.in
--- bin/autoreconf.in 25 Aug 2003 06:38:39 -0000 1.119
+++ bin/autoreconf.in 3 Oct 2003 07:28:59 -0000
@@ -423,6 +423,7 @@
   # Perform a single trace reading to avoid --force forcing a rerun
   # between two --trace, that's useless.  If there is no AC_INIT, then
   # we are not interested: it looks like a Cygnus thingy.
+  my $aux_dir;
   my $uses_gettext_via_traces;
   my $uses_libtool;
   my $uses_autoheader;
@@ -433,6 +434,7 @@
      . join (' --trace=', '',
             # If you change this list, update the
             # `Autoreconf-preselections' section of autom4te.in.
+            'AC_CONFIG_AUX_DIR:AC_CONFIG_AUX_DIR:\$1',
             'AC_CONFIG_HEADERS',
             'AC_CONFIG_SUBDIRS:AC_CONFIG_SUBDIRS:\$1',
             'AC_INIT',
@@ -442,6 +444,7 @@
      . ' |');
   while ($_ = $traces->getline)
     {
+      $aux_dir = $1                 if /AC_CONFIG_AUX_DIR:(.*)/;
       $uses_autoconf = 1            if /AC_INIT/;
       $uses_gettext_via_traces = 1  if /AM_GNU_GETTEXT/;
       $uses_libtool = 1             if /AC_PROG_LIBTOOL/;
@@ -468,6 +471,24 @@
     if $uses_gettext_via_traces && ! $uses_gettext;
   error "$configure_ac: AM_GNU_GETTEXT_VERSION is used, but not AM_GNU_GETTEXT"
     if $uses_gettext && ! $uses_gettext_via_traces;
+
+
+  # ---------------------------- #
+  # Setting up the source tree.  #
+  # ---------------------------- #
+
+  # libtoolize, automake --add-missing etc. will drop files in the
+  # $AUX_DIR.  But these tools fail to install these files if the
+  # directory itself does not exist, which valid: just imagine a CVS
+  # repository with hand written code only (there is not even a need
+  # for a Makefile.am!).
+
+  if (defined $aux_dir && ! -d $aux_dir)
+    {
+      verb "$configure_ac: creating directory $aux_dir";
+      mkdir $aux_dir
+       or error "cannot create $aux_dir: $!";
+    }
 
 
   # -------------------- #
Index: lib/autom4te.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autom4te.in,v
retrieving revision 1.20
diff -u -u -r1.20 autom4te.in
--- lib/autom4te.in 19 Aug 2003 07:58:37 -0000 1.20
+++ lib/autom4te.in 3 Oct 2003 07:28:59 -0000
@@ -61,6 +61,7 @@
 ## -------------------------- ##
 
 begin-language: "Autoreconf-preselections"
+args: --preselect AC_CONFIG_AUX_DIR
 args: --preselect AC_CONFIG_HEADERS
 args: --preselect AC_CONFIG_SUBDIRS
 args: --preselect AC_INIT




reply via email to

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