]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtoolize.m4sh (func_massage_pkgvmacro_DATA): New function
authorGary V. Vaughan <gary@gnu.org>
Tue, 15 Mar 2005 12:56:30 +0000 (12:56 +0000)
committerGary V. Vaughan <gary@gnu.org>
Tue, 15 Mar 2005 12:56:30 +0000 (12:56 +0000)
to calculate the macro filenames to be copied by libtoolize.
* Makefile.am (edit): Substitute pkgvmacro_DATA.

ChangeLog
Makefile.am
bootstrap
libtoolize.m4sh

index b3e0443ebb8541a7582c1463a3cb0b4350336ec7..8ff735775feaa15c6c37ab081c93a32d49656a02 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-15  Gary V. Vaughan  <gary@gnu.org>
+
+       * libtoolize.m4sh (func_massage_pkgvmacro_DATA): New function
+       to calculate the macro filenames to be copied by libtoolize.
+       * Makefile.am (edit): Substitute pkgvmacro_DATA.
+
 2005-03-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * m4/libtool.m4 (_LT_COPYING): Update Copyright year.
index 5d3307ca38807c1fcd3e2e8000abbe0a439d2414..c6b59d4e0ded6ec09b7e68fd84542cac87313613 100644 (file)
@@ -1,6 +1,6 @@
 ## Makefile.am -- Process this file with automake to produce Makefile.in
 ##
-## Copyright (C) 2003, 2004 Free Software Foundation
+## Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
 ##
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -32,6 +32,7 @@ edit = sed \
        -e 's,@datadir\@,$(datadir),g' \
        -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
        -e 's,@aclocaldir\@,$(aclocaldir),g' \
+       -e 's,@aclocal_DATA\@,$(aclocal_DATA),g' \
        -e 's,@host_triplet\@,$(host_triplet),g' \
        -e "s,@configure_input\@,Generated from $$input; do not edit by hand,g"
 
@@ -61,8 +62,6 @@ dist_pkgdata_DATA = config/config.guess config/config.sub config/ltmain.sh \
 
 # Everything that gets picked up by aclocal is automatically distributed,
 # this is the list of macro files we install on the user's system.
-# NOTE: Ensure that PKGMACRO_FILES in libtoolize.in is updated if you
-#       change the contents of aclocal_DATA:
 aclocal_DATA = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 \
        m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4
 
index a164041a083375c00a60f682c855017306c6a380..4f34547859aabfa1ffce320c79286af46fea3a68 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,7 +1,7 @@
 #! /bin/sh
 # bootstrap -- Helps bootstrapping libtool, when checked out from CVS.
 #
-# Copyright (C) 2003, 2004 Free Software Foundation
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ rm -rf `find . -path './{arch}' -prune -o \( -name autom4te.cache -o -name libto
 rm -f acinclude.m4 config/ltmain.sh libltdl/config.h
 
 if test -z "$reconfdirs"; then
-  reconfdirs=". `ls -1d tests/*demo tests/*demo[0-9]`"
+  reconfdirs=". libltdl `ls -1d tests/*demo tests/*demo[0-9]`"
 fi
 
 # Extract the package name and version number from configure.ac:
@@ -62,6 +62,14 @@ test -f Makefile || { makefile=Makefile; cp Makefile.am $makefile; }
 make ./config/ltmain.sh ./m4/ltversion.m4 ./libtoolize.in ./tests/defs.in \
     top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="autom4te -l m4sh"
 
+# Create libltdl auxdirs:
+auxdirs="m4 config"
+for dir in $auxdirs; do
+  rm -rf ./libltdl/$dir
+  mkdir ./libltdl/$dir
+done
+cp ./config/ltmain.sh libltdl/config/
+
 test -f clcommit.m4sh && make -f Makefile.maint commit \
     top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="autom4te -l m4sh" \
     SED=sed GREP=grep FGREP=fgrep EGREP=egrep LN_S="ln -s"
@@ -86,8 +94,8 @@ for sub in $reconfdirs; do
   autoreconf --force --verbose --install $sub
 done
 
-# Remove our dummy libtoolize
-rm -f ./config/libtoolize
+# Remove our dummy libtoolize and copied dummy ltmain.sh
+rm -f ./config/libtoolize ./libltdl/config/ltmain.sh
 
 # These files can cause an infinite configure loop if left behind.
 rm -f Makefile libltdl/Makefile libtool vcl.tmp
index f8ac5e07341af9400570ed8c4c3d25a2a341b54f..3cf2441e1c7fff1fc4f8d2092aab946205655e4e 100644 (file)
@@ -745,6 +745,31 @@ func_check_macros ()
     # FIXME: Ensure ltmain.sh, libtool.m4 and ltdl.m4 are from the same release
 }
 
+# func_massage_aclocal_DATA [glob_exclude]
+# @aclocal_DATA\@ is substituted as per its value in Makefile.am; this
+# function massages it into a suitable format for func_copy_some_files.
+func_massage_aclocal_DATA ()
+{
+    pkgmacro_files=     # GLOBAL VAR
+
+    my_glob_exclude="$1"
+
+    # Massage a value for pkgmacro_files from the value used in Makefile.am.
+    for my_filename in @aclocal_DATA@; do
+      my_filename=`$ECHO "X$my_filename" | $Xsed -e "$basename"`
+
+       # ignore excluded filenames
+      if test -n "$my_glob_exclude"; then
+        eval 'case $my_filename in '$my_glob_exclude') continue ;; esac'
+      fi
+
+      pkgmacro_files="$pkgmacro_files:$my_filename"
+    done
+
+    # strip spurious leading `:'
+    pkgmacro_files=`$ECHO "X$pkgmacro_files" | $Xsed -e 's,^:*,,'`
+}
+
 
 ## ----------- ##
 ##    Main.    ##
@@ -753,10 +778,8 @@ func_check_macros ()
 {
   rerun_aclocal=false
 
-  # NOTE: PKGMACRO_FILES must be kept in synch with aclocal_DATA in the
-  #       libtool top_srcdir/Makefile.am (libtool.m4 and ltdl.m4 are handled
-  #       specially below though, so don't add them here):
-  pkgmacro_files='argz.m4:ltoptions.m4:ltsugar.m4:ltversion.m4'
+  # libtool.m4 and ltdl.m4 are handled specially below
+  func_massage_aclocal_DATA 'libtool.m4|ltdl.m4'
 
   glob_exclude_pkgaux_files='config.guess|config.sub|install-sh|ltmain.sh'