# Copyright 2016, Marcel Großmann # Adjust your base GIT directory relatively to Makefile base := .. # Internal Variables - Touch & Perish # Folder to clone TeXMeta to, relatively to $base meta := $(base)/meta main := thesis bibtexstyles := IEEEtran.bst # TeXMeta location metaurl := "https://github.com/uniba-ktr/TeXMeta.git" MAKE_FILE := $(meta)/Makefile ifeq ($(wildcard $(MAKE_FILE)),) .DEFAULT_GOAL := gitmodules else include $(MAKE_FILE) endif # Internal Targets gitmodules: initialize @test -d $(meta) || git submodule add $(metaurl) $(meta) @git submodule update --init $(meta) @( git add $(meta) && git commit -m "Update meta" ) || true @make prepare initialize: @test -f .prepared || ( git log | grep "Update meta" || rm -rf .git .gitmodules meta ) @test -f .prepared || ( cd $(base) && ( test -d .git || git init ) ) DOTTYPE := pdf LANG := de F := DOT_WILDCARD := images/*.dot .PHONY: fast latex bibtex dot spell spell1 todo fast: pdflatex -synctex=1 -interaction=nonstopmode $(main) bibtex $(main) pdflatex -synctex=1 -interaction=nonstopmode $(main) latex: pdflatex -synctex=1 -interaction=nonstopmode $(main) bibtex: bibtex $(main) multibib: ifneq ("$(wildcard $(main)?.aux)", "") @for i in $(main)?.aux; do bibtex $${i}; done; endif dot: ifneq ("$(wildcard $(DOT_WILDCARD))", "") @for i in $(DOT_WILDCARD); do dot -T$(DOTTYPE) $$i -o $${i%%dot}$(DOTTYPE); done; endif spell: @for i in content/*.tex; do \ aspell -l $(LANG) -c $$i; done spell1: @aspell -l $(LANG) -c content/$(F).tex todo: @grep --color=always -in "TODO" content/*.tex index: makeindex -s config/index.ist $(main) nomecl: makeindex $(main).nlo -s nomencl.ist -o $(main).nls