Moved user packages and references to subdirectories
This commit is contained in:
42
Makefile
42
Makefile
@ -1,40 +1,44 @@
|
||||
OUT_DIR := out
|
||||
$(shell mkdir -p $(OUT_DIR))
|
||||
GRAPHS_DIR := graphs
|
||||
CONTENTS_DIR := contents
|
||||
REFERENCES_DIR := references
|
||||
|
||||
CONTENTS := $(wildcard $(CONTENTS)/*.tex)
|
||||
REFERENCES := $(wildcard $(REFERENCES_DIR)/*.bib)
|
||||
GRAPHS := $(wildcard $(GRAPHS_DIR)/*.gv)
|
||||
GRAPHS_IMG := $(GRAPHS:$(GRAPHS_DIR)/%.gv=$(OUT_DIR)/%.gv.png)
|
||||
|
||||
.PHONY: all preview clean references pdf
|
||||
|
||||
.PHONY: all
|
||||
all: pdf
|
||||
|
||||
$(OUT_DIR)/%.gv.png: $(GRAPHS_DIR)/%.gv
|
||||
dot -Tpng $< -o $@
|
||||
$(OUT_DIR):
|
||||
@mkdir -v $@
|
||||
|
||||
$(OUT_DIR)/%.gv.png: $(GRAPHS_DIR)/%.gv | $(OUT_DIR)
|
||||
dot -T png $< -o $@
|
||||
|
||||
.PHONY: graphs
|
||||
graphs: $(GRAPHS_IMG)
|
||||
|
||||
.PHONY: index
|
||||
index: $(OUT_DIR)/main.idx
|
||||
makeindex $^
|
||||
|
||||
|
||||
references: annexes.bib references.bib
|
||||
.PHONY: references
|
||||
references: $(REFERENCES)
|
||||
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) $^
|
||||
--inner_pdf:
|
||||
pdflatex -output-directory $(OUT_DIR) main.tex
|
||||
|
||||
preview: $(OUT_DIR)/main.pdf
|
||||
zathura $^
|
||||
.PHONY: pdf
|
||||
pdf: $(GRAPHS_IMG) --inner_pdf references index --inner_pdf
|
||||
|
||||
document:
|
||||
make
|
||||
make index
|
||||
make references
|
||||
make
|
||||
.PHONY: preview
|
||||
preview: pdf
|
||||
@zathura $(OUT_DIR)/main.pdf
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm $(OUT_DIR)/*
|
||||
@rm -frv $(OUT_DIR)
|
||||
|
Reference in New Issue
Block a user