sing-alongs/Makefile

45 lines
866 B
Makefile
Raw Normal View History

2012-11-14 09:31:44 +00:00
OUTDIR=out
PDFDIR=pdf
FILE = music_booklet
GITINFO=revision.tex
LILY_PDF = lilypond-book --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"`
2012-11-14 09:31:44 +00:00
.SUFFIXES: .lytex .tex .ly .pdf
VPATH = \
$(CURDIR)/lyrics \
$(CURDIR)/notes \
$(CURDIR)/pdf \
2012-11-14 09:31:44 +00:00
all: book
book: $(OUTDIR) $(PDFDIR) $(GITINFO)
2012-11-14 09:31:44 +00:00
cp headfoot.tex $(OUTDIR)/
cp settings.tex $(OUTDIR)/
cp -r license/ $(OUTDIR)/
2012-11-14 09:31:44 +00:00
cp -r images/ $(OUTDIR)/
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
rm $(GITINFO)
2012-11-14 09:31:44 +00:00
$(OUTDIR):
mkdir -p $(OUTDIR)
$(PDFDIR):
mkdir -p $(PDFDIR)
$(GITINFO): FORCE
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)
FORCE: