summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2020-12-04 20:25:34 +0100
committerJan Tojnar <jtojnar@gmail.com>2020-12-07 23:49:56 +0100
commit64b8489d54439680b55c6aeb4cb58ee5029a2fec (patch)
tree224bff962a8a67e6f3c3a43cd2e4c358227eef5a /doc
parent16dfe8d7f29161d088348d5d42e89ffe91807311 (diff)
doc: clean up makefile
The sectn and ulink hacks are not necessary since pandoc has been defaulting to Docbook 5 for a long time. With the pandoc patches, we can get rid of id→xml:id replacement and xmlns hacks as well.
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile16
1 files changed, 2 insertions, 14 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 49f361ebb60b..570a5d075b31 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -87,24 +87,12 @@ 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 \
-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 \
-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 > $@