2004-07-29 Gary V. Vaughan <gary@gnu.org>
+ * Makefile.am ($(top_srcdir)/config/ltmain.sh): Automake assumes,
+ quite rightly for every project except libtool, that there will be
+ an ltmain.sh in the source tree.
+ (EXTRA_DIST): As do the dist rules it generates.
+ (dist-hook): Even though we definitely don't want to distribute
+ our local ltmain.sh.
+
* config/config.guess, config/config.sub: Don't check these in,
they cause spurious conflicts on cvs commit and update, and are
added by bootstrap in any case.
install-data-hook:
chmod +x $(DESTDIR)$(pkgdatadir)/config.guess
chmod +x $(DESTDIR)$(pkgdatadir)/config.sub
+
+## Unlike any other project, libtool builds its own ltmain.sh, so
+## some of the rules generated by automake need to be frobbed in
+## VPATH builds because ltmain.sh ends up in the build tree rather
+## than the source tree:
+$(top_srcdir)/config/ltmain.sh: config/ltmain.sh
+ cp config/ltmain.sh $(top_srcdir)/config/ltmain.sh
+
+## Put it in so that automake doesn't choke on reconf. We don't
+## really want to distribute this file, but putting it here gives
+## the automake dist rules something to see during `make distcheck':
+EXTRA_DIST += $(top_srcdir)/config/ltmain.sh
+
+## Take it away again so that we don't distribute it by mistake
+## (it is supposed to be generated on the installers machine).
+dist-hook: $(top_srcdir)/config/ltmain.sh
+ -rm -f $(top_distdir)/config/ltmain.sh