Werner LEMBERG wrote:
A limitation is that the directories in `VPATH' are not expanded and
must be given directly (this seems to be undocumented; I'll contact
the GNU make people):
This was my mistake. I forgot about the `shell' function. Here's a
revised version of the Makefile.
Thanks Werner, this is very good. I've added targets according to the
model in your version and it now recompiles only those files that have
changed--almost.
What I can't figure out how to make it do is recompile a score whose
\include "notes.ily" file has changed, something that is much more
likely to happen than the main.ly file. I've added .ily to the list of
suffixes, and I added a line saying that the .ly files depend on .ily
files, but when I touch a .ily file, and the pdf for that part already
exists, it still says "nothing to be done for <target>".
Here's the makefile as it stands:
piece = stamitz
LILY_CMD = lilypond -ddelete-intermediate-files \
-dno-point-and-click
.SUFFIXES: .ly .ily .pdf .midi
curdir = $(shell pwd)
VPATH = $(curdir)/Scores $(curdir)/PDF $(curdir)/Parts $(curdir)/Notes
%.ly: %.ily
%.pdf %.midi: %.ly
cd PDF; $(LILY_CMD) $<
.PHONY: score
score: $(piece).pdf
.PHONY: parts
parts: cello.pdf violinOne.pdf violinTwo.pdf viola.pdf oboes.pdf horn.pdf
.PHONY: movements
movements: $(piece)I.pdf $(piece)II.pdf $(piece)III.pdf $(piece)IV.pdf
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel