X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=Makefile;h=89d89e96840c1ae9baeff9f853a9e80c8f7a515e;hb=d118ff9d857683084065145df45135ef6fa06711;hp=8f9b5518bfdf30ac84deb6a3405a2370b4d33bea;hpb=532b0df9b179dee113aefb25ec9e879ebd8398bb;p=msc-thesis1617.git diff --git a/Makefile b/Makefile index 8f9b551..89d89e9 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,7 @@ MAKEGLOSSARIESFLAGS?= LATEXFLAGS:=\ -file-line-error\ -halt-on-error\ - -no-shell-escape\ - -output-directory=./output/ + -no-shell-escape FIGURES:=$(addsuffix .png,$(addprefix img/,$(notdir $(basename $(wildcard fig/*.dot))))) LISTINGS:=$(wildcard listings/*) @@ -19,15 +18,15 @@ BIBS:=$(wildcard *.tex) .PHONY: all clean .SECONDARY: $(addsuffix .fmt,$(DOCS)) $(FIGURES) -all: $(addprefix output/,$(addsuffix .pdf,$(DOCS))) +all: $(addsuffix .pdf,$(DOCS)) -output/%.fmt: %.pre +%.fmt: %.pre $(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $<)" "&$(LATEX) $<\dump" -output/%.pdf: %.mlog - if $(GREP) -iFq 'Rerun' $<; then $(LATEX) $(LATEXFLAGS) $(basename $<); fi +%.pdf: %.mlog + if grep -Fiq "Rerun" $<; then $(LATEX) $(LATEXFLAGS) $(basename $<); fi -%.mlog: %.tex output/%.fmt $(BIBS) $(TEXS) $(FIGURES) $(LISTINGS) +%.mlog: %.tex %.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 @@ -36,5 +35,9 @@ output/%.pdf: %.mlog img/%.png: fig/%.dot dot -Tpng $< > $@ -clean: - $(RM) output/* $(FIGURES) +clean: $(addprefix clean-,$(DOCS)) + $(RM) -v $(FIGURES) + +clean-%: + $(RM) -v $(addprefix $(@:clean-=).,acn acr alg aux bbl blg fmt glg glo\ + gls ist lof log lol lot out pdf tdo toc)