aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Balbi2013-04-12 08:33:52 -0500
committerFelipe Balbi2013-04-12 08:33:52 -0500
commitd720632aeb223de652ca6935fc286c5f1d2da949 (patch)
treebd8706bac3baea8a007b62c26fe05b6bfc834402
parent6f472b3d6c9a96ddc55467010696a394fd6bcbf3 (diff)
downloadti-agile-manual-d720632aeb223de652ca6935fc286c5f1d2da949.tar.gz
ti-agile-manual-d720632aeb223de652ca6935fc286c5f1d2da949.tar.xz
ti-agile-manual-d720632aeb223de652ca6935fc286c5f1d2da949.zip
Makefile improvements
Output is a lot more terse and running make multiple times won't remake if it's not necessary to. Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--Makefile35
1 files changed, 27 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 8679222..273acf9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,32 @@
1PDFLATEX ?= $(shell which pdflatex)
2BIBTEX ?= $(shell which bibtex)
3VIEWER ?= $(shell which evince)
4
5OPTS = -halt-on-error -file-line-error \
6 -interaction=batchmode
7
8SOURCE = ti-agile-methodology-manual.tex
9PDF = $(SOURCE:.tex=.pdf)
10
11V = @
12Q = $(V:1=)
13QUIET_BIBTEX = $(Q:@=@echo ' BIBTEX '$@;)
14QUIET_LATEX = $(Q:@=@echo ' LATEX '$@;)
15QUIET_CLEAN = $(Q:@=@echo ' CLEAN '$@;)
16QUIET_VIEW = $(Q:@=@echo ' VIEW '$@;)
17
1all: pdf 18all: pdf
2 19
3pdf: 20pdf: $(PDF)
4 pdflatex ti-agile-methodology-manual.tex 21
5 bibtex ti-agile-methodology-manual.aux 22$(PDF): $(SOURCE)
6 pdflatex ti-agile-methodology-manual.tex 23 $(QUIET_LATEX) $(PDFLATEX) $(OPTS) $<
7 pdflatex ti-agile-methodology-manual.tex 24 $(QUIET_BIBTEX) $(BIBTEX) $(<:.tex=.aux)
25 $(QUIET_LATEX) $(PDFLATEX) $(OPTS) $<
26 $(QUIET_LATEX) $(PDFLATEX) $(OPTS) $<
8 27
9view: pdf 28view: $(PDF)
10 evince ti-agile-methodology-manual.pdf 29 $(QUIET_VIEW) $(VIEWER) $(PDF)
11 30
12clean: 31clean:
13 @rm -f *.log *.aux *.lot *.lof *.toc *.tex~ *.pdf *.out *.idx *.href *.url *.bbl *.blg 32 $(QUIET_CLEAN) rm -f *.log *.aux *.lot *.lof *.toc *.tex~ *.pdf *.out *.idx *.href *.url *.bbl *.blg