summaryrefslogtreecommitdiffstats
path: root/doc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'doc/Makefile')
-rw-r--r--doc/Makefile22
1 files changed, 8 insertions, 14 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 49f361ebb60b..4f520779f5b2 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -39,6 +39,7 @@ out/html/index.html: doc-support/result manual-full.xml style.css highlightjs
mkdir -p out/html/highlightjs/
cp -r highlightjs out/html/
+ cp -r media out/html/
cp ./overrides.css out/html/
cp ./style.css out/html/style.css
@@ -53,6 +54,7 @@ out/epub/manual.epub: manual-full.xml
doc-support/result/epub.xsl \
./manual-full.xml
+ cp -r media out/epub/scratch/OEBPS
cp ./overrides.css out/epub/scratch/OEBPS
cp ./style.css out/epub/scratch/OEBPS
mkdir -p out/epub/scratch/OEBPS/images/callouts/
@@ -87,24 +89,16 @@ functions/library/generated: doc-support/result
ln -rfs ./doc-support/result/function-docs functions/library/generated
%.section.xml: %.section.md
- pandoc $^ -w docbook \
+ pandoc $^ -t docbook \
+ --extract-media=media \
+ --lua-filter=$(PANDOC_LUA_FILTERS_DIR)/diagram-generator.lua \
-f markdown+smart \
- | sed -e 's|<ulink url=|<link xlink:href=|' \
- -e 's|</ulink>|</link>|' \
- -e 's|<sect. id=|<section xml:id=|' \
- -e 's|</sect[0-9]>|</section>|' \
- -e '1s| id=| xml:id=|' \
- -e '1s|\(<[^ ]* \)|\1xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" |' \
| cat > $@
%.chapter.xml: %.chapter.md
- pandoc $^ -w docbook \
+ pandoc $^ -t docbook \
--top-level-division=chapter \
+ --extract-media=media \
+ --lua-filter=$(PANDOC_LUA_FILTERS_DIR)/diagram-generator.lua \
-f markdown+smart \
- | sed -e 's|<ulink url=|<link xlink:href=|' \
- -e 's|</ulink>|</link>|' \
- -e 's|<sect. id=|<section xml:id=|' \
- -e 's|</sect[0-9]>|</section>|' \
- -e '1s| id=| xml:id=|' \
- -e '1s|\(<[^ ]* \)|\1|' \
| cat > $@