summaryrefslogtreecommitdiffstats
path: root/electronics/makefile
blob: 44b9a47e9de3ab26198d3b6dc73f37855caa2ed9 (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 := lualatex \
		-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