diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-02-03 11:14:24 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-02-03 11:14:24 +0000 |
commit | f31160c7d1b89cfb4dd4001a23575b42141cb0ec (patch) | |
tree | a769e4396e5fcc4134965b3774bb27d5227942ed /scripts/hxtool | |
parent | 035b21977ce1791a630c5cbf46e482e54552e05b (diff) | |
parent | 78813586b04e89639754cfdcef23802dc9f54ff4 (diff) |
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-docs-20200203' into staging
docs:
* Fix Makefile concurrency bug where we could run Sphinx twice
in parallel on the same manual (which makes it crash)
* Support handling hxtool doc fragments for rST manuals
* Convert qemu-img docs to rST
* Convert qemu-trace-stap docs to rST
* Convert virtfs-proxy-helper docs to rST
# gpg: Signature made Mon 03 Feb 2020 11:11:44 GMT
# gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg: issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* remotes/pmaydell/tags/pull-docs-20200203:
virtfs-proxy-helper: Convert documentation to rST
scripts/qemu-trace-stap: Convert documentation to rST
qemu-img-cmds.hx: Remove texinfo document fragments
qemu-img: Convert invocation documentation to rST
qemu-img-cmds.hx: Add rST documentation fragments
docs/sphinx: Add new hxtool Sphinx extension
hxtool: Support SRST/ERST directives
Makefile: Ensure we don't run Sphinx in parallel for manpages
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/hxtool')
-rw-r--r-- | scripts/hxtool | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/scripts/hxtool b/scripts/hxtool index 7d7c4289e3..0003e7b673 100644 --- a/scripts/hxtool +++ b/scripts/hxtool @@ -7,7 +7,7 @@ hxtoh() case $str in HXCOMM*) ;; - STEXI*|ETEXI*) flag=$(($flag^1)) + STEXI*|ETEXI*|SRST*|ERST*) flag=$(($flag^1)) ;; *) test $flag -eq 1 && printf "%s\n" "$str" @@ -27,12 +27,17 @@ print_texi_heading() hxtotexi() { flag=0 + rstflag=0 line=1 while read -r str; do case "$str" in HXCOMM*) ;; STEXI*) + if test $rstflag -eq 1 ; then + printf "line %d: syntax error: expected ERST, found '%s'\n" "$line" "$str" >&2 + exit 1 + fi if test $flag -eq 1 ; then printf "line %d: syntax error: expected ETEXI, found '%s'\n" "$line" "$str" >&2 exit 1 @@ -40,12 +45,38 @@ hxtotexi() flag=1 ;; ETEXI*) + if test $rstflag -eq 1 ; then + printf "line %d: syntax error: expected ERST, found '%s'\n" "$line" "$str" >&2 + exit 1 + fi if test $flag -ne 1 ; then printf "line %d: syntax error: expected STEXI, found '%s'\n" "$line" "$str" >&2 exit 1 fi flag=0 ;; + SRST*) + if test $rstflag -eq 1 ; then + printf "line %d: syntax error: expected ERST, found '%s'\n" "$line" "$str" >&2 + exit 1 + fi + if test $flag -eq 1 ; then + printf "line %d: syntax error: expected ETEXI, found '%s'\n" "$line" "$str" >&2 + exit 1 + fi + rstflag=1 + ;; + ERST*) + if test $flag -eq 1 ; then + printf "line %d: syntax error: expected ETEXI, found '%s'\n" "$line" "$str" >&2 + exit 1 + fi + if test $rstflag -ne 1 ; then + printf "line %d: syntax error: expected SRST, found '%s'\n" "$line" "$str" >&2 + exit 1 + fi + rstflag=0 + ;; DEFHEADING*) print_texi_heading "$(expr "$str" : "DEFHEADING(\(.*\))")" ;; |