summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..aca5a38
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+SOURCES=$(wildcard *.ly)
+PARTS=$(SOURCES:.ly=.pdf)
+TDIR=out
+
+book: book.pdf
+
+parts: $(PARTS)
+
+%.pdf: %.ly
+ lilypond --pdf $<
+
+$(TDIR)/book.tex: book.lytex *.ly
+ lilypond-book --output=$(TDIR) --pdf $<
+
+%.pdf: %.tex
+ cd $(@D); pdflatex $(<F)
+
+book.pdf: $(TDIR)/book.pdf
+ cp $< $@
+
+clean:
+ rm -rf *.pdf out