Skip to content
Snippets Groups Projects
Makefile 768 B
Newer Older
  • Learn to ignore specific revisions
  • Malin Freeborn's avatar
    Malin Freeborn committed
    BOOK = $(shell basename "$$(pwd)")
    
    output: $(BOOK).pdf
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    .PHONY: clean all
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    global: config/bind.sty .switch-gls
    .switch-gls:
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    	@touch -r Makefile .switch-gls
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    config/bind.sty:
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    	@git submodule update --init
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    svg-inkscape: | config/bind.sty
    	@pdflatex -shell-escape -jobname $(BOOK) main.tex
    $(BOOK).glo: | svg-inkscape
    	@pdflatex -jobname $(BOOK) main.tex
    $(BOOK).sls: | $(BOOK).glo
    	@makeglossaries $(BOOK)
    
    $(BOOK).pdf: $(BOOK).sls $(wildcard *.tex) $(wildcard config/*.sty)
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    	@pdflatex -jobname $(BOOK) main.tex
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    all: $(BOOK).pdf
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    	@latexmk -jobname=$(BOOK) -shell-escape -pdf main.tex
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    	rm -fr *.aux *.sls *.slo *.slg *.toc *.acn *.log *.out *.idx *.ist *.glo *.glg *.gls *.acr *.alg \
    
    	*.ilg \
    	*.ind \
    	*.ptc \
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    	*.pdf \
    	svg-inkscape \
    	*.fdb_latexmk \
    	*.fls
    
    Malin Freeborn's avatar
    Malin Freeborn committed