]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cobol: Fix up make html for COBOL [PR119227]
authorJakub Jelinek <jakub@redhat.com>
Mon, 7 Apr 2025 11:52:28 +0000 (13:52 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 7 Apr 2025 11:52:28 +0000 (13:52 +0200)
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  <jakub@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.

gcc/cobol/Make-lang.in

index 990d51a85788090df335afc6b38d8063aae0c844..d14190f07957f87e965284897eda59f39f145683 100644 (file)
@@ -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 $@~ $@