Cleaned up the Makefile.
revision.tex now gets removed after a successful build.
This commit is contained in:
parent
ec49f099af
commit
1284a2fd08
10
Makefile
10
Makefile
@ -1,6 +1,7 @@
|
|||||||
OUTDIR=out
|
OUTDIR=out
|
||||||
PDFDIR=pdf
|
PDFDIR=pdf
|
||||||
FILE = sheet-music_tinwhistle
|
FILE = sheet-music_tinwhistle
|
||||||
|
GITINFO=revision.tex
|
||||||
LILY_PDF = lilypond-book --pdf -o $(OUTDIR)
|
LILY_PDF = lilypond-book --pdf -o $(OUTDIR)
|
||||||
PDF=cd $(OUTDIR) && pdflatex --enable-pipes --shell-escape $(FILE).tex
|
PDF=cd $(OUTDIR) && pdflatex --enable-pipes --shell-escape $(FILE).tex
|
||||||
INDEX=cd $(OUTDIR) && makeindex $(FILE).tex
|
INDEX=cd $(OUTDIR) && makeindex $(FILE).tex
|
||||||
@ -14,7 +15,7 @@ VPATH = \
|
|||||||
|
|
||||||
all: book
|
all: book
|
||||||
|
|
||||||
book: $(OUTDIR) $(PDFDIR) revision.tex
|
book: $(OUTDIR) $(PDFDIR) $(GITINFO)
|
||||||
cp headfoot.tex $(OUTDIR)/
|
cp headfoot.tex $(OUTDIR)/
|
||||||
cp settings.tex $(OUTDIR)/
|
cp settings.tex $(OUTDIR)/
|
||||||
cp -r license/ $(OUTDIR)/
|
cp -r license/ $(OUTDIR)/
|
||||||
@ -24,6 +25,7 @@ book: $(OUTDIR) $(PDFDIR) revision.tex
|
|||||||
$(INDEX)
|
$(INDEX)
|
||||||
$(PDF)
|
$(PDF)
|
||||||
cp $(CURDIR)/$(OUTDIR)/$(FILE).pdf $(CURDIR)/$(PDFDIR)/$(FILE).pdf
|
cp $(CURDIR)/$(OUTDIR)/$(FILE).pdf $(CURDIR)/$(PDFDIR)/$(FILE).pdf
|
||||||
|
rm revision.tex
|
||||||
|
|
||||||
$(OUTDIR):
|
$(OUTDIR):
|
||||||
mkdir -p $(OUTDIR)
|
mkdir -p $(OUTDIR)
|
||||||
@ -31,9 +33,9 @@ $(OUTDIR):
|
|||||||
$(PDFDIR):
|
$(PDFDIR):
|
||||||
mkdir -p $(PDFDIR)
|
mkdir -p $(PDFDIR)
|
||||||
|
|
||||||
revision.tex:
|
$(GITINFO):
|
||||||
echo "% Autogenerated, do not edit" > revision.tex
|
echo "% Autogenerated, do not edit" > $(GITINFO)
|
||||||
echo "\\newcommand{\\revision}{`git log -1 --format=\"%h\"`}" >> revision.tex
|
echo "\\newcommand{\\revision}{`git log -1 --format=\"%h\"`}" >> $(GITINFO)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(OUTDIR)
|
rm -rf $(OUTDIR)
|
||||||
|
Loading…
Reference in New Issue
Block a user