]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
maint: pass directory declarations in configure.ac into Makefile.
authorGary V. Vaughan <gary@gnu.org>
Fri, 24 Sep 2010 21:01:56 +0000 (04:01 +0700)
committerGary V. Vaughan <gary@gnu.org>
Sat, 22 Oct 2011 11:36:16 +0000 (18:36 +0700)
* configure.ac (AC_CONFIG_AUX_DIR, LT_CONFIG_LTDL_DIR)
(AC_CONFIG_MACRO_DIR): Append code to these functions to
capture and propagate their directory arguments to Makefile.
* Makefile.am (aux_dir, ltdl_dir, macro_dir): Remove declarations.
* bootstrap (my_sed_trace): Also capture LT_CONFIG_LTDL_DIR into
`$ltdl_dir'.
<Makefile>: Output the extracted values of `aux_dir', `ltdl_dir'
and `macro_dir' at the top of the quick'n'dirty bootstrap
Makefile.

ChangeLog
Makefile.am
bootstrap
configure.ac

index 39326049b2b648c819e05dcbb76e5e2a8c5ad7fb..314a90d2503de5ceaa2fc18579965b2ea6dc4cf0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-23  Gary V. Vaughan  <gary@gnu.org>
+
+       maint: pass directory declarations in configure.ac into Makefile.
+       * configure.ac (AC_CONFIG_AUX_DIR, LT_CONFIG_LTDL_DIR)
+       (AC_CONFIG_MACRO_DIR): Append code to these functions to
+       capture and propagate their directory arguments to Makefile.
+       * Makefile.am (aux_dir, ltdl_dir, macro_dir): Remove declarations.
+       * bootstrap (my_sed_trace): Also capture LT_CONFIG_LTDL_DIR into
+       `$ltdl_dir'.
+       <Makefile>: Output the extracted values of `aux_dir', `ltdl_dir'
+       and `macro_dir' at the top of the quick'n'dirty bootstrap
+       Makefile.
+
 2010-09-26  Gary V. Vaughan  <gary@gnu.org>
 
        maint: factor out ltmain.sh variable deletion.
index 059f50e7d602a3e8ffa71962f6255725f13772db..eeb8aee2a4fc62834147803567a4136c4c309257 100644 (file)
@@ -43,9 +43,6 @@ noinst_LTLIBRARIES    =
 lib_LTLIBRARIES                =
 EXTRA_LTLIBRARIES      =
 
-ltdl_dir               = $(srcdir)/libltdl
-aux_dir                        = $(ltdl_dir)/config
-macro_dir              = $(ltdl_dir)/m4
 m4sh_dir               = $(aux_dir)
 
 LT_M4SH                        = $(M4SH) -B '$(m4sh_dir)'
index ed630f903d0ee18459cbc1d1e37d5b832cda30af..94d3fb6e026f40f0cb5fcc4448864c3bde473123 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -67,10 +67,13 @@ test -f ./configure.ac || {
 # Extract aux_dir and macro_dir from configure.ac:
 lt_tab='       '
 my_sed_traces='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,;
-       /AC_CONFIG_AUX_DIR[^_]/  {
+       /^AC_CONFIG_AUX_DIR[^_]/  {
            s,^.*AC_CONFIG_AUX_DIR([[ '"$lt_tab"']*\([^])]*\).*$,aux_dir=\1,; p;
        };
-       /AC_CONFIG_MACRO_DIR/   {
+       /^LT_CONFIG_LTDL_DIR[^_]/  {
+           s,^.*LT_CONFIG_LTDL_DIR([[ '"$lt_tab"']*\([^])]*\).*$,ltdl_dir=\1,; p;
+       };
+       /^AC_CONFIG_MACRO_DIR/   {
            s,^.*AC_CONFIG_MACRO_DIR([[ '"$lt_tab"']*\([^])]*\).*$,macro_dir=\1,; p;
        };
        d;'
@@ -122,7 +125,12 @@ VERSION=$3
 # Whip up a dirty Makefile:
 makes='Makefile.am libltdl/Makefile.inc'
 rm -f Makefile
-$SED '/^if /,/^endif$/d;/^else$/,/^endif$/d;/^include /d' $makes > Makefile
+{
+  echo "aux_dir        = $aux_dir"
+  echo "ltdl_dir = $ltdl_dir"
+  echo "macro_dir = $macro_dir"
+  $SED '/^if /,/^endif$/d;/^else$/,/^endif$/d;/^include /d' $makes
+} > Makefile
 
 # Building distributed files from configure is bad for automake, so we
 # generate them here, and have Makefile rules to keep them up to date.
index dd217fa9a0e5495e59a7d5fb62c74ea4fb47f7be..ede0fc01ebac19d11974fef1650c4292b29374ac 100644 (file)
@@ -34,6 +34,18 @@ dnl Oldest automake required for bootstrap is below in AM_INIT_AUTOMAKE.
 AC_INIT([GNU Libtool], [2.4.3a], [bug-libtool@gnu.org])
 m4_ifndef([AC_PACKAGE_URL],
          [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/software/libtool/])])
+
+# Since we already declare these directories in this file, save those
+# choices, and push the results into Makefile.am to avoid declaring
+# them in two places making renames error prone, and where copies
+# might get out of sync.
+m4_define([AC_CONFIG_AUX_DIR],
+     m4_defn([AC_CONFIG_AUX_DIR])[AC_SUBST([aux_dir], ['${srcdir}/$1'])])
+m4_define([LT_CONFIG_LTDL_DIR],
+     m4_defn([LT_CONFIG_LTDL_DIR])[AC_SUBST([ltdl_dir], ['${srcdir}/$1'])])
+m4_define([AC_CONFIG_MACRO_DIR],
+     m4_defn([AC_CONFIG_MACRO_DIR])[AC_SUBST([macro_dir], ['${srcdir}/$1'])])
+
 AC_CONFIG_HEADERS([config.h:config-h.in])
 AC_CONFIG_SRCDIR([libtoolize.m4sh])
 LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])