sing-alongs/Makefile
Sebastian Hugentobler 288ff19aa8 Staffsize is now centralised in 'lilysettings.ly'.
Caveat: you need to run 'make clean' first for a new staffsize to be
picked up.
2013-04-17 16:32:28 +02:00

46 lines
959 B
Makefile

OUTDIR=out
PDFDIR=pdf
FILE = music_booklet
GITINFO=revision.tex
LILY_PDF = lilypond-book --process="lilypond -dinclude-settings=lilysettings.ly" --pdf -o $(OUTDIR)
PDF=cd $(OUTDIR) && pdflatex --enable-pipes --shell-escape $(FILE).tex
INDEX=cd $(OUTDIR) && makeindex $(FILE).tex
REVISIONINFO = `git log -1 --format="%h"`
.SUFFIXES: .lytex .tex .ly .pdf
VPATH = \
$(CURDIR)/lyrics \
$(CURDIR)/notes \
$(CURDIR)/pdf \
all: book
book: $(OUTDIR) $(PDFDIR) $(GITINFO)
cp lilysettings.ly $(OUTDIR)/
cp headfoot.tex $(OUTDIR)/
cp settings.tex $(OUTDIR)/
cp -r license/ $(OUTDIR)/
cp -r images/ $(OUTDIR)/
cp $(GITINFO) $(OUTDIR)/
$(LILY_PDF) $(FILE).lytex
$(PDF)
$(INDEX)
$(PDF)
cp $(CURDIR)/$(OUTDIR)/$(FILE).pdf $(CURDIR)/$(PDFDIR)/$(FILE).pdf
rm $(GITINFO)
$(OUTDIR):
mkdir -p $(OUTDIR)
$(PDFDIR):
mkdir -p $(PDFDIR)
$(GITINFO): FORCE
/bin/echo "\\newcommand{\\revision}{$(REVISIONINFO)}" > $(GITINFO)
clean:
rm -rf $(OUTDIR)
FORCE: