Skip to content

Commit

Permalink
Makefile: Replace vbatts/pandoc with a PANDOC variable
Browse files Browse the repository at this point in the history
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 <wking@tremily.us>
  • Loading branch information
wking committed May 6, 2016
1 parent 1ac46cb commit dc9daf9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

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

output/docs.html: $(DOC_FILES)
mkdir -p output/ && \
Expand All @@ -42,7 +43,7 @@ output/docs.html: $(DOC_FILES)
-v $(shell pwd)/:/input/:ro \
-v $(shell pwd)/output/:/output/ \
-u $(shell id -u) \
vbatts/pandoc -f markdown_github -t html5 -o /$@ $(patsubst %,/input/%,$(DOC_FILES))
$(PANDOC) -f markdown_github -t html5 -o /$@ $(patsubst %,/input/%,$(DOC_FILES))

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

0 comments on commit dc9daf9

Please sign in to comment.