-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
41 lines (29 loc) · 1.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
SHELL=/bin/bash -o pipefail
DOCKER ?= docker
.DEFAULT_GOAL := all
PANDOC_BUILDER_IMAGE ?= "quay.io/dalehamel/pandoc-report-builder"
PWD ?= `pwd`
clean:
rm -rf output
rm -f index.html
.PHONY: doc/build
doc/build:
${DOCKER} run -ti --user `id -u`:`id -g` -v ${PWD}:/app ${PANDOC_BUILDER_IMAGE} /app/scripts/pandoc-build $(FORMATS)
# If docx is shared, this can be used for diffing markdown representation
# of the docx export before and after modifications. Useful for google sharing
output/doc.md:
${DOCKER} run -ti --user `id -u`:`id -g` -v ${PWD}:/app ${PANDOC_BUILDER_IMAGE} pandoc doc.docx -o output/doc.md
index.html:
ln -sf output/doc.html index.html
.PHONY: quirks
quirks:
scripts/tidy
.PHONY: plain
plain:
${DOCKER} run -ti --user `id -u`:`id -g` -v ${PWD}:/app ${PANDOC_BUILDER_IMAGE} /app/scripts/pandoc-build plain
.PHONY: audio
audio: plain
${DOCKER} run -ti --user `id -u`:`id -g` -v ${PWD}:/app ${PANDOC_BUILDER_IMAGE} /app/scripts/make-audio
.PHONY: outputs
outputs: doc/build index.html
all: outputs