+2004-08-31 Gary V. Vaughan <gary@gnu.org>
+
+ * Makefile.am (clean-ltmain-sh): Remove stale config/ltmain.sh
+ from the build tree that were left behind by previous versions of
+ libtool.
+ ($top_srcdir)/stamp-vcl: Since this rule is already called on
+ every invocation of make, hook clean-ltmain-sh in here too.
+ Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
2004-08-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* bootstrap: Update warning message to reflect having split
## read-only $(top_srcdir), then when the two stamp-vcls differ, distcheck
## will try to update the one in the read-only source tree it makes.
MKSTAMP = $(SHELL) $(top_srcdir)/config/mkstamp
-$(top_srcdir)/stamp-vcl: vcl-tmp ChangeLog
+$(top_srcdir)/stamp-vcl: vcl-tmp clean-ltmain-sh ChangeLog
vcl-tmp:
@set -- `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
echo "$$1" > vcl.tmp; \
|| (echo "Updating stamp-vcl"; cp vcl.tmp $(top_srcdir)/stamp-vcl)
-@rm -f vcl.tmp
+## We used to build ltmain.sh in the build tree, but now it is created
+## in the source tree by bootstrap. This rule removes stale copies from
+## previous builds left behind in the build tree, that would override the
+## source tree version in current builds.
+clean-ltmain-sh:
+ -test $(top_srcdir) == $(top_builddir) || \
+ rm -f $(top_builddir)/config/ltmain.sh
+
# 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