summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6f472b3)
raw | patch | inline | side by side (parent: 6f472b3)
author | Felipe Balbi <balbi@ti.com> | |
Fri, 12 Apr 2013 13:33:52 +0000 (16:33 +0300) | ||
committer | Felipe Balbi <balbi@ti.com> | |
Fri, 12 Apr 2013 13:33:52 +0000 (16:33 +0300) |
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>
multiple times won't remake if it's not necessary
to.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Makefile | patch | blob | history |
diff --git a/Makefile b/Makefile
index 8679222ddb62d7f574b48df4cab564878df38b19..273acf9113db1732aedf8a55938e0e990328c29c 100644 (file)
--- a/Makefile
+++ b/Makefile
+PDFLATEX ?= $(shell which pdflatex)
+BIBTEX ?= $(shell which bibtex)
+VIEWER ?= $(shell which evince)
+
+OPTS = -halt-on-error -file-line-error \
+ -interaction=batchmode
+
+SOURCE = ti-agile-methodology-manual.tex
+PDF = $(SOURCE:.tex=.pdf)
+
+V = @
+Q = $(V:1=)
+QUIET_BIBTEX = $(Q:@=@echo ' BIBTEX '$@;)
+QUIET_LATEX = $(Q:@=@echo ' LATEX '$@;)
+QUIET_CLEAN = $(Q:@=@echo ' CLEAN '$@;)
+QUIET_VIEW = $(Q:@=@echo ' VIEW '$@;)
+
all: pdf
-pdf:
- pdflatex ti-agile-methodology-manual.tex
- bibtex ti-agile-methodology-manual.aux
- pdflatex ti-agile-methodology-manual.tex
- pdflatex ti-agile-methodology-manual.tex
+pdf: $(PDF)
+
+$(PDF): $(SOURCE)
+ $(QUIET_LATEX) $(PDFLATEX) $(OPTS) $<
+ $(QUIET_BIBTEX) $(BIBTEX) $(<:.tex=.aux)
+ $(QUIET_LATEX) $(PDFLATEX) $(OPTS) $<
+ $(QUIET_LATEX) $(PDFLATEX) $(OPTS) $<
-view: pdf
- evince ti-agile-methodology-manual.pdf
+view: $(PDF)
+ $(QUIET_VIEW) $(VIEWER) $(PDF)
clean:
- @rm -f *.log *.aux *.lot *.lof *.toc *.tex~ *.pdf *.out *.idx *.href *.url *.bbl *.blg
+ $(QUIET_CLEAN) rm -f *.log *.aux *.lot *.lof *.toc *.tex~ *.pdf *.out *.idx *.href *.url *.bbl *.blg