sing-alongs/Makefile
Sebastian Hugentobler 823ef62e6a Change the name of the lytex file to the more descriptive
'music_booklet.lytex'
2013-04-09 14:12:43 +02:00

42 lines
861 B
Makefile

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
.SUFFIXES: .lytex .tex .ly .pdf
VPATH = \
$(CURDIR)/lyrics \
$(CURDIR)/notes \
$(CURDIR)/pdf \
all: book
book: $(OUTDIR) $(PDFDIR) $(GITINFO)
cp headfoot.tex $(OUTDIR)/
cp settings.tex $(OUTDIR)/
cp -r license/ $(OUTDIR)/
cp -r images/ $(OUTDIR)/
$(LILY_PDF) $(FILE).lytex
$(PDF)
$(INDEX)
$(PDF)
cp $(CURDIR)/$(OUTDIR)/$(FILE).pdf $(CURDIR)/$(PDFDIR)/$(FILE).pdf
rm revision.tex
$(OUTDIR):
mkdir -p $(OUTDIR)
$(PDFDIR):
mkdir -p $(PDFDIR)
$(GITINFO):
echo "% Autogenerated, do not edit" > $(GITINFO)
echo "\\newcommand{\\revision}{`git log -1 --format=\"%h\"`}" >> $(GITINFO)
clean:
rm -rf $(OUTDIR)