From 270302850711d9deb49c900a294fe882d828bf4f Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Thu, 11 Apr 2013 15:47:13 +0200 Subject: [PATCH] Maybe now the revision commands will work on the build server... --- Makefile | 16 +++++++++------- music_booklet.lytex | 1 + title.tex | 3 +-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 034d78d..f547958 100644 --- a/Makefile +++ b/Makefile @@ -5,13 +5,14 @@ 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 +OUTPUT = `git log -1 --format="%h"` .SUFFIXES: .lytex .tex .ly .pdf VPATH = \ $(CURDIR)/lyrics \ $(CURDIR)/notes \ - $(CURDIR)/pdf \ + $(CURDIR)/pdf \ all: book @@ -26,17 +27,18 @@ book: $(OUTDIR) $(PDFDIR) $(GITINFO) $(INDEX) $(PDF) cp $(CURDIR)/$(OUTDIR)/$(FILE).pdf $(CURDIR)/$(PDFDIR)/$(FILE).pdf - rm $(GITINFO) - + rm $(GITINFO) + $(OUTDIR): mkdir -p $(OUTDIR) $(PDFDIR): mkdir -p $(PDFDIR) - -$(GITINFO): - echo "% Autogenerated, do not edit" > $(GITINFO) - echo "\\newcommand{\\revision}{`git log -1 --format=\"%h\"`}" >> $(GITINFO) + +$(GITINFO): FORCE + echo "\\newcommand{\\revision}{$(OUTPUT)}" > $(GITINFO) clean: rm -rf $(OUTDIR) + +FORCE: diff --git a/music_booklet.lytex b/music_booklet.lytex index 31f17d6..b33379b 100644 --- a/music_booklet.lytex +++ b/music_booklet.lytex @@ -7,6 +7,7 @@ \usepackage{xmpincl} \usepackage{hyperref} +\input{revision.tex} \input{settings.tex} \input{headfoot.tex} diff --git a/title.tex b/title.tex index 17a43a8..ef84328 100644 --- a/title.tex +++ b/title.tex @@ -1,5 +1,4 @@ -\begin{titlepage} - \input{revision.tex} +\begin{titlepage} \begin{center} \includegraphics[width=0.50\textwidth]{images/title.png}\\