]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* bootstrap: Backed out yesterdays patch which is no longer
authorGary V. Vaughan <gary@gnu.org>
Sun, 17 Sep 2000 00:44:49 +0000 (00:44 +0000)
committerGary V. Vaughan <gary@gnu.org>
Sun, 17 Sep 2000 00:44:49 +0000 (00:44 +0000)
necessary.
* Makefile.am (libtool): Reworked rule for regeneration of libtool,
now that it is built entirely withing config.status.
(libtoolize): Tidied for orthogonality with the other generation
rules.
(ltconfig):  This is now generated by AC_PROG_LIBTOOL, called from
make by running config.status --recheck.
(ltmain.sh): Moved primary generation of this file into here...
* configure.in (AC_OUTPUT): ...instead of here.
* libtool.m4 (AC_OUTPUT_COMMANDS):  Write the config to ltconfig
where it can be reused, rather than directly to libtool.
* demo/configure.in:  libtool is no longer present immediately
after AC_LIBTOOL_M4 has completed, so the tests now grep through
ltconfig instead -- which *will* be present.

ChangeLog
Makefile.am
bootstrap
configure.in
demo/configure.in
libtool.m4

index c13c5b60c478096a403ce0debb2f37ae7c4f89f6..51d2e70f87e531a06e0f190592db9ebd5952e14f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2000-09-17  Gary V. Vaughan  <gvv@techie.com>
+       
+       * bootstrap:  Backed out yesterdays patch which is no longer
+       necessary.
+       * Makefile.am (libtool): Reworked rule for regeneration of libtool,
+       now that it is built entirely withing config.status.
+       (libtoolize): Tidied for orthogonality with the other generation
+       rules.
+       (ltconfig):  This is now generated by AC_PROG_LIBTOOL, called from
+       make by running config.status --recheck.
+       (ltmain.sh): Moved primary generation of this file into here...
+       * configure.in (AC_OUTPUT): ...instead of here.
+       * libtool.m4 (AC_OUTPUT_COMMANDS):  Write the config to ltconfig
+       where it can be reused, rather than directly to libtool.
+       * demo/configure.in:  libtool is no longer present immediately
+       after AC_LIBTOOL_M4 has completed, so the tests now grep through
+       ltconfig instead -- which *will* be present.
+
 2000-09-16  Gary V. Vaughan  <gvv@techie.com>
 
        * TODO: Removed the item describing the change below, and added a
index 9ed57cbc2809c44d5c2a9e0669081e7efb387052..91c50e3f17395b8794c9560deeee247b90b641f1 100644 (file)
@@ -28,14 +28,25 @@ aclocal_DATA = $(aclocal_macros)
 # The standalone libtool script, and the libtool distributor.
 bin_SCRIPTS = libtool libtoolize
 
-libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
-       CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status
-       chmod +x libtoolize
-
-libtool: $(srcdir)/ltmain.sh $(top_builddir)/configure
-       $(top_builddir)/configure --no-recursion
+libtool: ltconfig ltmain.sh $(top_builddir)/configure
+       CONFIG_OTHER=$@ CONFIG_FILES= CONFIG_HEADERS= \
+         $(SHELL) $(top_builddir)/config.status
+       chmod +x $@
 
-@srcdir@/ltmain.sh: $(TSDEPS)
+libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
+       CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) $(top_builddir)/config.status
+       chmod +x $@
+
+ltconfig: $(top_srcdir)/configure.in
+       $(top_builddir)/config.status --recheck
+
+$(srcdir)/ltmain.sh: $(TSDEPS)
+       -rm -f ltmain.shT
+       date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \
+       sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \
+           -e "s%@""TIMESTAMP@%$$date%" $(srcdir)/ltmain.in > ltmain.shT
+       mv -f ltmain.shT $@ || \
+       (rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT)
 
 # TSDEPS will be defined to TSDEPS_DIST at `make dist' time
 TSDEPS =
index 941cb89185df46c4251c7f91eacbd2f5ada19719..6a38f717aef5aafcf06d1215dde41a4b1ca4de11 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -13,7 +13,6 @@ touch ltconfig
 touch libtoolize
 aclocal
 automake --gnu --add-missing --copy
-sed 's/ ltconfig//' < $file > ${file}T && mv ${file}T $file || rm -f ${file}T
 autoconf
 
 for sub in libltdl demo depdemo mdemo cdemo; do
@@ -24,7 +23,6 @@ for sub in libltdl demo depdemo mdemo cdemo; do
   aclocal
   test "$sub" = libltdl && autoheader
   automake --gnits --add-missing
-  sed 's/ ltconfig//' < $file > ${file}T && mv ${file}T $file || rm -f ${file}T
   autoconf
   cd ..
 done
index 0cc7f329c6b500e59ac77db4c52f7c8400cab111..6eaf4f6699c02a9ee6007c3a0409194ff56dbf44 100644 (file)
@@ -66,5 +66,4 @@ done
 AC_SUBST(ACINCLUDE_M4_LIST)
 AC_SUBST(DIST_MAKEFILE_LIST)
 
-AC_OUTPUT([Makefile doc/Makefile tests/Makefile \
-           $ac_aux_dir/ltmain.sh:ltmain.in])
+AC_OUTPUT([Makefile doc/Makefile tests/Makefile])
index 4257eca1bccc1df165a4cf8fb6e23c09720af4bb..7321b76b005731d0bfceb434d88f510c3789f162 100644 (file)
@@ -10,7 +10,7 @@ AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
 AC_SUBST(LIBTOOL_DEPS)
 
-if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
+if grep '^build_old_libs=yes$' ./ltconfig > /dev/null 2>&1; then
   STATIC=-static
 else
   STATIC=
@@ -18,7 +18,7 @@ fi
 AC_SUBST(STATIC)
 
 AM_CONDITIONAL(BINARY_HELLDL, [dnl
-grep '^global_symbol_pipe=..*$' ./libtool >/dev/null])
+grep '^global_symbol_pipe=..*$' ./ltconfig >/dev/null])
 
 AC_CHECK_HEADERS(string.h math.h)
 
index 4d5430f8f0eafffc9da67f13c399e392fa8946eb..91387c405e4b7180c879bd597fad3ae6da1e856d 100644 (file)
@@ -513,7 +513,7 @@ delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 rm="rm -f"
 
 # Global variables:
-default_ofile=libtool
+default_ofile=ltconfig
 can_build_shared=yes
 
 # All known linkers require a `.a' archive for static linking (except M$VC,
@@ -2070,6 +2070,7 @@ need_lc=${ac_cv_archive_cmds_need_lc-yes}
 # Now quote all the things that may contain metacharacters while being
 # careful not to overquote the AC_SUBSTed values, take copies of the
 # variables and quote the copies for generation of the libtool script.
+
 for var in echo old_CC old_CFLAGS \
   AR AR_FLAGS CC LD LN_S NM SHELL \
   reload_flag reload_cmds wl \
@@ -2103,8 +2104,9 @@ for var in echo old_CC old_CFLAGS \
 done
 
 trap "$rm \"$ofile\"; exit 1" 1 2 15
-$rm "$ofile"
+$rm -f "$ofile"
 
+echo creating $ofile
 cat <<__EOF__ > "$ofile"
 #! $SHELL
 
@@ -2586,31 +2588,43 @@ EOF
   ;;
 esac
 
-# Set this here so that when configure calls config.status, the
-# libtool script is generated. The CONFIG_OTHER requirement is to
-# prevent automake rules (for the generation of libtoolize etc.)
-# from appending another copy of ltmain.sh to libtool.
-CONFIG_OTHER=${CONFIG_OTHER-libtool}
+# This is necessary.
+CONFIG_OTHER=libtool
 export CONFIG_OTHER
 
 AC_OUTPUT_COMMANDS([
-  case "$CONFIG_OTHER" in
-  *libtool*)
-    trap "$rm \"$ofile\"; exit 1" 1 2 15
-    echo "creating $ofile"
-
-    # Append the ltmain.sh script.
-    sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
-    # We use sed instead of cat because bash on DJGPP gets confused if
-    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-    # text mode, it properly converts lines to CR/LF.  This bash problem
-    # is reportedly fixed, but why not run on old versions too?
-
-    chmod +x "$ofile"
+  case " $CONFIG_OTHER " in
+  *" $libtool "*)
+    if test -f Makefile; then
+
+      # The second clause should only fire when bootstrapping the
+      # libtool distribution, otherwise you forgot to ship ltmain.sh
+      # with your package, and you will get complaints that there are
+      # no rules to generate ltmain.sh.
+      test -f "$ltmain" || make "$ltmain"
+
+      trap "$rm \"$libtool\"; exit 1" 1 2 15
+      rm -f "$libtool"
+      echo "creating $libtool"
+
+      # Copy the configuration from ltconfig
+      sed '$q' "$ofile" > "$libtool" || (rm -f "$libtool"; exit 1)
+
+      # Append the ltmain.sh script.
+      sed '$q' "$ltmain" >> libtool || (rm -f "$libtool"; exit 1)
+
+      # We use sed instead of cat because bash on DJGPP gets confused if
+      # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+      # text mode, it properly converts lines to CR/LF.  This bash problem
+      # is reportedly fixed, but why not run on old versions too?
+
+      chmod +x "$libtool"
+    fi
     ;;
   esac
 ], [
 ofile="$ofile"
+libtool=libtool
 ltmain="$ltmain"
 ])
 ##