summaryrefslogtreecommitdiffstats
path: root/doc/makefile
blob: 82d46e19f4ef84aba41d3e4e5f66c57e4f8b106b (plain)
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
26
27
28
29
30
31
32
33
# documents 
DOCUMENT := pdi
BIBLIOGRAPHY := pdi

# folder structure settings
BUILD_DIR := build

# resources 
SVGS := $(wildcard res/images/*.svg)
PDFS := $(patsubst %.svg,%.pdf,$(SVGS))

# compiler settings
TEX := texfot lualatex
BIB := biber

# recipes
.PHONY: all build dir clean
all: build

build: $(PDFS) dir
	$(TEX) --output-directory=$(BUILD_DIR) $(DOCUMENT)
	$(BIB) --output-directory=$(BUILD_DIR) $(BIBLIOGRAPHY)
	$(TEX) --output-directory=$(BUILD_DIR) $(DOCUMENT)
	$(TEX) --output-directory=$(BUILD_DIR) $(DOCUMENT)

$(PDFS): res/%.pdf: res/%.svg $(SVGS)
	inkscape -z -D --file=$< --export-pdf=$@

dir:
	mkdir -p $(BUILD_DIR)

clean:
	rm $(BUILD_DIR)/*