libtool-patches
[Top][All Lists]
Advanced

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

FYI: libtool--devo--1.0--patch-103


From: Gary V. Vaughan
Subject: FYI: libtool--devo--1.0--patch-103
Date: Sat, 31 Jul 2004 00:03:44 +0100 (BST)
User-agent: mailnotify/0.3

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Applied to HEAD.
- -- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.5
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)

iD8DBQFBCtPQFRMICSmD1gYRAg7sAKCbhqfGpB5cd10WZvanQu/pjjltUQCbB+xz
M576hhy1PHkSGGWmny65d+M=
=je4i
-----END PGP SIGNATURE-----
* looking for address@hidden/libtool--devo--1.0--patch-102 to compare with
* comparing to address@hidden/libtool--devo--1.0--patch-102
M  ChangeLog
M  Makefile.am
M  README-alpha
M  bootstrap
M  configure.ac
M  config/ltmain.in
=> .arch-ids/ltmain.in.id       config/.arch-ids/ltmain.in.id
=> ltmain.in    config/ltmain.in

* modified files

Index: Changelog
from  Gary V. Vaughan  <address@hidden>

        My thanks to Alexandre Duret-Lutz <address@hidden> for the insight
        required to write this changeset -- especially that ltmain.sh is
        the same on any machine for a given release, which I hadn't
        noticed for some bizarre reason: It turns out that generating
        distributed files from configure causes no end of hassle, as
        evidenced by the many patches I've generated over the last few
        days to try and get the dist and distcheck make rules to work.
        Instead of all that hair, we now simply generate our distributed
        files (now including ltmain.sh) with make rules -- and since
        automake creates make variables for all AC_SUBSTs, that is really
        easy.  The code looks a lot more like automake and autoconf
        Makefile.ams now, and doesn't have all the rough edges the earlier
        hacky solution suffered from.  We still generate libtool from
        config.status, but that is not a distributed file, and doesn't
        break the golden rule.  Besides, there is way more going on there
        than a bunch of substitutions:

        * Makefile.am (edit): New common sed substitutions for files now
        generated by make instead of config.status.
        (CLEANFILES): Clean new tmp files.
        (EXTRA_DIST): Add ltmain.sh.
        (vcl-tmp): Reinstated.
        (m4/ltversion.m4, config/ltmain.sh): New rules.  Generate from
        here instead of config.status.
        (libtoolize): Ditto.
        (libtool): Call config.status to regenerate if necessary.
        (dist-hook): Removed.
        * config/ltmain.in: Moved here from top_srcdir.
        * README-alpha: Update instructions to check AS_SHELL_SANITIZE is
        up to date.
        * bootstrap: Rewritten.  Generate m4/ltversion.m4 and
        config/ltmain.sh because configure depends on them.
        * configure.ac (AC_CONFIG_SRCDIR): Use libtoolize.in now that
        ltmain.in has moved.
        (AC_CONFIG_FILES): Don't generate distributed files,
        config/ltmain.sh and libtoolize from config.status.  We have make
        rules to do that now.

--- orig/Makefile.am
+++ mod/Makefile.am
@@ -19,14 +19,27 @@
 
 ACLOCAL_AMFLAGS  = -I m4
 
+edit =         sed \
+       -e 's,@PACKAGE\@,$(PACKAGE),g' \
+       -e 's,@VERSION\@,$(VERSION),g' \
+       -e 's,@MACRO_VERSION\@,$(VERSION),g' \
+       -e 's,@LN_S\@,$(LN_S),g' \
+       -e 's,@SED\@,$(SED),g' \
+       -e 's,@prefix\@,$(prefix),g' \
+       -e 's,@datadir\@,$(datadir),g' \
+       -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
+       -e 's,@aclocaldir\@,$(aclocaldir),g' \
+       -e "s,@configure_input\@,Generated from $$input; do not edit by hand,g"
+
 BUILD_SUBDIRS = . libltdl doc tests
 SUBDIRS = $(BUILD_SUBDIRS)
 DIST_SUBDIRS = $(BUILD_SUBDIRS)
 
-EXTRA_DIST = bootstrap libtoolize.in ltmain.in config/mkstamp stamp-vcl \
-       ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 ChangeLog.1999 \
+EXTRA_DIST = bootstrap libtoolize.in config/ltmain.in config/mkstamp \
+       stamp-vcl ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 ChangeLog.1999 \
        ChangeLog.2000 ChangeLog.2001 ChangeLog.2002 ChangeLog.2003
-CLEANFILES = libtool libtoolize ltmain.shT
+CLEANFILES = libtool libtoolize \
+       libtoolize.tmp config/ltmain.tmp m4/ltversion.tmp
 
 # These are required by libtoolize and must be executable when installed.
 # Since _SCRIPTS gets the program transform applied we make them
@@ -40,41 +53,69 @@
 aclocal_DATA = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 \
        m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4
 
-# We build ltversion.m4 here, instead of from config.status,
-# because config.status is rerun each time one of configure's
-# dependencies change and ltversion.m4 happens to be a configure
-# dependency.  configure and ltversion.m4 would be rebuilt in
-# a loop otherwise.
-# Use `$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
-# how ltversion.m4 appears in our dependencies.
-EXTRA_DIST += m4/ltversion.in
-$(top_srcdir)/m4/ltversion.m4: $(top_srcdir)/m4/ltversion.in stamp-vcl
-       set `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
-       serial=`echo $$1 | sed 's,^1[.],,g'`; \
-       sed -e "s,address@hidden@],$(VERSION),g" \
-           -e "s,address@hidden@],$$1,g" \
-           -e "s,address@hidden@],$$serial,g" \
-           -e "s,address@hidden@],Generated from ltversion.in; do not edit by 
hand.,g" \
-       $(top_srcdir)/m4/ltversion.in > address@hidden
-       chmod a-w address@hidden
-       mv -f address@hidden $@
-
-# The standalone libtool script, and the libtool distributor.
-bin_SCRIPTS = libtool libtoolize
-
 ## If mkstamp does not match $(srcdir)/stamp-vcl, we still put the new one
 ## in the current dir, incase $(srcdir) is not writable.  The dir selection
 ## at the top of this rule takes care of prefering the right one on
 ## subsequent runs.
 MKSTAMP = $(SHELL) $(top_srcdir)/config/mkstamp
-stamp-vcl: $(top_srcdir)/ChangeLog
+stamp-vcl: vcl-tmp ChangeLog
+vcl-tmp:
        @dir=.; test -f $$dir/stamp-vcl || dir=$(srcdir); \
-       set `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
+       set -- `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
        echo "$$1" > vcl.tmp; \
        cmp -s vcl.tmp $$dir/stamp-vcl \
          || (echo "Updating stamp-vcl"; cp vcl.tmp ./stamp-vcl)
        address@hidden -f vcl.tmp
 
+# We build ltversion.m4 here, instead of from config.status,
+# because config.status is rerun each time one of configure's
+# dependencies change and ltversion.m4 happens to be a configure
+# dependency.  configure and ltversion.m4 would be rebuilt in
+# a loop otherwise.
+# Use `$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
+# how ltversion.m4 appears in our dependencies.
+EXTRA_DIST += m4/ltversion.in
+$(top_srcdir)/m4/ltversion.m4: m4/ltversion.in configure.ac stamp-vcl
+       cd $(top_srcdir); \
+       rm -f m4/ltversion.tmp; \
+       set -- `$(MKSTAMP) < ChangeLog`; \
+       serial=`echo $$1 | sed 's,^1[.],,g'`; \
+       input="ltversion.in"; \
+       $(edit) -e "s,@MACRO_REVISION\@,$$1,g" \
+               -e "s,@MACRO_SERIAL\@,$$serial,g" \
+               m4/ltversion.in > m4/ltversion.tmp; \
+       chmod a-w m4/ltversion.tmp; \
+       mv -f m4/ltversion.tmp $(top_srcdir)/m4/ltversion.m4
+
+## And for similar reasons, ltmain.sh can't be built from config.status.
+EXTRA_DIST += config/ltmain.sh
+$(top_srcdir)/config/ltmain.sh: config/ltmain.in configure.ac stamp-vcl
+       cd $(top_srcdir); \
+       rm -f config/ltmain.tmp; \
+       set -- `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
+       input="ltmain.in"; \
+       $(edit) -e "s,@TIMESTAMP\@,$$1 $$2 $$3,g" \
+               -e "s,@package_revision\@,$$1,g" \
+               config/ltmain.in > config/ltmain.tmp; \
+       chmod a-w config/ltmain.tmp; \
+       mv -f config/ltmain.tmp $(top_srcdir)/config/ltmain.sh
+
+# The libtool distributor and the standalone libtool script.
+bin_SCRIPTS = libtoolize libtool
+
+libtoolize: libtoolize.in Makefile
+       rm -f libtoolize.tmp libtoolize
+       input="libtoolize.in"; \
+       $(edit) $(srcdir)/libtoolize.in > libtoolize.tmp
+       chmod a+x libtoolize.tmp
+       chmod a-w libtoolize.tmp
+       mv -f libtoolize.tmp libtoolize
+
+# Automake doesn't want us to generate distributed files from config.status,
+# but the alternative (see libtool-1.4.3) was even uglier!
+libtool: $(top_builddir)/config.status
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+
 .PHONY: configure-subdirs
 configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
 @DIST_MAKEFILE_LIST@:
@@ -90,25 +131,3 @@
 install-data-hook:
        chmod +x $(DESTDIR)$(pkgdatadir)/config.guess
        chmod +x $(DESTDIR)$(pkgdatadir)/config.sub
-
-## Unlike any other project, libtool builds its own ltmain.sh, so
-## some of the rules generated by automake need to be frobbed in
-## VPATH builds because ltmain.sh ends up in the build tree rather
-## than the source tree:
-$(top_srcdir)/config/ltmain.sh: config/ltmain.sh
-       -dir=$(top_srcdir)/config; \
-       touch $$dir/fnord$$$$ 2>/dev/null || chmod a+w $$dir; \
-       rm -f $$dir/ltmain.sh; \
-       cp config/ltmain.sh $$dir/ltmain.sh; \
-       test -f $$dir/fnord$$$$ && \
-         { rm -f $$dir/fnord$$$$; chmod a-w $$dir $$dir/ltmain.sh; }
-
-## Put it in so that automake doesn't choke on reconf.  We don't
-## really want to distribute this file, but putting it here gives
-## the automake dist rules something to see during `make distcheck':
-EXTRA_DIST += $(top_srcdir)/config/ltmain.sh
-
-## Take it away again so that we don't distribute it by mistake
-## (it is supposed to be generated on the installers machine).
-dist-hook: $(top_srcdir)/config/ltmain.sh
-       -rm -f $(top_distdir)/config/ltmain.sh


--- orig/README-alpha
+++ mod/README-alpha
@@ -88,8 +88,16 @@
 
 * Update NEWS, ChangeLog.
 
+* Make sure the 'Be Bourne compatible' shell snippet near the top of
+  ./libtoolize.in, ./ltmain.in matches the latest autoconf wisdom by
+  updating to match CVS autoconf AS_SHELL_SANITIZE in autoconf's
+  lib/m4sugar/m4sh.m4.
+
 * Run ./bootstrap.
 
+* Have some tea.  If you are running on less than 3.6GHz CPU, order
+  a pizza too ;-)
+
 * Run ./configure and then make.
 
 * Run `make -fMakefile.maint fetch', which will fetch new versions of the


--- orig/bootstrap
+++ mod/bootstrap
@@ -24,6 +24,11 @@
 # better features, and configure.ac documents oldest version of each
 # required for bootstrap (AC_PREREQ, and AM_INIT_AUTOMAKE).
 
+test -f ./configure.ac || {
+  echo "bootstrap: can't find ./configure.ac, please rerun from top_srcdir"
+  exit 1
+}
+
 # Upgrade caveat:
 cat <<'EOF'
 WARNING: If bootstrapping with this script fails, it may be due to an
@@ -39,33 +44,27 @@
 # Delete stale acinclude.m4 from previous libtool versions.
 rm -f acinclude.m4
 
-fakes="config/ltmain.sh config/libtoolize"
 if test -z "$reconfdirs"; then
   reconfdirs=". `ls -1d tests/*demo tests/*demo[0-9]`"
 fi
 
-# Extract the version number from the configure.ac file, and make
-# sure that ltversion.m4 is up to date (preserving the timestamp
-# if possible).
-mv ./m4/ltversion.m4 .ltversion.m4T
-set -- `sed '/AC_INIT/{s/[][,]//g; p;};d' configure.ac`
-make top_srcdir=. VERSION="$2" -f Makefile.am ./m4/ltversion.m4
-if cmp -s ./m4/ltversion.m4 .ltversion.m4T; then
-  rm -f ./m4/ltversion.m4
-  mv .ltversion.m4T ./m4/ltversion.m4
-else
-  rm -f .ltversion.m4T
-fi
+# Extract the package name and version number from configure.ac:
+set -- `sed '/AC_INIT/{s/[][,()]/ /g; p;};d' configure.ac`
+
+# Building distributed files from configure is bad for automake, so we
+# generate them here, and have Makefile rules to keep them up to date:
+rm -f ./config/ltmain.sh ./m4/ltversion.m4
+make -f Makefile.am ./config/ltmain.sh ./m4/ltversion.m4 \
+    top_srcdir=. PACKAGE="$2" VERSION="$3"
 
-for file in $fakes; do
-  cat > $file <<'EOF'
+# Make a dummy libtoolize script for autoreconf:
+cat > ./config/libtoolize <<'EOF'
 #! /bin/sh
 # This is a dummy file for bootstrapping CVS libtool.
 echo "$0: Bootstrap detected, no files installed." | sed 's,^.*/,,g'
 exit 0
 EOF
-  chmod 755 $file
-done
+chmod 755 ./config/libtoolize
 
 # Running the installed `libtoolize' will trash the local (newer) libtool.m4
 # among others.  Call the dummy script we made earlier.
@@ -76,11 +75,10 @@
   autoreconf --force --verbose --install $sub
 done
 
-for file in $fakes; do
-  rm -f $file
-done
+# Remove our dummy libtoolize
+rm -f ./config/libtoolize
 
-# These files con cause an infinite configure loop if left behind.
+# These files can cause an infinite configure loop if left behind.
 rm -f Makefile libltdl/Makefile libtool vcl.tmp
 
 exit 0


--- orig/ltmain.in
+++ mod/config/ltmain.in
@@ -1,5 +1,5 @@
 # ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun configure.
+# @configure_input@
 #
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
 # Free Software Foundation, Inc.


--- orig/configure.ac
+++ mod/configure.ac
@@ -26,7 +26,7 @@
 ## ------------------------ ##
 AC_INIT([libtool], [1.5a], address@hidden)
 AC_CONFIG_HEADERS([config.h:config-h.in])
-AC_CONFIG_SRCDIR([ltmain.in])
+AC_CONFIG_SRCDIR([libtoolize.in])
 AC_CONFIG_AUX_DIR([config])
 
 
@@ -174,8 +174,6 @@
 ## ----------------------- ##
 ## Libtool initialisation. ##
 ## ----------------------- ##
-AC_CONFIG_FILES([config/ltmain.sh:./ltmain.in])
-AC_CONFIG_FILES([libtoolize], [chmod a+x libtoolize])
 LT_INIT([dlopen win32-dll])
 AC_LIB_LTDL
 




reply via email to

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