Skip to content

Commit

Permalink
*: printable documents
Browse files Browse the repository at this point in the history
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 <vbatts@hashbangbash.com>
  • Loading branch information
vbatts committed Dec 9, 2015
1 parent 8d66fdd commit 4ee036f
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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/ *~

0 comments on commit 4ee036f

Please sign in to comment.