]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* configure.ac (APIVERSION): New substituted variable.
authorGary V. Vaughan <gary@gnu.org>
Mon, 15 Nov 2004 00:52:00 +0000 (00:52 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 15 Nov 2004 00:52:00 +0000 (00:52 +0000)
(pkgvdatadir): Ditto.  Versioned data directory.
(pkgvmacrodir): Ditto.  Versioned aclocal directory.
(LN): New check for LN command.
* Makefile.am (aclocal_DATA): Replaced with...
(pkgvmacro_DATA): ...this.
(install-data-local): Remove old shared resources.
(install-exec-hook): Make versioned links to executables.
(uninstall-hook): Remove versioned files.
* libltdl/Makefile.am (ltdldatadir): Redefine in terms of
pkgvdatadir.
* libltdl/loaders/Makefile.am (ltdldatadir): Ditto.
* libtoolize.m4sh: Copy macro files from versioned macro directory
instead of shared aclocal directory.
* doc/libtool.texi: Document it.
* NEWS: Updated.

ChangeLog
Makefile.am
NEWS
configure.ac
doc/libtool.texi
libltdl/Makefile.am
libltdl/loaders/Makefile.am
libtoolize.m4sh

index 013120308326df4446eb021e618a856e2e500c84..a772201a3c219b872216192b6d24b729cb5f5942 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2004-11-14  Gary V. Vaughan  <gary@gnu.org>
+
+       * configure.ac (APIVERSION): New substituted variable.
+       (pkgvdatadir): Ditto.  Versioned data directory.
+       (pkgvmacrodir): Ditto.  Versioned aclocal directory.
+       (LN): New check for LN command.
+       * Makefile.am (aclocal_DATA): Replaced with...
+       (pkgvmacro_DATA): ...this.
+       (install-data-local): Remove old shared resources.
+       (install-exec-hook): Make versioned links to executables.
+       (uninstall-hook): Remove versioned files.
+       * libltdl/Makefile.am (ltdldatadir): Redefine in terms of
+       pkgvdatadir.
+       * libltdl/loaders/Makefile.am (ltdldatadir): Ditto.
+       * libtoolize.m4sh: Copy macro files from versioned macro directory
+       instead of shared aclocal directory.
+       * doc/libtool.texi: Document it.
+       * NEWS: Updated.
+
 2004-11-10  Gary V. Vaughan  <gary@gnu.org>
 
        From James Henstridge <james@jamesh.id.au>:
index 131715d00f0263e8022e7ab805fe6e647dd2be8f..97f25ece91fea49bbb6032f4039f5d44cfbcf12e 100644 (file)
@@ -28,11 +28,12 @@ edit = sed \
        -e 's,@PACKAGE\@,$(PACKAGE),g' \
        -e 's,@SED\@,$(SED),g' \
        -e 's,@VERSION\@,$(VERSION),g' \
-       -e 's,@prefix\@,$(prefix),g' \
-       -e 's,@datadir\@,$(datadir),g' \
-       -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
        -e 's,@aclocaldir\@,$(aclocaldir),g' \
+       -e 's,@datadir\@,$(datadir),g' \
        -e 's,@host_triplet\@,$(host_triplet),g' \
+       -e 's,@pkgvdatadir\@,$(pkgvdatadir),g' \
+       -e 's,@pkgvmacrodir\@,$(pkgvmacrodir),g' \
+       -e 's,@prefix\@,$(prefix),g' \
        -e "s,@configure_input\@,Generated from $$input; do not edit by hand,g"
 
 timestamp = set -- `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
@@ -56,13 +57,13 @@ CLEANFILES = libtool libtoolize \
 # These are required by libtoolize and must be executable when installed.
 # Since _SCRIPTS gets the program transform applied we make them
 # executable by hand
-dist_pkgdata_DATA = config/config.guess config/config.sub config/ltmain.sh
+dist_pkgvdata_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
+# NOTE: Ensure that PKGVMACRO_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 \
+pkgvmacro_DATA = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 \
        m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4
 
 ## We know that $(top_srcdir)/ChangeLog has been edited if stamp-vcl
@@ -182,12 +183,37 @@ configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
        (cd $$dir && $$abs_srcdir/$$dir/configure) || exit 1
 
 install-data-local:
-## Don't install over the top of an old pkgdatadir
+## Don't install over the top of an old pkgvdatadir
+       -rm -rf $(DESTDIR)$(pkgvdatadir)
+## Remove old pkgdatadir
        -rm -rf $(DESTDIR)$(pkgdatadir)
+## Remove old macro definitions
+       -rm -rf $(DESTDIR)$(aclocaldir)/ltdl.m4
+       -rm -rf $(DESTDIR)$(aclocaldir)/libtool.m4
 
 install-data-hook:
-       chmod +x $(DESTDIR)$(pkgdatadir)/config.guess
-       chmod +x $(DESTDIR)$(pkgdatadir)/config.sub
+       chmod +x $(DESTDIR)$(pkgvdatadir)/config.guess
+       chmod +x $(DESTDIR)$(pkgvdatadir)/config.sub
+
+## Make versioned links.  We only run the transform on the root name;
+## then we make a versioned link with the transformed base name.  This
+## seemed like the most reasonable approach.
+install-exec-hook:
+       @$(POST_INSTALL)
+       @for p in $(bin_SCRIPTS); do \
+         f="`echo $$p|sed '$(transform)'`"; \
+         fv="$$f-$(APIVERSION)"; \
+         rm -f $(DESTDIR)$(bindir)/$$fv; \
+         echo " $(LN) $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv"; \
+         $(LN) $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv; \
+       done
+
+uninstall-hook:
+       @for p in $(bin_SCRIPTS); do \
+         f="`echo $$p|sed '$(transform)'`"; \
+         fv="$$f-$(APIVERSION)"; \
+         rm -f $(DESTDIR)$(bindir)/$$fv; \
+       done
 
 ## Ship README.alpha only in alpha release, but renamed to README
 dist-hook:
diff --git a/NEWS b/NEWS
index b9d827822bc8580735b657e13f3c9473bca76ff4..b2ad773cb17b0a6923864979e3953274b2d10805 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,13 @@
 NEWS - list of user-visible changes between releases of GNU Libtool
 
 New in 1.9h: 2004-??-??; CVS version 1.9g, Libtool team:
+* Libtool versions can now be parallel installed, except that only one
+  set of libltdl headers and static libs, and only one manual is retained.
+* In order for this to work, Libtool's aclocal macros are not installed
+  to a shared aclocal dir.  Either change your Makefile.am to use:
+     ACLOCAL_AMFLAGS = -I /usr/share/libtool-1.9g/m4
+  Or change your configure.ac to use:
+     AC_CONFIG_MACRO_DIR([m4])
 \f
 New in 1.9f: 2004-10-23; CVS version 1.9e, Libtool team:
 * Calculate dllsearchpath correctly for wrapper scripts on cygwin.
index c274a8ab0288df8c50916d8f7cf32e30ae1ea975..5106e92e0290d02ac6cecd7bd5f7bedae1ce4a64 100644 (file)
@@ -123,11 +123,19 @@ AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_builddir)/stamp-vcl'])
 ## ------------------------------- ##
 ## Libtool specific configuration. ##
 ## ------------------------------- ##
-pkgdatadir='${datadir}'"/${PACKAGE}"
-AC_SUBST([pkgdatadir]) # automake does not need this, but libtoolize does
 
-aclocaldir='${datadir}/aclocal'
-AC_SUBST([aclocaldir])
+# The API version is the base version.  We must guarantee
+# compatibility for all releases with the same API version.
+# Our current rule is that:
+# * All releases, including the prereleases, in an X.Y series
+#   are compatible.  So 2.0.1c is compatible with 2.0.
+# * Prereleases on the trunk are all incompatible -- 2.1b and 2.1c
+#   aren't the same.
+APIVERSION=`echo "$VERSION" | sed -e 's/^\([[0-9]]*\.[[0-9]]*[[a-z]]*\).*$/\1/'`
+AC_SUBST([APIVERSION])
+AC_SUBST([aclocaldir],   ["\${prefix}/aclocal"])
+AC_SUBST([pkgvdatadir],  ["\${datadir}/$PACKAGE-$APIVERSION"])
+AC_SUBST([pkgvmacrodir], ["\${datadir}/$PACKAGE-$APIVERSION/m4"])
 
 AC_ARG_ENABLE(ltdl-install,
     [AS_HELP_STRING([--disable-ltdl-install], [do not install libltdl])])
@@ -148,6 +156,22 @@ done
 AC_SUBST([DIST_MAKEFILE_LIST])
 
 
+# Test for ln.  We need use it to install the versioned binaries.
+AC_MSG_CHECKING([whether ln works])
+AC_CACHE_VAL([am_cv_prog_ln], [
+rm -f conftest conftest.file
+: >conftest.file
+if ln conftest.file conftest 2>/dev/null; then
+  am_cv_prog_ln=ln
+else
+  am_cv_prog_ln='cp -p'
+fi
+rm -f conftest conftest.file])
+AC_SUBST([LN], [$am_cv_prog_ln])
+result=no
+test "x$am_cv_prog_ln" = xln && result=yes
+AC_MSG_RESULT([$result])
+
 
 ## ---------------- ##
 ## compiler checks. ##
index 151d74987eaf6bbe5674f4b38f12625edf177333..42095e27f0799ba37a6612de3c855523cedf5294 100644 (file)
@@ -2106,6 +2106,16 @@ project, a copy of the relevant macro definitions will be placed in
 your @code{AC_CONFIG_MACRO_DIR}, where @command{aclocal} can reference
 them directly from @file{aclocal.m4}.
 
+Alternatively, if you want to keep all of your macros in a single
+@file{aclocal.m4}, or if you are using an older Automake that doesn't
+support in-tree m4_include, you need to arrange for @command{aclocal}
+to look in the versioned Libtool directory.  One way of doing this is
+to use @code{ACLOCAL_AMFLAGS} in your @file{Makefile.am}:
+
+@example
+ACLOCAL_AMFLAGS += -I $(prefix)/share/libtool-2.0/m4
+@end example
+
 
 @node Distributing
 @section Including libtool in your package
index 53d1cc8734e0e2b588df1f31f4fb5a2585ff8228..ad9e0b0cbb3b9fb37af6a4ca4595600d9ec34416 100644 (file)
@@ -67,7 +67,7 @@ libltdlc_la_LIBADD    = $(libdlloader_la_LIBADD)
 
 ## These are installed as a subdirectory of pkgdatadir so that
 ## libtoolize --ltdl can find them later:
-ltdldatadir            = $(pkgdatadir)/libltdl
+ltdldatadir            = $(pkgvdatadir)/libltdl
 nobase_ltdldata_DATA   = COPYING.LIB Makefile.am README configure.ac \
                          $(libltdl_la_SOURCES) $(libdlloader_la_SOURCES) \
                          lt__dirent.c lt__dirent.h argz_.h argz.c
index 91ece9d9188231cdddb06c9f31609945fa59138d..aded080fa2e717586e10ff4225c0a4f04db04484 100644 (file)
@@ -50,7 +50,7 @@ dld_link_la_LIBADD    = ../libdlloader.la -ldld
 
 ## These are installed as a subdirectory of pkgdatadir so that
 ## libtoolize --ltdl can find them later:
-ltdldatadir            = $(pkgdatadir)/libltdl/loaders
+ltdldatadir            = $(pkgvdatadir)/libltdl/loaders
 ltdldata_DATA          = Makefile.am dld_link.c dlopen.c dyld.c \
                          load_add_on.c loadlibrary.c shl_load.c
 
index b02ae759562f16509060fe67d16797bae36b8d4b..acc8500caf23ba1c975d0f9fe38099ac91994b33 100644 (file)
@@ -79,8 +79,8 @@ libtoolize_flags=
 # Locations for important files:
 prefix=@prefix@
 datadir=@datadir@
-pkgdatadir=@pkgdatadir@
-aclocaldir=@aclocaldir@
+pkgvdatadir=@pkgvdatadir@
+pkgvmacrodir=@pkgvmacrodir@
 auxdir=
 m4dir=
 ltdldir=
@@ -299,8 +299,8 @@ func_scan_files ()
     test -f "$configure_ac" \
         || func_fatal_help "\`$configure_ac' does not exist"
 
-    test -n "`cd $pkgdatadir && ls`" \
-        || func_fatal_error "can not list files in \`$pkgdatadir'"
+    test -n "`cd $pkgvdatadir && ls`" \
+        || func_fatal_error "can not list files in \`$pkgvdatadir'"
 
 
     # Set local variables to reflect contents of configure.ac
@@ -584,10 +584,10 @@ func_config_update ()
 {
   rerun_aclocal=false
 
-  # NOTE: PKGMACRO_FILES must be kept in synch with aclocal_DATA in the
+  # NOTE: PKGVMACRO_FILES must be kept in synch with pkgvmacro_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'
+  pkgvmacro_files='argz.m4:ltoptions.m4:ltsugar.m4:ltversion.m4'
 
   glob_exclude_pkgaux_files='config.guess|config.sub|ltmain.sh'
 
@@ -597,7 +597,7 @@ func_config_update ()
   # Copy all the files from installed libltdl to this project, if the
   # user specified `--ltdl'.
   if test -n "$ltdldir"; then
-    eval func_copy_all_files -r "$pkgdatadir/libltdl" "$ltdldir"
+    eval func_copy_all_files -r "$pkgvdatadir/libltdl" "$ltdldir"
 
     # libtoolize the newly copied libltdl tree
     ( cd "$ltdldir" && "$progpath" $libtoolize_flags ) || exit $EXIT_FAILURE
@@ -609,17 +609,17 @@ func_config_update ()
     func_echo "putting files in AC_CONFIG_AUX_DIR, \`$auxdir'."
   fi
   if $opt_install || $opt_force; then
-    func_copy_all_files "$pkgdatadir" "$auxdir" "$glob_exclude_pkgaux_files"
-    func_config_update "$pkgdatadir/config.guess" "$auxdir/config.guess"
-    test -f "$pkgdatadir/config.sub" \
-      && func_config_update "$pkgdatadir/config.sub" "$auxdir/config.sub"
+    func_copy_all_files "$pkgvdatadir" "$auxdir" "$glob_exclude_pkgaux_files"
+    func_config_update "$pkgvdatadir/config.guess" "$auxdir/config.guess"
+    test -f "$pkgvdatadir/config.sub" \
+      && func_config_update "$pkgvdatadir/config.sub" "$auxdir/config.sub"
   fi
-  func_ltmain_update "$pkgdatadir/ltmain.sh" "$auxdir/ltmain.sh"
+  func_ltmain_update "$pkgvdatadir/ltmain.sh" "$auxdir/ltmain.sh"
 
   # Copy libtool's m4 macros to the macro directory, if they are newer.
   if test -n "$m4dir"; then
-    libtool_m4="$aclocaldir/libtool.m4"
-    ltdl_m4="$aclocaldir/ltdl.m4"
+    libtool_m4="$pkgvmacrodir/libtool.m4"
+    ltdl_m4="$pkgvmacrodir/ltdl.m4"
 
     $opt_quiet || func_echo "putting macros in AC_CONFIG_MACRO_DIR, \`$m4dir'."
 
@@ -632,7 +632,7 @@ func_config_update ()
       func_verbose "Not copying \`$ltdl_m4', libltdl not used."
     fi
 
-    func_copy_some_files "$aclocaldir" "$pkgmacro_files" \
+    func_copy_some_files "$pkgvmacrodir" "$pkgvmacro_files" \
       "$m4dir" func_serial_update
   fi
 }