Commit 63fb5967 authored by Jonathan Klamroth's avatar Jonathan Klamroth 🏍
Browse files

update Makefile

parent 81c12ad9
TARGET = thesis
BUILD_DIR = build
LATEXMK_OPTIONS = -pdflatex="pdflatex --shell-escape %O %S"
SRC = $(TARGET).tex $(TARGET).bib
SRC += $(TARGET).cls
......@@ -16,18 +17,18 @@ all: $(BUILD_DIR)/$(TARGET).pdf
.PHONY: prepare
prepare:
[ -d $(BUILD_DIR) ] || mkdir $(BUILD_DIR)
cd $(BUILD_DIR) && for f in $(SRC) ; do ln -sf $(PWD)/$$f . ; done
cd $(BUILD_DIR) && for f in $(SRC) .latexmkrc ; do ln -sf $(PWD)/$$f . ; done
$(BUILD_DIR)/$(TARGET).pdf: prepare $(TARGET).tex
cd $(BUILD_DIR) && latexmk -pdf $(TARGET).tex
cd $(BUILD_DIR) && latexmk $(LATEXMK_OPTIONS) -pdf $(TARGET).tex
.PHONY: preview
preview: prepare
cd $(BUILD_DIR) && latexmk -pdf -pv $(TARGET).tex
cd $(BUILD_DIR) && latexmk $(LATEXMK_OPTIONS) -pdf -pv $(TARGET).tex
.PHONY: livepreview
livepreview: prepare
cd $(BUILD_DIR) && latexmk -pdf -pvc $(TARGET).tex
cd $(BUILD_DIR) && latexmk $(LATEXMK_OPTIONS) -pdf -pvc $(TARGET).tex
.PHONY: clean
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment