notebook/Makefile
2023-05-07 19:46:28 +02:00

41 lines
775 B
Makefile

OUT_DIR := out
$(shell mkdir -p $(OUT_DIR))
GRAPHS_DIR := graphs
CONTENTS_DIR := contents
CONTENTS := $(wildcard $(CONTENTS)/*.tex)
GRAPHS := $(wildcard $(GRAPHS_DIR)/*.gv)
GRAPHS_IMG := $(GRAPHS:$(GRAPHS_DIR)/%.gv=$(OUT_DIR)/%.gv.png)
.PHONY: all preview clean references pdf
all: pdf
$(OUT_DIR)/%.gv.png: $(GRAPHS_DIR)/%.gv
dot -Tpng $< -o $@
index: $(OUT_DIR)/main.idx
makeindex $^
references: annexes.bib references.bib
bibtex $(OUT_DIR)/annexes
bibtex $(OUT_DIR)/references
#pdf: $(OUT_DIR)/main.pdf
#$(OUT_DIR)/main.pdf: main.tex $(GRAPHS_IMG) $(CONTENTS)
pdf: main.tex $(GRAPHS_IMG) $(CONTENTS)
pdflatex -output-directory $(OUT_DIR) $^
preview: $(OUT_DIR)/main.pdf
zathura $^
document:
make
make index
make references
make
clean:
rm $(OUT_DIR)/*