summaryrefslogtreecommitdiffstats
path: root/german/makefile
blob: 9b307ce764e0e7c0e239f858a6ce99d6aebbdc6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# file settings
BUILD_DIR 	:= build
DOCUMENT	:= essence_of_german.tex

# tex settings
TEX := xelatex \
		-interaction=nonstopmode \
		-halt-on-error \
		-output-directory=$(BUILD_DIR)

# automated stuff
_DOCUMENT := $(BUILD_DIR)/$(DOCUMENT)
_DOCUMENT_SRC := $(patsubst %.pdf,%.tex,$(DOCUMENT))

# recipes
.PHONY: build_dir
all: $(_DOCUMENT)

$(_DOCUMENT): $(_DOCUMENT_SRC) build_dir
	$(TEX) $<

build_dir:
	mkdir -p $(BUILD_DIR)/tex