Skip to content
Snippets Groups Projects
Commit 92151ca8 authored by Albert Gräf's avatar Albert Gräf
Browse files

Make gendoc make find pandoc on Windows.

parent bd7682b8
No related branches found
No related tags found
1 merge request!835Add document generation for ReadMe.html and Welcome.html
...@@ -11,6 +11,13 @@ html = $(addsuffix .html, $(targets)) ...@@ -11,6 +11,13 @@ html = $(addsuffix .html, $(targets))
# Note: This requires special tools (pandoc, awk). # Note: This requires special tools (pandoc, awk).
all: html all: html
# Check for the official Pandoc package on Windows, so that make will find it.
ifneq (,$(wildcard /c/Program\ Files/Pandoc/pandoc.exe))
pandoc = /c/Program\ Files/Pandoc/pandoc
else
pandoc = pandoc
endif
# NOTE: In pandoc 2.19, --self-contained, which forces the css to be included # NOTE: In pandoc 2.19, --self-contained, which forces the css to be included
# in the html output, is deprecated in favour of --embed-resources. But the # in the html output, is deprecated in favour of --embed-resources. But the
# new option isn't supported in pandoc 2.18, which is still being used a # new option isn't supported in pandoc 2.18, which is still being used a
...@@ -33,7 +40,7 @@ ReadMe-%.md: ReadMe.md ...@@ -33,7 +40,7 @@ ReadMe-%.md: ReadMe.md
ReadMe-%.html: osname = $(patsubst ReadMe-%.html,%,$@) ReadMe-%.html: osname = $(patsubst ReadMe-%.html,%,$@)
ReadMe-%.html: ReadMe-%.md ReadMe-%.html: ReadMe-%.md
pandoc $< -o $@ -M pagetitle="Purr Data $(version) ($(osname))" $(self-contained) --css gh-pandoc.css $(pandoc) $< -o $@ -M pagetitle="Purr Data $(version) ($(osname))" $(self-contained) --css gh-pandoc.css
Welcome-%.md: osname = $(patsubst Welcome-%.md,%,$@) Welcome-%.md: osname = $(patsubst Welcome-%.md,%,$@)
Welcome-%.md: Welcome.md Welcome-%.md: Welcome.md
...@@ -41,7 +48,7 @@ Welcome-%.md: Welcome.md ...@@ -41,7 +48,7 @@ Welcome-%.md: Welcome.md
Welcome-%.html: osname = $(patsubst Welcome-%.html,%,$@) Welcome-%.html: osname = $(patsubst Welcome-%.html,%,$@)
Welcome-%.html: Welcome-%.md Welcome-%.html: Welcome-%.md
pandoc $< -o $@ -M pagetitle="Purr Data $(version) ($(osname))" $(self-contained) --css gh-pandoc.css $(pandoc) $< -o $@ -M pagetitle="Purr Data $(version) ($(osname))" $(self-contained) --css gh-pandoc.css
clean: clean:
rm -f $(markdown) $(html) rm -f $(markdown) $(html)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment