Peter Chubb wrote:
Jonathan> What I can't figure out how to make it do is recompile a
Jonathan> score whose \include "notes.ily" file has changed, something
Jonathan> that is much more likely to happen than the main.ly file.
Jonathan> I've added .ily to the list of suffixes, and I added a line
Jonathan> saying that the .ly files depend on .ily files, but when I
Jonathan> touch a .ily file, and the pdf for that part already exists,
Jonathan> it still says "nothing to be done for <target>".


The PDF depends on all the inputs that go to make it ... you need to
tell make about that because it can't work it out on its own.

So:

fred.pdf: fred.ly fred_mvmt1.ily fred_mvmt2.ily


Ok I'm starting to get it. This version works as expected. If I touch any .ly or .ily file, then make will recreate the appropriate pdf.

Does this now resemble something I can make generic and put in the docs? Any GNU Make extensions left in there?

Thanks for being so patient with a makefile noob. :)

Jon
--
Jonathan Kulp
http://www.jonathankulp.com


piece = stamitz
LILY_CMD = lilypond -ddelete-intermediate-files \
                    -dno-point-and-click

notes = cello.ily figures.ily horn.ily oboe.ily trioString.ily viola.ily violinOne.ily violinTwo.ily

MOVEMENTS = $(piece)I.pdf $(piece)II.pdf $(piece)III.pdf $(piece)IV.pdf

.SUFFIXES: .ly .ily .pdf .midi

curdir = $(shell pwd)
VPATH = $(curdir)/Scores $(curdir)/PDF $(curdir)/Parts $(curdir)/Notes

%.pdf %.midi:  %.ly
        cd PDF; $(LILY_CMD) $<

$(piece).pdf: $(notes)

cello.pdf: cello.ly cello.ily figures.ily trioString.ily
horn.pdf: horn.ly horn.ily
oboes.pdf: oboes.ly oboe.ily
viola.pdf: viola.ly viola.ily
violinOne.pdf: violinOne.ly violinOne.ily
violinTwo.pdf: violinTwo.ly violinTwo.ily
$(MOVEMENTS): $(notes)

.PHONY: score
score: $(piece).pdf

.PHONY: parts
parts: cello.pdf violinOne.pdf violinTwo.pdf viola.pdf oboes.pdf horn.pdf

.PHONY: movements
movements: $(MOVEMENTS)


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to