From: Mart Lubbers Date: Mon, 22 May 2017 07:41:49 +0000 (+0200) Subject: better compilation, leave directory clean X-Git-Tag: hand-in~120 X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=1f80c2e13d24d5617c8256ff64dfa485097f868c;p=msc-thesis1617.git better compilation, leave directory clean --- diff --git a/.gitignore b/.gitignore index bd7a20d..cd32fd5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,2 @@ -*.acn -*.acr -*.alg -*.aux -*.bbl -*.blg -*.fmt -*.glg -*.glo -*.gls -*.ist -*.lof -*.log -*.lol -*.lot -*.out -*.pdf -*.tdo -*.toc -*.xdy +output/* img/fig-* diff --git a/Makefile b/Makefile index 6c581a2..c13b415 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,11 @@ BIBTEX?=bibtex BIBTEXFLAGS:= MAKEGLOSSARIES?=makeglossaries MAKEGLOSSARIESFLAGS?= -LATEXFLAGS:=-file-line-error -halt-on-error -no-shell-escape +LATEXFLAGS:=\ + -file-line-error\ + -halt-on-error\ + -no-shell-escape\ + -output-directory=./output/ FIGURES:=$(addsuffix .png,$(addprefix img/,$(notdir $(basename $(wildcard fig/*.dot))))) LISTINGS:=$(wildcard listings/*) @@ -17,13 +21,13 @@ BIBS:=$(wildcard *.tex) all: $(addsuffix .pdf,$(DOCS)) -%.fmt: %.pre - $(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $@)" "&$(LATEX) $<\dump" +output/%.fmt: %.pre + $(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $<)" "&$(LATEX) $<\dump" %.pdf: %.mlog if $(GREP) -iFq 'Rerun' $<; then $(LATEX) $(LATEXFLAGS) $(basename $<); fi -%.mlog: %.tex %.fmt $(BIBS) $(TEXS) $(FIGURES) $(LISTINGS) +%.mlog: %.tex output/%.fmt $(BIBS) $(TEXS) $(FIGURES) $(LISTINGS) $(LATEX) $(LATEXFLAGS) $< if $(GREP) -q '^\\bibdata{' $(basename $<).aux; then $(BIBTEX) $(BIBTEXFLAGS) $(basename $<); fi if $(GREP) -q '\@istfilename' $(basename $<).aux; then $(MAKEGLOSSARIES) $(MAKEGLOSSARIESFLAGSFLAGS) $(basename $<); fi @@ -33,6 +37,4 @@ img/%.png: fig/%.dot dot -Tpng $< > $@ clean: - $(RM) $(foreach DOC,$(DOCS),$(addprefix $(DOC).,\ - acn acr alg aux bbl blg fmt glg glo gls ist lof log lol lot nav out\ - pdf run.xml snm tdo toc vrb xdy)) $(FIGURES) + $(RM) output/** $(FIGURES) diff --git a/output/.gitkeep b/output/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/thesis.tex b/thesis.tex index a1c50d3..218e2ee 100644 --- a/thesis.tex +++ b/thesis.tex @@ -1,4 +1,4 @@ -%&thesis +%&output/thesis \usepackage[nonumberlist,acronyms]{glossaries} \makeglossaries%