docs: Rename doc
folder to docs
, update outline
This commit is contained in:
parent
45570161d4
commit
fb54bdaf0c
5 changed files with 2 additions and 0 deletions
48
docs/Makefile
Normal file
48
docs/Makefile
Normal file
|
@ -0,0 +1,48 @@
|
|||
MD = $(wildcard src/*.md)
|
||||
DOTS = $(wildcard src/*.dot)
|
||||
ASYS = $(wildcard src/*.asy)
|
||||
PYS = $(wildcard src/img_*.py)
|
||||
PDFS = $(MD:src/%.md=out/%.pdf)
|
||||
|
||||
IMG_PDFS = $(ASYS:src/%.asy=img/%.pdf) $(PYS:src/img_%.py=img/%.pdf) $(DOTS:src/%.dot=img/%.pdf)
|
||||
|
||||
IMGS = $(IMG_PDFS)
|
||||
|
||||
TEMPLATE = eisvogel
|
||||
PDF_ENGINE = xelatex
|
||||
PANDOC = pandoc
|
||||
PANDOC_OPTIONS = -F panflute -F pandoc-citeproc --pdf-engine=$(PDF_ENGINE) --template $(TEMPLATE) -N --standalone --listings
|
||||
|
||||
GRAPHVIZ = dot
|
||||
GRAPHVIZ_OPTIONS = -Tpdf
|
||||
|
||||
ASY = asy
|
||||
ASY_OPTIONS = -noV -f pdf
|
||||
|
||||
PYTHON = python
|
||||
PYTHON_OPTIONS =
|
||||
|
||||
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
|
||||
|
||||
.PHONY: clean all default
|
||||
all: $(PDFS)
|
||||
default: all
|
||||
|
||||
out/%.pdf: src/%.md $(IMGS) Makefile
|
||||
$(PANDOC) $(PANDOC_OPTIONS) -o $@ $<
|
||||
|
||||
img/%.pdf: src/%.dot
|
||||
$(GRAPHVIZ) $(GRAPHVIZ_OPTIONS) -o $@ $<
|
||||
|
||||
img/%.pdf: src/img_%.py
|
||||
$(PYTHON) $(PYTHON_OPTIONS) $< $@
|
||||
|
||||
img/%.pdf: src/%.asy
|
||||
$(ASY) $(ASY_OPTIONS) -o $@ $<
|
||||
|
||||
watch:
|
||||
watchexec -w src -w data -w filters -w Makefile make all
|
||||
|
||||
clean:
|
||||
-rm $(PDFS) $(IMGS)
|
Loading…
Add table
Add a link
Reference in a new issue