-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (22 loc) · 700 Bytes
/
Makefile
File metadata and controls
25 lines (22 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Target *.tex file without the extension
TARGET ?= beamer
BUILD_DIR ?= build
TARGET_FILES = $(wildcard *.tex) \
$(wildcard *.sty) \
$(wildcard res/*.svg) \
$(wildcard res/*.png) \
$(wildcard res/*.jpg) \
$(wildcard res/*.pdf)
$(TARGET).pdf: $(TARGET_FILES)
@mkdir -p $(BUILD_DIR)
@printf '\def\\builddir{$(BUILD_DIR)}' >builddir.def
pdflatex -interaction nonstopmode -shell-escape -output-directory $(BUILD_DIR) $(TARGET).tex
pdflatex -shell-escape -output-directory $(BUILD_DIR) $(TARGET).tex
@mv $(BUILD_DIR)/$(TARGET).pdf .
.PHONY: clean
clean:
@rm -rf $(BUILD_DIR)
@rm -rf builddir.def
.PHONY: clean-all
clean-all: clean
@rm -f $(TARGET).pdf