X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=Makefile;h=eadae054df5336eb7205f425c8193f0174f28f39;hb=130cec648788a4660c91ffed6c1c2fb682413055;hp=32587bc6207ddad1ad378f7e29f9c619e55163a6;hpb=6dca5a0ebb686cc11b0cb90f98c3d8347d0b7eeb;p=msc-thesis1617.git diff --git a/Makefile b/Makefile index 32587bc..eadae05 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,10 @@ MAKEGLOSSARIES?=makeglossaries MAKEGLOSSARIESFLAGS?= LATEXFLAGS:=-file-line-error -halt-on-error -no-shell-escape +FIGURES:=$(addsuffix .png,$(addprefix img/,$(notdir $(basename $(wildcard fig/*.dot))))) + .PHONY: all clean -.SECONDARY: $(addsuffix .fmt,$(DOCS)) +.SECONDARY: $(addsuffix .fmt,$(DOCS)) $(FIGURES) all: $(addsuffix .pdf,$(DOCS)) @@ -16,15 +18,18 @@ all: $(addsuffix .pdf,$(DOCS)) $(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $@)" "&$(LATEX) $<\dump" %.pdf: %.mlog - if $(GREP) -iFq 'Rerun to get' $<; then $(LATEX) $(LATEXFLAGS) $(basename $<); fi + if $(GREP) -iFq 'Rerun' $<; then $(LATEX) $(LATEXFLAGS) $(basename $<); fi -%.mlog: %.tex %.fmt $(wildcard *.bib) $(wildcard *.tex) +%.mlog: %.tex %.fmt $(wildcard *.bib) $(wildcard *.tex) $(FIGURES) $(LATEX) $(LATEXFLAGS) $< if $(GREP) -q '^\\bibdata{' $(basename $<).aux; then $(BIBTEX) $(BIBTEXFLAGS) $(basename $<); fi if $(GREP) -q '\@istfilename' $(basename $<).aux; then $(MAKEGLOSSARIES) $(MAKEGLOSSARIESFLAGSFLAGS) $(basename $<); fi $(LATEX) $(LATEXFLAGS) $< | tee $@ +img/%.png: fig/%.dot + dot -Tpng $< > $@ + clean: $(RM) $(foreach DOC,$(DOCS),$(addprefix $(DOC).,\ - acn acr alg aux bbl blg fmt glg glo gls ist log nav out pdf run.xml\ - snm tdo toc vrb xdy)) + 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)