BIBTEXFLAGS:=
MAKEGL?=makeglossaries
MAKEGLFLAGS?=
-MAKEINDEX?=makeindex
-LATEXFLAGS:=-file-line-error -halt-on-error #-no-shell-escape
+MAKEIDX?=makeindex
+MAKEIDXFLAGS?=
+DOT?=dot
+DOTFLAGS?=-Tpng
+LATEXFLAGS:=-file-line-error -halt-on-error
FIGURES:=$(patsubst fig/%.dot,img/%.png,$(wildcard fig/*.dot))
LISTINGS:=$(wildcard listings/*)
$(LATEX) $(LATEXFLAGS) $<
if $(GREP) -q '^\\bibdata{' $(basename $<).aux; then $(BIBTEX) $(BIBTEXFLAGS) $(basename $<); fi
if $(GREP) -q '\@istfilename' $(basename $<).aux; then $(MAKEGL) $(MAKEGLFLAGS) $(basename $<); fi
- if [ -f $(basename $<).idx ]; then $(MAKEINDEX) $(basename $<); fi
+ if [ -f $(basename $<).idx ]; then $(MAKEIDX) $(MAKEIDXFLAGS) $(basename $<); fi
$(LATEX) $(LATEXFLAGS) $< | tee $@
img/%.png: fig/%.dot
- dot -Tpng $< > $@
+ $(DOT) $(DOTFLAGS) $< > $@
clean: $(DOCS:%=clean-%)
$(RM) $(FIGURES)
clean-%:
- $(RM) $(addprefix $(@:clean-%=%).,acn acr alg aux bbl blg fmt glg glo\
- gls ist lof log lol lot mlog out pdf tdo toc)
+ $(RM) $(addprefix $(@:clean-%=%).,acn acr alg aux bbl blg idl idx ilg ind\
+ fmt glg glo gls ist loa lof log lol lot mlog out pdf tdo toc)