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.
This commit is contained in:
parent
16dfe8d7f2
commit
64b8489d54
16
doc/Makefile
16
doc/Makefile
|
@ -87,24 +87,12 @@ functions/library/generated: doc-support/result
|
||||||
ln -rfs ./doc-support/result/function-docs functions/library/generated
|
ln -rfs ./doc-support/result/function-docs functions/library/generated
|
||||||
|
|
||||||
%.section.xml: %.section.md
|
%.section.xml: %.section.md
|
||||||
pandoc $^ -w docbook \
|
pandoc $^ -t docbook \
|
||||||
-f markdown+smart \
|
-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 > $@
|
| cat > $@
|
||||||
|
|
||||||
%.chapter.xml: %.chapter.md
|
%.chapter.xml: %.chapter.md
|
||||||
pandoc $^ -w docbook \
|
pandoc $^ -t docbook \
|
||||||
--top-level-division=chapter \
|
--top-level-division=chapter \
|
||||||
-f markdown+smart \
|
-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 > $@
|
| cat > $@
|
||||||
|
|
Loading…
Reference in New Issue