diff options
author | Felipe Balbi | 2013-04-12 08:33:52 -0500 |
---|---|---|
committer | Felipe Balbi | 2013-04-12 08:33:52 -0500 |
commit | d720632aeb223de652ca6935fc286c5f1d2da949 (patch) | |
tree | bd8706bac3baea8a007b62c26fe05b6bfc834402 | |
parent | 6f472b3d6c9a96ddc55467010696a394fd6bcbf3 (diff) | |
download | ti-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-- | Makefile | 35 |
1 files changed, 27 insertions, 8 deletions
@@ -1,13 +1,32 @@ | |||
1 | PDFLATEX ?= $(shell which pdflatex) | ||
2 | BIBTEX ?= $(shell which bibtex) | ||
3 | VIEWER ?= $(shell which evince) | ||
4 | |||
5 | OPTS = -halt-on-error -file-line-error \ | ||
6 | -interaction=batchmode | ||
7 | |||
8 | SOURCE = ti-agile-methodology-manual.tex | ||
9 | PDF = $(SOURCE:.tex=.pdf) | ||
10 | |||
11 | V = @ | ||
12 | Q = $(V:1=) | ||
13 | QUIET_BIBTEX = $(Q:@=@echo ' BIBTEX '$@;) | ||
14 | QUIET_LATEX = $(Q:@=@echo ' LATEX '$@;) | ||
15 | QUIET_CLEAN = $(Q:@=@echo ' CLEAN '$@;) | ||
16 | QUIET_VIEW = $(Q:@=@echo ' VIEW '$@;) | ||
17 | |||
1 | all: pdf | 18 | all: pdf |
2 | 19 | ||
3 | pdf: | 20 | pdf: $(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 | ||
9 | view: pdf | 28 | view: $(PDF) |
10 | evince ti-agile-methodology-manual.pdf | 29 | $(QUIET_VIEW) $(VIEWER) $(PDF) |
11 | 30 | ||
12 | clean: | 31 | clean: |
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 |