OK, I`ve finally learned enough automake to correct the `make install`
in separate build directory problem.  It all has to do with letting
VPATH do its thing by giving it automatic variables to work with.

BTW, doing a `bin/make-patch` from the build directory doesn`t work.

Here it is:

Generated by make-patch, old = lilypond-0.1.56, new = 
/tmp/make-patch/lilypond-0.1.56.ag1

usage 

        cd lilypond-source-dir; patch -E -p0 < patch-0.1.56.ag1

Patches do not contain automatically generated files, 
i.e. you should rerun configure

diff -urN ../lilypond-0.1.56/NEWS ./NEWS
--- ../lilypond-0.1.56/NEWS     Sun Apr 12 02:17:20 1998
+++ ./NEWS      Tue Apr 14 18:19:59 1998
@@ -1,3 +1,6 @@
+pl 56.ag1
+        - `Makefile.am.wild's now should work correctly with VPATH
+ 
 pl 56
        - more dutch vocabulary
        - Barnumber FAQ added
diff -urN ../lilypond-0.1.56/VERSION ./VERSION
--- ../lilypond-0.1.56/VERSION  Fri Apr 10 02:49:37 1998
+++ ./VERSION   Tue Apr 14 17:26:56 1998
@@ -1,7 +1,7 @@
 MAJOR_VERSION=0
 MINOR_VERSION=1
 PATCH_LEVEL=56
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=ag1
 
 # now used as shell script in configure too
 # leave no spaces around the equal signs!
diff -urN ../lilypond-0.1.56/bin/wild-perl ./bin/wild-perl
--- ../lilypond-0.1.56/bin/wild-perl    Mon Apr  6 23:36:31 1998
+++ ./bin/wild-perl     Tue Apr 14 15:14:00 1998
@@ -45,5 +45,5 @@
 
 print "\$(srcdir)/Makefile.am: \$(srcdir)/Makefile.am.wild\n" .
 #    "\t\$(PERL) $my_topsrcdir/bin/wild-perl --top-srcdir=\"\$(real_topsrcdir)\" < 
\$< > \$@";
-    "\t\$(PERL) $my_topsrcdir/bin/wild-perl < \$< > \$@\n";
+    "\tcd \$(srcdir) ; \$(PERL) $my_topsrcdir/bin/wild-perl < \$< > \$@\n";
 
diff -urN ../lilypond-0.1.56/flowertest/Makefile.am.wild ./flowertest/Makefile.am.wild
--- ../lilypond-0.1.56/flowertest/Makefile.am.wild      Fri Apr  3 20:52:16 1998
+++ ./flowertest/Makefile.am.wild       Tue Apr 14 15:19:55 1998
@@ -2,7 +2,7 @@
 # title           makefile for flowertest
 # file    flowertest/Makefile.am.wild
 
-bin_PROGRAMS = test
+noinst_PROGRAMS = test
 
 TESTS = $(top_srcdir)/flowertest/check.sh
 
diff -urN ../lilypond-0.1.56/flowertest/Makefile.am.wild~ 
./flowertest/Makefile.am.wild~
diff -urN ../lilypond-0.1.56/init/Makefile.am.wild ./init/Makefile.am.wild
--- ../lilypond-0.1.56/init/Makefile.am.wild    Sun Mar 29 04:18:34 1998
+++ ./init/Makefile.am.wild     Tue Apr 14 15:14:03 1998
@@ -11,10 +11,14 @@
 # clean-local:
 #      rm -f $(TABLES)
 
-install-data-local:
+install-data-local: $(INIFILES)
        $(INSTALL) -d $(datadir)/lilypond/init
-       $(INSTALL) -m 644 $(INIFILES) $(datadir)/lilypond/init
+       $(INSTALL) -m 644 $^ $(datadir)/lilypond/init
 
 uninstall-local:
        for i in $(INIFILES) ; do rm -f $(datadir)/lilypond/init/$$i; done
        -rmdir $(datadir)/lilypond/init $(datadir)/lilypond/
+
+# Local Variables: ***
+# mode:makefile ***
+# End: ***
diff -urN ../lilypond-0.1.56/mf/Makefile.am.wild ./mf/Makefile.am.wild
--- ../lilypond-0.1.56/mf/Makefile.am.wild      Fri Apr 10 19:36:36 1998
+++ ./mf/Makefile.am.wild       Tue Apr 14 15:14:09 1998
@@ -35,13 +35,23 @@
 distclean-local:
        -rm -f $(MFDEPS)
 
-install-data-local:
+# This is cut in three parts to allow VPATH to work correctly (using $^).
+install-data-local: install-mffiles install-textables install-lytables
+
+install-mffiles: $(MFFILES)
        $(INSTALL) -d $(MFDIR)/public/lilypond
+       $(INSTALL) -m 644 $^ $(MFDIR)/public/lilypond/
+
+install-textables: $(TEXTABLES)
        $(INSTALL) -d $(TEXDIR)/lilypond
+       $(INSTALL) -m 644 $^ $(TEXDIR)/lilypond
+
+install-lytables: $(LYTABLES)
        $(INSTALL) -d $(datadir)/lilypond/init
-       $(INSTALL) -m 644 $(MFFILES) $(MFDIR)/public/lilypond/
-       $(INSTALL) -m 644 $(TEXTABLES) $(TEXDIR)/lilypond
-       $(INSTALL) -m 644 $(LYTABLES) $(datadir)/lilypond/init/
+       $(INSTALL) -m 644 $^ $(datadir)/lilypond/init/
+
+.PHONY: install-mffiles install-textables install-lytables
+
 
 uninstall-local:
        for i in $(MFFILES) ; do rm -f $(MFDIR)/public/lilypond/$$i; done
@@ -58,3 +68,7 @@
 #
 include $(MFDEPS)
 #
+
+# Local Variables: ***
+# mode:makefile ***
+# End: ***
diff -urN ../lilypond-0.1.56/tex/Makefile.am.wild ./tex/Makefile.am.wild
--- ../lilypond-0.1.56/tex/Makefile.am.wild     Sun Mar 29 04:18:35 1998
+++ ./tex/Makefile.am.wild      Tue Apr 14 15:14:11 1998
@@ -5,10 +5,14 @@
 
 CLEANFILES = $(wildcard feta*.tex)
 
-install-data-local:
+install-data-local: $(TEXFILES)
        $(INSTALL) -d $(TEXDIR)/lilypond
-       $(INSTALL) -m 644 $(TEXFILES) $(TEXDIR)/lilypond/
+       $(INSTALL) -m 644 $^ $(TEXDIR)/lilypond/
 
 uninstall-local:
        for i in $(TEXFILES) ; do rm -f $(TEXDIR)/lilypond/$$i; done
        -rmdir $(TEXDIR)/lilypond/
+
+# Local Variables: ***
+# mode:makefile ***
+# End: ***

Reply via email to