[1/2] modula2: Add m2.install-html rule to gcc/m2/Make-lang.in

Message ID 20240329180903.3325518-1-christophe.lyon@linaro.org
State New
Headers
Series [1/2] modula2: Add m2.install-html rule to gcc/m2/Make-lang.in |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Testing passed

Commit Message

Christophe Lyon March 29, 2024, 6:09 p.m. UTC
  This rule was missing, and 'make install-html' was failing.
It is copied from the corresponding one in fortran.

2024-03-29  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/m2/
	* Make-lang.in (install-html): New rule.
---
 gcc/m2/Make-lang.in | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
  

Comments

Gaius Mulley March 30, 2024, 1:04 p.m. UTC | #1
Christophe Lyon <christophe.lyon@linaro.org> writes:

> This rule was missing, and 'make install-html' was failing.
> It is copied from the corresponding one in fortran.
>
> 2024-03-29  Christophe Lyon  <christophe.lyon@linaro.org>
>
> 	gcc/m2/
> 	* Make-lang.in (install-html): New rule.
> ---
>  gcc/m2/Make-lang.in | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
> index ef6990ce617..2d8a47a1b1f 100644
> --- a/gcc/m2/Make-lang.in
> +++ b/gcc/m2/Make-lang.in
> @@ -206,6 +206,25 @@ $(build_htmldir)/m2/index.html: $(TEXISRC) $(objdir)/m2/images/gnu.eps
>  	rm -f $(@D)/*
>  	$(TEXI2HTML) -I $(objdir)/m2 -I $(srcdir)/m2 -I $(gcc_docdir)/include -o $(@D) $<
>  
> +M2_HTMLFILES = $(build_htmldir)/m2
> +
> +m2.install-html: $(M2_HTMLFILES)
> +	@$(NORMAL_INSTALL)
> +	test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)"
> +	@list='$(M2_HTMLFILES)'; for p in $$list; do \
> +	  if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
> +	  f=$(html__strip_dir) \
> +	  if test -d "$$d$$p"; then \
> +	    echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
> +	    $(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
> +	    echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
> +	    $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
> +	  else \
> +	    echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
> +	    $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
> +	  fi; \
> +	done
> +
>  # gm2-libs.texi
>  
>  m2/gm2-libs.texi: gm2-libs.texi-check; @true

lgtm, many thanks for the fix,

regards,
Gaius
  

Patch

diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
index ef6990ce617..2d8a47a1b1f 100644
--- a/gcc/m2/Make-lang.in
+++ b/gcc/m2/Make-lang.in
@@ -206,6 +206,25 @@  $(build_htmldir)/m2/index.html: $(TEXISRC) $(objdir)/m2/images/gnu.eps
 	rm -f $(@D)/*
 	$(TEXI2HTML) -I $(objdir)/m2 -I $(srcdir)/m2 -I $(gcc_docdir)/include -o $(@D) $<
 
+M2_HTMLFILES = $(build_htmldir)/m2
+
+m2.install-html: $(M2_HTMLFILES)
+	@$(NORMAL_INSTALL)
+	test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)"
+	@list='$(M2_HTMLFILES)'; for p in $$list; do \
+	  if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
+	  f=$(html__strip_dir) \
+	  if test -d "$$d$$p"; then \
+	    echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+	    echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+	  else \
+	    echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+	    $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+	  fi; \
+	done
+
 # gm2-libs.texi
 
 m2/gm2-libs.texi: gm2-libs.texi-check; @true