diff options
author | Simon South <simon@simonsouth.net> | 2020-10-15 13:13:20 +0200 |
---|---|---|
committer | Tomas Krizek <tomas.krizek@nic.cz> | 2020-10-15 13:22:51 +0200 |
commit | b46079037c0a89cd2103b4841abc4b1eea38c7c5 (patch) | |
tree | 9a8689c0864574a776e07ba9b29ce5f38a0f4375 /scripts | |
parent | doc/meson: fix installation with missing info page (diff) | |
download | knot-resolver-b46079037c0a89cd2103b4841abc4b1eea38c7c5.tar.xz knot-resolver-b46079037c0a89cd2103b4841abc4b1eea38c7c5.zip |
doc/info: create and install figures
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/make-doc.sh | 23 |
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 |