From: Akim Demaille Date: Fri, 3 Oct 2003 07:30:01 +0000 (+0000) Subject: * lib/autom4te.in (Autoreconf-preselections): Trace AC_CONFIG_AUX_DIR. X-Git-Tag: AUTOCONF-2.57g~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69148bc4e5d82c3c53fe1041ad919405be9d5f2f;p=thirdparty%2Fautoconf.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 6dcf2550..b4945c40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-10-03 Akim Demaille + + * 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. + 2003-10-03 Akim Demaille * configure.ac: Quotation and formatting changes. diff --git a/NEWS b/NEWS index 97448611..6afa02de 100644 --- a/NEWS +++ b/NEWS @@ -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. diff --git a/bin/autoreconf.in b/bin/autoreconf.in index aa0f2e28..2859cff1 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -423,6 +423,7 @@ sub autoreconf_current_directory () # 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 @@ sub autoreconf_current_directory () . 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 @@ sub autoreconf_current_directory () . ' |'); 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/; @@ -470,6 +473,24 @@ sub autoreconf_current_directory () 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: $!"; + } + + # -------------------- # # Running libtoolize. # # -------------------- # diff --git a/lib/autom4te.in b/lib/autom4te.in index 30c97441..7cb868a1 100644 --- a/lib/autom4te.in +++ b/lib/autom4te.in @@ -61,6 +61,7 @@ end-language: "Automake-preselections" ## -------------------------- ## begin-language: "Autoreconf-preselections" +args: --preselect AC_CONFIG_AUX_DIR args: --preselect AC_CONFIG_HEADERS args: --preselect AC_CONFIG_SUBDIRS args: --preselect AC_INIT