2012-11-14 09:31:44 +00:00
|
|
|
OUTDIR=out
|
|
|
|
PDFDIR=pdf
|
|
|
|
FILE = sheet-music_tinwhistle
|
2012-12-26 03:12:55 +00:00
|
|
|
LILY_PDF = lilypond-book --pdf -o $(OUTDIR)
|
2013-04-08 08:13:07 +00:00
|
|
|
PDF=cd $(OUTDIR) && pdflatex --enable-pipes --shell-escape $(FILE).tex
|
2012-12-26 03:12:55 +00:00
|
|
|
INDEX=cd $(OUTDIR) && makeindex $(FILE).tex
|
2012-11-14 09:31:44 +00:00
|
|
|
|
|
|
|
.SUFFIXES: .lytex .tex .ly .pdf
|
|
|
|
|
|
|
|
VPATH = \
|
|
|
|
$(CURDIR)/lyrics \
|
|
|
|
$(CURDIR)/notes \
|
2013-03-07 14:42:26 +00:00
|
|
|
$(CURDIR)/pdf \
|
2012-11-14 09:31:44 +00:00
|
|
|
|
|
|
|
all: book
|
|
|
|
|
2013-04-08 18:03:27 +00:00
|
|
|
book: $(OUTDIR) $(PDFDIR) revision.tex
|
2012-11-14 09:31:44 +00:00
|
|
|
cp headfoot.tex $(OUTDIR)/
|
2013-03-07 14:42:26 +00:00
|
|
|
cp settings.tex $(OUTDIR)/
|
|
|
|
cp -r license/ $(OUTDIR)/
|
2012-11-14 09:31:44 +00:00
|
|
|
cp -r images/ $(OUTDIR)/
|
|
|
|
$(LILY_PDF) $(FILE).lytex
|
|
|
|
$(PDF)
|
|
|
|
$(INDEX)
|
|
|
|
$(PDF)
|
|
|
|
cp $(CURDIR)/$(OUTDIR)/$(FILE).pdf $(CURDIR)/$(PDFDIR)/$(FILE).pdf
|
|
|
|
|
|
|
|
$(OUTDIR):
|
|
|
|
mkdir -p $(OUTDIR)
|
|
|
|
|
|
|
|
$(PDFDIR):
|
|
|
|
mkdir -p $(PDFDIR)
|
2013-04-08 18:03:27 +00:00
|
|
|
|
|
|
|
revision.tex:
|
|
|
|
echo "% Autogenerated, do not edit" > revision.tex
|
|
|
|
echo "\\newcommand{\\revision}{`git log -1 --format=\"%h\"`}" >> revision.tex
|
2012-11-14 09:31:44 +00:00
|
|
|
|
|
|
|
clean:
|
2013-04-08 18:03:27 +00:00
|
|
|
rm -rf $(OUTDIR)
|