public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 1/2] modula2: Add m2.install-html rule to gcc/m2/Make-lang.in
@ 2024-03-29 18:09 Christophe Lyon
  2024-03-29 18:09 ` [PATCH 2/2] modula2: Fix m2.install-info in gcc/m2/Make-lang.in Christophe Lyon
  2024-03-30 13:04 ` [PATCH 1/2] modula2: Add m2.install-html rule to gcc/m2/Make-lang.in Gaius Mulley
  0 siblings, 2 replies; 4+ messages in thread
From: Christophe Lyon @ 2024-03-29 18:09 UTC (permalink / raw)
  To: gcc-patches, gaiusmod2; +Cc: Christophe Lyon

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
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] modula2: Fix m2.install-info in gcc/m2/Make-lang.in
  2024-03-29 18:09 [PATCH 1/2] modula2: Add m2.install-html rule to gcc/m2/Make-lang.in Christophe Lyon
@ 2024-03-29 18:09 ` Christophe Lyon
  2024-03-30 13:05   ` Gaius Mulley
  2024-03-30 13:04 ` [PATCH 1/2] modula2: Add m2.install-html rule to gcc/m2/Make-lang.in Gaius Mulley
  1 sibling, 1 reply; 4+ messages in thread
From: Christophe Lyon @ 2024-03-29 18:09 UTC (permalink / raw)
  To: gcc-patches, gaiusmod2; +Cc: Christophe Lyon

Fix a few typos: the generated filename is m2.info (not gm2.info, and
gm2$(exeext) is a file not a directory (so test -d would always fail).

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

	gcc/m2/
	* Make-lang.in (m2.install-info): Fix rule.
---
 gcc/m2/Make-lang.in | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
index 2d8a47a1b1f..e56240b4c44 100644
--- a/gcc/m2/Make-lang.in
+++ b/gcc/m2/Make-lang.in
@@ -400,20 +400,20 @@ m2.install-common: installdirs
          done
 
 m2.install-info: installdirs
-	if [ -d gm2$(exeext) ] ; then \
-	  if [ -f $(objdir)/doc/gm2.info ]; then \
-	    rm -f $(DESTDIR)$(infodir)/gm2.info*; \
-	    for f in $(objdir)/doc/gm2.info*; do \
+	if [ -f gm2$(exeext) ] ; then \
+	  if [ -f $(objdir)/doc/m2.info ]; then \
+	    rm -f $(DESTDIR)$(infodir)/m2.info*; \
+	    for f in $(objdir)/doc/m2.info*; do \
 	      realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
               rm -f $(DESTDIR)$(infodir)/`basename $$realfile`; \
 	      $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/`basename $$realfile`; \
 	    done; \
-	    chmod a-x $(DESTDIR)$(infodir)/gm2.info*; \
+	    chmod a-x $(DESTDIR)$(infodir)/m2.info*; \
 	  else true; fi; \
 	else true; fi
-	-if [ -f gm2$(exeext) ] && [ -f $(DESTDIR)$(infodir)/gm2.info ]; then \
+	-if [ -f gm2$(exeext) ] && [ -f $(DESTDIR)$(infodir)/m2.info ]; then \
 	  if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
-	    install-info --dir-file=$(infodir)/dir $(DESTDIR)$(infodir)/gm2.info; \
+	    install-info --dir-file=$(infodir)/dir $(DESTDIR)$(infodir)/m2.info; \
 	  else true; fi; \
 	else true; fi
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] modula2: Add m2.install-html rule to gcc/m2/Make-lang.in
  2024-03-29 18:09 [PATCH 1/2] modula2: Add m2.install-html rule to gcc/m2/Make-lang.in Christophe Lyon
  2024-03-29 18:09 ` [PATCH 2/2] modula2: Fix m2.install-info in gcc/m2/Make-lang.in Christophe Lyon
@ 2024-03-30 13:04 ` Gaius Mulley
  1 sibling, 0 replies; 4+ messages in thread
From: Gaius Mulley @ 2024-03-30 13:04 UTC (permalink / raw)
  To: Christophe Lyon; +Cc: gcc-patches

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] modula2: Fix m2.install-info in gcc/m2/Make-lang.in
  2024-03-29 18:09 ` [PATCH 2/2] modula2: Fix m2.install-info in gcc/m2/Make-lang.in Christophe Lyon
@ 2024-03-30 13:05   ` Gaius Mulley
  0 siblings, 0 replies; 4+ messages in thread
From: Gaius Mulley @ 2024-03-30 13:05 UTC (permalink / raw)
  To: Christophe Lyon; +Cc: gcc-patches

Christophe Lyon <christophe.lyon@linaro.org> writes:

> Fix a few typos: the generated filename is m2.info (not gm2.info, and
> gm2$(exeext) is a file not a directory (so test -d would always fail).
>
> 2024-03-29  Christophe Lyon  <christophe.lyon@linaro.org>
>
> 	gcc/m2/
> 	* Make-lang.in (m2.install-info): Fix rule.
> ---
>  gcc/m2/Make-lang.in | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
> index 2d8a47a1b1f..e56240b4c44 100644
> --- a/gcc/m2/Make-lang.in
> +++ b/gcc/m2/Make-lang.in
> @@ -400,20 +400,20 @@ m2.install-common: installdirs
>           done
>  
>  m2.install-info: installdirs
> -	if [ -d gm2$(exeext) ] ; then \
> -	  if [ -f $(objdir)/doc/gm2.info ]; then \
> -	    rm -f $(DESTDIR)$(infodir)/gm2.info*; \
> -	    for f in $(objdir)/doc/gm2.info*; do \
> +	if [ -f gm2$(exeext) ] ; then \
> +	  if [ -f $(objdir)/doc/m2.info ]; then \
> +	    rm -f $(DESTDIR)$(infodir)/m2.info*; \
> +	    for f in $(objdir)/doc/m2.info*; do \
>  	      realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
>                rm -f $(DESTDIR)$(infodir)/`basename $$realfile`; \
>  	      $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/`basename $$realfile`; \
>  	    done; \
> -	    chmod a-x $(DESTDIR)$(infodir)/gm2.info*; \
> +	    chmod a-x $(DESTDIR)$(infodir)/m2.info*; \
>  	  else true; fi; \
>  	else true; fi
> -	-if [ -f gm2$(exeext) ] && [ -f $(DESTDIR)$(infodir)/gm2.info ]; then \
> +	-if [ -f gm2$(exeext) ] && [ -f $(DESTDIR)$(infodir)/m2.info ]; then \
>  	  if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
> -	    install-info --dir-file=$(infodir)/dir $(DESTDIR)$(infodir)/gm2.info; \
> +	    install-info --dir-file=$(infodir)/dir $(DESTDIR)$(infodir)/m2.info; \
>  	  else true; fi; \
>  	else true; fi

lgtm, many thanks for spotting these bugs,

regards,
Gaius

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-30 13:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-29 18:09 [PATCH 1/2] modula2: Add m2.install-html rule to gcc/m2/Make-lang.in Christophe Lyon
2024-03-29 18:09 ` [PATCH 2/2] modula2: Fix m2.install-info in gcc/m2/Make-lang.in Christophe Lyon
2024-03-30 13:05   ` Gaius Mulley
2024-03-30 13:04 ` [PATCH 1/2] modula2: Add m2.install-html rule to gcc/m2/Make-lang.in Gaius Mulley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).