Skip to content

Commit cecdabc

Browse files
wkingMa Shimiao
authored andcommitted
Makefile: Replace vbatts/pandoc with a PANDOC variable
Defaulting to whichever PANDOC is first in your path. This mirrors the existing DOCKER handling. Folks who want to use the old path can run: $ make PANDOC=vbatts/pandoc ... I'm not sure why 4ee036f (*: printable documents, 2015-12-09, opencontainers#263) went with a variable for 'docker' but a hard-coded path for 'pandoc'. I expect it was just oversight. Signed-off-by: W. Trevor King <[email protected]>
1 parent 4340f0f commit cecdabc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
DOCKER ?= $(shell command -v docker)
3+
PANDOC ?= $(shell command -v pandoc)
34
# These docs are in an order that determines how they show up in the PDF/HTML docs.
45
DOC_FILES := \
56
version.md \
@@ -32,7 +33,7 @@ output/docs.pdf: $(DOC_FILES)
3233
-v $(shell pwd)/:/input/:ro \
3334
-v $(shell pwd)/output/:/output/ \
3435
-u $(shell id -u) \
35-
vbatts/pandoc -f markdown_github -t latex -o /$@ $(patsubst %,/input/%,$(DOC_FILES))
36+
$(PANDOC) -f markdown_github -t latex -o /$@ $(patsubst %,/input/%,$(DOC_FILES))
3637

3738
output/docs.html: $(DOC_FILES)
3839
mkdir -p output/ && \
@@ -42,7 +43,7 @@ output/docs.html: $(DOC_FILES)
4243
-v $(shell pwd)/:/input/:ro \
4344
-v $(shell pwd)/output/:/output/ \
4445
-u $(shell id -u) \
45-
vbatts/pandoc -f markdown_github -t html5 -o /$@ $(patsubst %,/input/%,$(DOC_FILES))
46+
$(PANDOC) -f markdown_github -t html5 -o /$@ $(patsubst %,/input/%,$(DOC_FILES))
4647

4748
code-of-conduct.md:
4849
curl -o $@ https://raw.githubusercontent.com/opencontainers/tob/d2f9d68c1332870e40693fe077d311e0742bc73d/code-of-conduct.md

0 commit comments

Comments
 (0)