X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=Makefile;h=89d89e96840c1ae9baeff9f853a9e80c8f7a515e;hb=d118ff9d857683084065145df45135ef6fa06711;hp=c13b41522930d8df8811c008a95bb5c07398d5d2;hpb=1f80c2e13d24d5617c8256ff64dfa485097f868c;p=msc-thesis1617.git diff --git a/Makefile b/Makefile index c13b415..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/*) @@ -21,13 +20,13 @@ BIBS:=$(wildcard *.tex) all: $(addsuffix .pdf,$(DOCS)) -output/%.fmt: %.pre +%.fmt: %.pre $(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $<)" "&$(LATEX) $<\dump" %.pdf: %.mlog - if $(GREP) -iFq 'Rerun' $<; then $(LATEX) $(LATEXFLAGS) $(basename $<); fi + 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/%.fmt: %.pre 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)