On Mon, 7 Apr 2025, Jakub Jelinek wrote:

> Hi!
> 
> As mentioned in the PR, the COBOL documentation is currently not present
> in onlinedocs at all.
> While the script generates gcobol{,-io}.{pdf,html}, it generates them in
> the gcc/gcc/cobol/ subdirectory of the update_web_docs_git temporary
> directory and nothing find it there afterwards, all the processing is on
> for file in */*.html *.ps *.pdf *.tar; do
> So, this patch puts gcobol{,-io}.html into gcobol/ subdirectory and
> gcobol{,-io}.pdf into the current directory, so that it is picked up.
> With this it makes into onlinedocs:
> find . -name \*cobol\*
> ./onlinedocs/gcobol.pdf.gz
> ./onlinedocs/gcobol.pdf
> ./onlinedocs/gcobol_io.pdf.gz
> ./onlinedocs/gcobol_io.pdf
> ./onlinedocs/gcobol
> ./onlinedocs/gcobol/gcobol_io.html.gz
> ./onlinedocs/gcobol/gcobol_io.html
> ./onlinedocs/gcobol/gcobol.html.gz
> ./onlinedocs/gcobol/gcobol.html
> ./onlinedocs/gnat_rm/gnat_005frm_002finterfacing_005fto_005fother_005flanguages-interfacing-to-cobol.html.gz
> ./onlinedocs/gnat_rm/gnat_005frm_002finterfacing_005fto_005fother_005flanguages-interfacing-to-cobol.html
> ./onlinedocs/gnat_rm/gnat_005frm_002fimplementation_005fadvice-rm-f-7-cobol-support.html.gz
> ./onlinedocs/gnat_rm/gnat_005frm_002fimplementation_005fadvice-rm-f-7-cobol-support.html
> ./onlinedocs/gnat_rm/gnat_005frm_002fimplementation_005fadvice-rm-b-4-95-98-interfacing-with-cobol.html.gz
> ./onlinedocs/gnat_rm/gnat_005frm_002fimplementation_005fadvice-rm-b-4-95-98-interfacing-with-cobol.html
> 
> So far just tested running the script locally with a few vars tweaked, ok
> for trunk?
> I'd then test it on sourceware proper...

OK.

Richard.

> 2025-04-07  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR web/119227
>       * update_web_docs_git: Rename mdoc2pdf_html to cobol_mdoc2pdf_html,
>       perform mkdir -p $DOCSDIR/gcobol gcobol, remove $d/ from pdf and in
>       html replace it with gcobol/; update uses of the renamed function.
> 
> --- maintainer-scripts/update_web_docs_git.jj 2025-03-11 09:18:22.169127780 
> +0100
> +++ maintainer-scripts/update_web_docs_git    2025-04-07 13:22:41.785354269 
> +0200
> @@ -205,11 +205,12 @@ done
>  #
>  # The COBOL FE maintains man pages.  Convert them to HTML and PDF.
>  #
> -mdoc2pdf_html() {
> +cobol_mdoc2pdf_html() {
> +    mkdir -p $DOCSDIR/gcobol gcobol
>      input="$1"
>      d="${input%/*}"
> -    pdf="$d/$2"
> -    html="$d/$3"
> +    pdf="$2"
> +    html="gcobol/$3"
>      groff -mdoc -T pdf "$input" > "${pdf}~"
>      mv "${pdf}~" "${pdf}"
>      mandoc -T html "$filename" > "${html}~"
> @@ -221,10 +222,10 @@ find . -name gcobol.[13] |
>      do
>          case ${filename##*.} in
>              1)
> -                mdoc2pdf_html "$filename" gcobol.pdf gcobol.html
> +                cobol_mdoc2pdf_html "$filename" gcobol.pdf gcobol.html
>                  ;;
>              3)
> -                mdoc2pdf_html "$filename" gcobol_io.pdf gcobol_io.html
> +                cobol_mdoc2pdf_html "$filename" gcobol_io.pdf gcobol_io.html
>                  ;;
>          esac
>      done
> 
>       Jakub
> 
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

Reply via email to