2012-11-14 09:31:44 +00:00
|
|
|
OUTDIR=out
|
|
|
|
PDFDIR=pdf
|
2013-04-09 12:12:43 +00:00
|
|
|
FILE = music_booklet
|
2013-04-08 18:41:38 +00:00
|
|
|
GITINFO=revision.tex
|
2013-04-17 14:32:28 +00:00
|
|
|
LILY_PDF = lilypond-book --process="lilypond -dinclude-settings=lilysettings.ly" --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
|
2013-04-11 14:06:47 +00:00
|
|
|
REVISIONINFO = `git log -1 --format="%h"`
|
2012-11-14 09:31:44 +00:00
|
|
|
|
|
|
|
.SUFFIXES: .lytex .tex .ly .pdf
|
|
|
|
|
|
|
|
VPATH = \
|
|
|
|
$(CURDIR)/lyrics \
|
|
|
|
$(CURDIR)/notes \
|
2013-04-11 13:47:13 +00:00
|
|
|
$(CURDIR)/pdf \
|
2012-11-14 09:31:44 +00:00
|
|
|
|
|
|
|
all: book
|
|
|
|
|
2013-04-08 18:41:38 +00:00
|
|
|
book: $(OUTDIR) $(PDFDIR) $(GITINFO)
|
2013-04-17 14:32:28 +00:00
|
|
|
cp lilysettings.ly $(OUTDIR)/
|
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)/
|
2013-04-11 09:06:25 +00:00
|
|
|
cp $(GITINFO) $(OUTDIR)/
|
2012-11-14 09:31:44 +00:00
|
|
|
$(LILY_PDF) $(FILE).lytex
|
|
|
|
$(PDF)
|
|
|
|
$(INDEX)
|
|
|
|
$(PDF)
|
|
|
|
cp $(CURDIR)/$(OUTDIR)/$(FILE).pdf $(CURDIR)/$(PDFDIR)/$(FILE).pdf
|
2013-04-11 13:47:13 +00:00
|
|
|
rm $(GITINFO)
|
|
|
|
|
2012-11-14 09:31:44 +00:00
|
|
|
$(OUTDIR):
|
|
|
|
mkdir -p $(OUTDIR)
|
|
|
|
|
|
|
|
$(PDFDIR):
|
|
|
|
mkdir -p $(PDFDIR)
|
2013-04-11 13:47:13 +00:00
|
|
|
|
|
|
|
$(GITINFO): FORCE
|
2013-04-15 13:07:24 +00:00
|
|
|
/bin/echo "\\newcommand{\\revision}{$(REVISIONINFO)}" > $(GITINFO)
|
2012-11-14 09:31:44 +00:00
|
|
|
|
|
|
|
clean:
|
2013-04-11 13:56:38 +00:00
|
|
|
rm -rf $(OUTDIR)
|
2013-04-11 13:47:13 +00:00
|
|
|
|
|
|
|
FORCE:
|