elaborate on communication
[msc-thesis1617.git] / Makefile
index 410cb11..257238f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ BIBTEX?=bibtex
 BIBTEXFLAGS:=
 MAKEGL?=makeglossaries
 MAKEGLFLAGS?=
+MAKEINDEX?=makeindex
 LATEXFLAGS:=-file-line-error -halt-on-error #-no-shell-escape
 
 FIGURES:=$(patsubst fig/%.dot,img/%.png,$(wildcard fig/*.dot))
@@ -27,6 +28,7 @@ all: $(DOCS:%=%.pdf)
        $(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
        $(LATEX) $(LATEXFLAGS) $< | tee $@
 
 img/%.png: fig/%.dot