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
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)
# 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])
echo
;;
esac
+AC_SUBST(TIMESTAMP)
pkgdatadir='${datadir}'"/${PACKAGE}"
AC_SUBST(pkgdatadir) dnl automake does not need this, but libtoolize does
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