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 4ee036fc
(*: printable documents, 2015-12-09, #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>
This commit is contained in:
parent
1ac46cbd9f
commit
dc9daf9e58
5
Makefile
5
Makefile
|
@ -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 \
|
||||
|
@ -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/ && \
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue