From 4ee036fcd247ef8c31cf0d8c3dec1ee357f0fe71 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 9 Dec 2015 12:29:50 -0500 Subject: [PATCH] *: printable documents I do not like having this build step of printable documentation depending on pulling a container, but the pandoc+latex combo is a big bundle. This is the minimal and cleanest approach for using these tools, for now. Signed-off-by: Vincent Batts --- Makefile | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..9d5937ec2 --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ + +DOCKER ?= $(shell which docker) +DOC_FILES := \ + README.md \ + code-of-conduct.md \ + principles.md \ + ROADMAP.md \ + implementations.md \ + bundle.md \ + runtime.md \ + runtime-linux.md \ + config.md \ + config-linux.md \ + runtime-config.md \ + runtime-config-linux.md + +docs: pdf html + +pdf: + @mkdir -p output/ && \ + $(DOCKER) run \ + -it \ + --rm \ + -v $(shell pwd)/:/input/:ro \ + -v $(shell pwd)/output/:/output/ \ + -u $(shell id -u) \ + vbatts/pandoc -f markdown_github -t latex -o /output/docs.pdf $(patsubst %,/input/%,$(DOC_FILES)) && \ + ls -sh $(shell readlink -f output/docs.pdf) + +html: + @mkdir -p output/ && \ + $(DOCKER) run \ + -it \ + --rm \ + -v $(shell pwd)/:/input/:ro \ + -v $(shell pwd)/output/:/output/ \ + -u $(shell id -u) \ + vbatts/pandoc -f markdown_github -t html5 -o /output/docs.html $(patsubst %,/input/%,$(DOC_FILES)) && \ + ls -sh $(shell readlink -f output/docs.html) + +clean: + rm -rf output/ *~ +