From d0ede6f6c32a099c55bba6a482cb6b69e2befb85 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sat, 21 Jul 2018 17:23:07 +0200 Subject: [PATCH] refactor the Makefile --- projektantrag/Makefile | 16 +++++++++++----- projekthandbuch/Makefile | 16 +++++++++++----- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/projektantrag/Makefile b/projektantrag/Makefile index 63e6bef..768a8b1 100644 --- a/projektantrag/Makefile +++ b/projektantrag/Makefile @@ -1,4 +1,5 @@ -ALL=$(wildcard *.sty *.tex *.org pictures/*.svg pictures/*.eps pictures/*.dot pictures/*.tex pictures/*.puml) +ALL=$(wildcard *.sty *.tex *.org pictures/*.svg pictures/*.eps pictures/*.dot \ + pictures/*.tex pictures/*.puml) PAPER=projektantrag_main.tex SHELL=/bin/bash @@ -7,6 +8,7 @@ FIGURES_EPS=$(wildcard pictures/*.eps) FIGURES_DOT=$(wildcard pictures/*.dot) FIGURES_TEX=$(wildcard pictures/*.tex) FIGURES_PUML=$(wildcard pictures/*.puml) +BIBLIOGRAPHY=$(wildcard general/*.bib) SVG_PDF=$(FIGURES_SVG:.svg=.pdf) EPS_PDF=$(FIGURES_EPS:.eps=.pdf) DOT_PDF=$(FIGURES_DOT:.dot=.pdf) @@ -15,8 +17,10 @@ PUML_PDF=$(FIGURES_PUML:.puml=.svg) all: projektantrag_main.pdf ## Build full thesis (LaTeX + figures) -projektantrag_main.pdf: $(SVG_PDF) $(EPS_PDF) $(DOT_PDF) $(TEX_PDF) $(PUML_PDF) projektantrag.tex general/ibzlogo.pdf - latexmk -quiet -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make $(PAPER) +projektantrag_main.pdf: $(SVG_PDF) $(EPS_PDF) $(DOT_PDF) $(TEX_PDF) \ + $(PUML_PDF) projektantrag.tex general/ibzlogo.pdf $(BIBLIOGRAPHY) + latexmk -quiet -pdf -pdflatex="pdflatex -interaction=nonstopmode" \ + -use-make $(PAPER) clean: ## Clean LaTeX and output figure files latexmk -c @@ -48,10 +52,12 @@ pictures/%.pdf: pictures/%.dot ## Figures for the manuscript dot -Tpdf $< -o $@ pictures/%.pdf: pictures/%.tex ## Figures for the manuscript - latexmk -quiet -pdf -outdir=pictures -pdflatex="pdflatex -interaction=nonstopmode" -use-make $< + latexmk -quiet -pdf -outdir=pictures \ + -pdflatex="pdflatex -interaction=nonstopmode" -use-make $< pictures/%.svg: pictures/%.puml java -jar ~/bin/plantuml.jar -tsvg $< projektantrag.tex: projektantrag.org - emacs -l ~/.emacs.d/init.el --batch --eval="(progn (find-file \"projektantrag.org\") (org-latex-export-to-latex nil nil nil t))" + emacs -l ~/.emacs.d/init.el --batch \ + --eval="(progn (find-file \"projektantrag.org\") (org-latex-export-to-latex nil nil nil t))" diff --git a/projekthandbuch/Makefile b/projekthandbuch/Makefile index 237200e..0343bf6 100644 --- a/projekthandbuch/Makefile +++ b/projekthandbuch/Makefile @@ -1,4 +1,5 @@ -ALL=$(wildcard *.sty *.tex *.org pictures/*.svg pictures/*.eps pictures/*.dot pictures/*.tex pictures/*.puml) +ALL=$(wildcard *.sty *.tex *.org pictures/*.svg pictures/*.eps pictures/*.dot \ + pictures/*.tex pictures/*.puml) PAPER=projekthandbuch_main.tex SHELL=/bin/bash @@ -7,6 +8,7 @@ FIGURES_EPS=$(wildcard pictures/*.eps) FIGURES_DOT=$(wildcard pictures/*.dot) FIGURES_TEX=$(wildcard pictures/*.tex) FIGURES_PUML=$(wildcard pictures/*.puml) +BIBLIOGRAPHY=$(wildcard general/*.bib) SVG_PDF=$(FIGURES_SVG:.svg=.pdf) EPS_PDF=$(FIGURES_EPS:.eps=.pdf) DOT_PDF=$(FIGURES_DOT:.dot=.pdf) @@ -15,8 +17,10 @@ PUML_PDF=$(FIGURES_PUML:.puml=.svg) all: projekthandbuch_main.pdf ## Build full thesis (LaTeX + figures) -projekthandbuch_main.pdf: $(SVG_PDF) $(EPS_PDF) $(DOT_PDF) $(TEX_PDF) $(PUML_PDF) projekthandbuch.tex general/ibzlogo.pdf - latexmk -quiet -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make $(PAPER) +projekthandbuch_main.pdf: $(SVG_PDF) $(EPS_PDF) $(DOT_PDF) $(TEX_PDF) \ + $(PUML_PDF) projekthandbuch.tex general/ibzlogo.pdf $(BIBLIOGRAPHY) + latexmk -quiet -pdf -pdflatex="pdflatex -interaction=nonstopmode" \ + -use-make $(PAPER) clean: ## Clean LaTeX and output figure files latexmk -c @@ -48,10 +52,12 @@ pictures/%.pdf: pictures/%.dot ## Figures for the manuscript dot -Tpdf $< -o $@ pictures/%.pdf: pictures/%.tex ## Figures for the manuscript - latexmk -quiet -pdf -outdir=pictures -pdflatex="pdflatex -interaction=nonstopmode" -use-make $< + latexmk -quiet -pdf -outdir=pictures \ + -pdflatex="pdflatex -interaction=nonstopmode" -use-make $< pictures/%.svg: pictures/%.puml java -jar ~/bin/plantuml.jar -tsvg $< projekthandbuch.tex: projekthandbuch.org - emacs -l ~/.emacs.d/init.el --batch --eval="(progn (find-file \"projekthandbuch.org\") (org-latex-export-to-latex nil nil nil t))" + emacs -l ~/.emacs.d/init.el --batch \ + --eval="(progn (find-file \"projekthandbuch.org\") (org-latex-export-to-latex nil nil nil t))"