]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* configure.in: Move ltconfig and ltmain.sh generation back...
authorAlexandre Oliva <oliva@lsd.ic.unicamp.br>
Thu, 4 Nov 1999 15:46:07 +0000 (15:46 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Thu, 4 Nov 1999 15:46:07 +0000 (15:46 +0000)
* Makefile.am: here.

ChangeLog
Makefile.am
configure.in

index 127284ff4572d5c180de7366268aebab79570d10..a4e960e71f3da59a2424c32311b82f378760ec78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-11-04  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
+
+       * configure.in: Move ltconfig and ltmain.sh generation back...
+       * Makefile.am: here.
+       
 1999-11-02  Thomas Tanner  <tanner@ffii.org>
 
        * NEWS: updated
index 2b590e103cd545bed3ba247d87213f5e1209b6be..0d2d23928440cee35f1df2f39395b6869240d981 100644 (file)
@@ -66,6 +66,28 @@ 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)
+       rm -f ltconfig.T
+       date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \
+       $(AWK) '/@LINENO@/ { printf "%d:", NR } { print }' $(srcdir)/ltconfig.in | \
+         sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \
+             -e "s%@""TIMESTAMP@%$$date%" \
+             -e '/@LINENO@/s/^\([0-9][0-9]*\):\(.*\)@LINENO@/\2\1/' \
+               > 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 875a2835155a03abe7a7213baacfe372d97887db..7a131f7a9664e52f710610ada57e7a5175c515b5 100644 (file)
@@ -72,53 +72,7 @@ done
 AC_SUBST(ACINCLUDE_M4_LIST)
 AC_SUBST(DIST_MAKEFILE_LIST)
 
-AC_OUTPUT_COMMANDS([
-  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])
+AC_OUTPUT([Makefile doc/Makefile tests/Makefile])
 
 # Local Variables:
 # mode:shell-script