blob: 08fb33905d1947babcba467f5d24fb9999f23818 (
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_electronics.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
|