https://gcc.gnu.org/g:5b9bd0b0cd4bd23b7906ea2f3e9c2b1583d53554

commit r15-9252-g5b9bd0b0cd4bd23b7906ea2f3e9c2b1583d53554
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Mon Apr 7 13:52:28 2025 +0200

    cobol: Fix up make html for COBOL [PR119227]
    
    What make html does for COBOL is quite inconsistent with all
    other FEs.  Normally make html creates HTML/gcc-15.0.1/
    subdirectory and puts there subdirectories like gcc, cpp, gccint, gfortran
    etc. and only those contain *.html files.  COBOL puts gcobol.html and
    gcobol-io.html into the current directory instead.
    
    The following patch puts them into $(build_htmldir)/gcobol/ directory.
    
    2025-04-07  Jakub Jelinek  <ja...@redhat.com>
    
            PR web/119227
            * Make-lang.in (GCOBOL_HTML_FILES): New variable.
            (cobol.install-html, cobol.html, cobol.srchtml): Use
            $(GCOBOL_HTML_FILES) instead of gcobol.html gcobol-io.html.
            (gcobol.html): Rename goal to ...
            ($(build_htmldir)/gcobol/gcobol.html): ... this.  Run mkinstalldirs.
            (gcobol-io.html): Rename goal to ...
            ($(build_htmldir)/gcobol/gcobol-io.html): ... this.  Run 
mkinstalldirs.

Diff:
---
 gcc/cobol/Make-lang.in | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/gcc/cobol/Make-lang.in b/gcc/cobol/Make-lang.in
index 990d51a85788..d14190f07957 100644
--- a/gcc/cobol/Make-lang.in
+++ b/gcc/cobol/Make-lang.in
@@ -40,6 +40,8 @@ GCOBOL_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell 
echo gcobol|sed '$(
 GCOBC_INSTALL_NAME := $(shell echo gcobc|sed '$(program_transform_name)')
 GCOBC_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcobc|sed 
'$(program_transform_name)')
 
+GCOBOL_HTML_FILES = $(addprefix $(build_htmldir)/gcobol/,gcobol.html 
gcobol-io.html)
+
 cobol: cobol1$(exeext)
 cobol.serial = cobol1$(exeext)
 .PHONY: cobol
@@ -303,8 +305,8 @@ cobol.install-pdf: installdirs gcobol.pdf gcobol-io.pdf
 
 cobol.install-plugin:
 
-cobol.install-html: installdirs gcobol.html gcobol-io.html
-       $(INSTALL_DATA) gcobol.html gcobol-io.html $(DESTDIR)$(htmldir)/
+cobol.install-html: installdirs $(GCOBOL_HTML_FILES)
+       $(INSTALL_DATA) $(GCOBOL_HTML_FILES) $(DESTDIR)$(htmldir)/
 
 cobol.info:
 cobol.srcinfo:
@@ -323,14 +325,16 @@ gcobol-io.pdf: $(srcdir)/cobol/gcobol.3
        groff -mdoc -T pdf  $^ > $@~
        @mv $@~ $@
 
-cobol.html: gcobol.html gcobol-io.html
-cobol.srchtml: gcobol.html gcobol-io.html
+cobol.html: $(GCOBOL_HTML_FILES)
+cobol.srchtml: $(GCOBOL_HTML_FILES)
        ln $^ $(srcdir)/cobol/
 
-gcobol.html: $(srcdir)/cobol/gcobol.1
+$(build_htmldir)/gcobol/gcobol.html: $(srcdir)/cobol/gcobol.1
+       $(mkinstalldirs) $(build_htmldir)/gcobol
        mandoc -T html $^ > $@~
        @mv $@~ $@
-gcobol-io.html: $(srcdir)/cobol/gcobol.3
+$(build_htmldir)/gcobol/gcobol-io.html: $(srcdir)/cobol/gcobol.3
+       $(mkinstalldirs) $(build_htmldir)/gcobol
        mandoc -T html $^ > $@~
        @mv $@~ $@

Reply via email to