diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-11-18 09:42:59 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-11-18 09:42:59 +0100 |
commit | b0c3bad8340e34062324d74651880c6186991ab8 (patch) | |
tree | a51627f80db0fbe399bab62924f93e20d0d13fc1 | |
parent | 315199114803ca0f1a966e65b481b0cbe9b8fd50 (diff) |
forgor to add makefile in docs folder
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | docs/makefile | 27 |
2 files changed, 27 insertions, 1 deletions
@@ -14,5 +14,4 @@ confui/confui # docs docs/gen/paged.polyfill.js docs/gen/start.html -docs/makefile docs/*.html diff --git a/docs/makefile b/docs/makefile new file mode 100644 index 0000000..a03ae03 --- /dev/null +++ b/docs/makefile @@ -0,0 +1,27 @@ +PANDOC = pandoc +CAT = cat +M4 = m4 +RM = rm -f +CHROME = chromium +CURL = curl + +SRCS = $(wildcard *.md) +HTML_T = $(patsubst %.md,%.html, $(SRCS)) +PDF_T = $(patsubst %.md,%.pdf, $(SRCS)) + +all: $(HTML_T) + +gen/paged.polyfill.js: + $(CURL) -Ls https://unpkg.com/pagedjs/dist/paged.polyfill.js > $@ + +gen/start.html: gen/start.m4 gen/style.css + $(M4) -I gen $< > $@ + +%.html: %.md gen/start.html + $(PANDOC) $< --to=html | $(CAT) gen/start.html - gen/end.html > $@ + +%.pdf: %.html + $(CHROME) --headless --print-to-pdf=$@ $< 2> /dev/null + +clean: + $(RM) $(HTML_T) $(PDF_T) gen/start.html gen/paged.polyfill.js |