summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSimon South <simon@simonsouth.net>2020-10-15 13:13:20 +0200
committerTomas Krizek <tomas.krizek@nic.cz>2020-10-15 13:22:51 +0200
commitb46079037c0a89cd2103b4841abc4b1eea38c7c5 (patch)
tree9a8689c0864574a776e07ba9b29ce5f38a0f4375 /scripts
parentdoc/meson: fix installation with missing info page (diff)
downloadknot-resolver-b46079037c0a89cd2103b4841abc4b1eea38c7c5.tar.xz
knot-resolver-b46079037c0a89cd2103b4841abc4b1eea38c7c5.zip
doc/info: create and install figures
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make-doc.sh23
1 files changed, 20 insertions, 3 deletions
diff --git a/scripts/make-doc.sh b/scripts/make-doc.sh
index 5cc18302..d41e234c 100755
--- a/scripts/make-doc.sh
+++ b/scripts/make-doc.sh
@@ -18,8 +18,25 @@ ${SPHINX} ${@} -b html -d doc/.doctrees doc doc/html
if command -v makeinfo &>/dev/null; then
rm -rf doc/texinfo
- ${SPHINX} ${@} -b texinfo -d doc/.doctrees doc doc/texinfo && \
- make -C doc/texinfo info
+ ${SPHINX} ${@} -b texinfo -d doc/.doctrees doc doc/texinfo
+
+ # Sphinx < 2 doesn't create a separate directory for figures, so if
+ # necessary move them to the correct location and update the references in
+ # the generated Texinfo file
+ if [ ! -d doc/texinfo/knot-resolver-figures ]; then
+ cd doc/texinfo
+ mkdir knot-resolver-figures
+ mv *.png *.svg knot-resolver-figures/
+ sed -e 's/\(@image{\)/\1knot-resolver-figures\//' \
+ knot-resolver.texi > knot-resolver.texi.tmp
+ mv knot-resolver.texi.tmp knot-resolver.texi
+ cd ../..
+ fi
+
+ make -C doc/texinfo info
+
mkdir doc/texinfo/.install
- mv doc/texinfo/knot-resolver.info doc/texinfo/.install/
+ mv doc/texinfo/knot-resolver.info \
+ doc/texinfo/knot-resolver-figures \
+ doc/texinfo/.install/
fi