]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* configure.in (AC_OUTPUT_COMMANDS): generate ltmain.sh
authorGary V. Vaughan <gary@gnu.org>
Fri, 1 Oct 1999 23:12:15 +0000 (23:12 +0000)
committerGary V. Vaughan <gary@gnu.org>
Fri, 1 Oct 1999 23:12:15 +0000 (23:12 +0000)
* Makefile.am (ltmain.sh ltconfig): removed.  Automake inserts the
rules to automatically call config.status.

ChangeLog
Makefile.am
configure.in

index 1ae2a23a783cf54b941360c344d336fb027584eb..10825539220f4806674e1d9e994bc94d6bf478cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 1999-10-01  Gary V. Vaughan  <gary@oranda.demon.co.uk>
 
+       * configure.in (AC_OUTPUT_COMMANDS): generate ltmain.sh
+       * Makefile.am (ltmain.sh ltconfig): removed.  Automake inserts the 
+       rules to automatically call config.status.
+
        * libtool.m4: be sure to AC_SUBST values no longer tested in
        ltconfig.in.
        * ltconfig.in: replaced several of the simple feature tests with
index 1d9fc0a14b98f247cb8ba053660557aad5bd4f58..bc1847f99a9bee1929b522a794afecdc6e49d179 100644 (file)
@@ -62,30 +62,6 @@ update-timestamps:
                echo "Cannot make dist before commit"; exit 1; else :; fi
        $(MAKE) TSDEPS="$(TSDEPS_DIST)" $(srcdir)/ltconfig $(srcdir)/ltmain.sh
 
-# Do line number substitution, as well as PACKAGE, VERSION and TIMESTAMP.
-# Line numbering transliterated from a section in autoconf (Autoconf 2.12).
-@srcdir@/ltconfig: $(srcdir)/ltconfig.in $(top_srcdir)/configure.in $(TSDEPS)
-       date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \
-       rm -f $(srcdir)/ltconfig.T && \
-       cd $(top_srcdir) && \
-       CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=$(subdir)/$@ \
-       && ./config.status && \
-       $(AWK) '/@LINENO@/ { printf "%d:", NR } { print }' $(srcdir)/ltconfig | \
-         sed -e "s%@""TIMESTAMP@%$$date%" \
-             -e '/@LINENO@/s/^\([0-9][0-9]*\):\(.*\)@LINENO@/\2\1/' \
-               > $(srcdir)/ltconfig.T
-       chmod +x ltconfig.T
-       mv -f ltconfig.T $@ || \
-       (rm -f $@ && cp $ltconfig.T $@ && rm -f ltconfig.T)
-
-@srcdir@/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in $(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)
-
 # All our rules should depend on these demo files.
 all-recursive: $(ACINCLUDE_M4_LIST)
 
index 1fb76486cbdb37cd6c727ed93464aaa4c0ed1dcc..7344ddfa3c1dfe55e2400770dc9e8bd2a8def9e9 100644 (file)
@@ -7,6 +7,7 @@ AM_INIT_AUTOMAKE(libtool, 1.3c)
 # This is a sanity check so we can see which version is used in bug reports.
 # It is assumed that we only want to see the date extension for cvs libtool
 # versions (i.e. "odd" letters) and not actual alpha releases.
+TIMESTAMP=
 case "$VERSION" in
 changequote(,)
   *[acegikmoqsuwy]) 
@@ -23,6 +24,7 @@ changequote([,])
     echo
     ;;
 esac    
+AC_SUBST(TIMESTAMP)
 
 pkgdatadir='${datadir}'"/${PACKAGE}"
 AC_SUBST(pkgdatadir) dnl automake does not need this, but libtoolize does
@@ -71,9 +73,52 @@ AC_SUBST(ACINCLUDE_M4_LIST)
 AC_SUBST(DIST_MAKEFILE_LIST)
 
 AC_OUTPUT_COMMANDS([
-  test -f ${saved_top_srcdir}/ltmain.sh || ${MAKE-make} ${saved_top_srcdir}/ltmain.sh
-], [saved_top_srcdir=${srcdir}])
-AC_OUTPUT([ltconfig Makefile doc/Makefile tests/Makefile])
+  if test -n "$CONFIG_FILES" && test -n "$CONFIG_HEADERS"; then
+    # If both these vars are non-empty, then config.status wasn't run by
+    # automake rules (which always set one or the other to empty).
+    CONFIG_OTHER=${CONFIG_OTHER-ltconfig ltmain.sh}
+  fi
+  case "$CONFIG_FILES" in
+  *ltconfig*)
+    infile=ltconfig.in
+    outfile=ltconfig
+    tmpfile=${outfile}T
+
+    ( cd $top_srcdir
+      rm -f $tmpfile
+      ${AWK} '
+        /@LINENO@/     { sub("@LINENO@", NR); }
+                       { print; }
+      ' $outfile > $tmpfile
+
+      chmod +x $tmpfile
+      rm -f $outfile
+      mv -f $tmpfile $outfile || \
+      (rm -f $outfile && cp $tmpfile $outfile && rm -f $tmpfile)
+    )
+    ;;
+
+  *ltmain.sh*)
+    infile=$top_srcdir/ltmain.in
+    outfile=$top_srcdir/ltmain,sh
+    tmpfile=${outfile}T
+
+    ( cd $top_srcdir
+      rm -f $tmpfile
+      ${AWK} '
+        /@LINENO@/     { sub("@LINENO@", NR); }
+                       { print; }
+      ' $outfile > $tmpfile
+
+      rm -f $outfile
+      mv -f $tmpfile $outfile || \
+      (rm -f $outfile && cp $tmpfile $outfile && rm -f $tmpfile)
+    )
+    ;;
+  esac
+], [top_srcdir=$srcdir; AWK=$AWK])
+
+AC_OUTPUT([Makefile doc/Makefile tests/Makefile  $srcdir/ltconfig:ltconfig.in $srcdir/ltmain.sh:ltmain.in])
 
 # Local Variables:
 # mode:shell-script