diff options
author | James K. Lowden <jklowden@symas.com> | 2025-03-10 16:01:57 +0100 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2025-03-11 07:48:27 +0100 |
commit | 86c692c51c356958781a1d6788dd34223deac9ad (patch) | |
tree | 679fd996edc5b8b8433bd8216874f187460ccda5 | |
parent | 45c281deb7a2e24a21f2f68a2a3652e30f27f953 (diff) | |
download | gcc-86c692c51c356958781a1d6788dd34223deac9ad.zip gcc-86c692c51c356958781a1d6788dd34223deac9ad.tar.gz gcc-86c692c51c356958781a1d6788dd34223deac9ad.tar.bz2 |
Update update_web_docs_git for cobol
maintainer-scripts/
* update_web_docs_git: Add libgcobol module and cobol language.
-rwxr-xr-x | maintainer-scripts/update_web_docs_git | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/maintainer-scripts/update_web_docs_git b/maintainer-scripts/update_web_docs_git index 8ff34f8..574397c 100755 --- a/maintainer-scripts/update_web_docs_git +++ b/maintainer-scripts/update_web_docs_git @@ -143,6 +143,7 @@ rm -rf gcc/.git # not .texi files (Makefile, .rst and .png), and the jit docs use # include directives to pull in content from jit/jit-common.h and # Similar considerations apply for libgdiagnostics. +# Preserve the cobol man pages, which are converted to HTML and PDF. find gcc -type f \( -name '*.texi' \ -o -path gcc/gcc/doc/install.texi2html \ -o -path gcc/gcc/doc/include/texinfo.tex \ @@ -155,6 +156,7 @@ find gcc -type f \( -name '*.texi' \ -o -path "gcc/gcc/testsuite/jit.dg/*" \ -o -path "gcc/gcc/doc/libgdiagnostics/*" \ -o -path "gcc/gcc/testsuite/libgdiagnostics.dg/*" \ + -o -path "gcc/gcc/cobol/gcobol*[13]" \ -o -print0 \) | xargs -0 rm -f # Build a tarball of the sources. @@ -200,6 +202,33 @@ for file in $MANUALS; do fi done +# +# The COBOL FE maintains man pages. Convert them to HTML and PDF. +# +mdoc2pdf_html() { + input="$1" + d="${input%/*}" + pdf="$d/$2" + html="$d/$3" + groff -mdoc -T pdf "$input" > "${pdf}~" + mv "${pdf}~" "${pdf}" + mandoc -T html "$filename" > "${html}~" + mv "${html}~" "${html}" +} + +find . -name gcobol.[13] | + while read filename + do + case ${filename##*.} in + 1) + mdoc2pdf_html "$filename" gcobol.pdf gcobol.html + ;; + 3) + mdoc2pdf_html "$filename" gcobol_io.pdf gcobol_io.html + ;; + esac + done + # jit and libgdiagnostics are a special-case, using Sphinx rather than texinfo. # Specifically, they need Sphinx 3.0 or later. # |