honor prefix and suffix when installing cobol binaries

Message ID 192f6bb9-c360-4c6d-8b88-8e87c8a0334f@debian.org
State New
Headers
Series honor prefix and suffix when installing cobol binaries |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-aarch64-bootstrap fail Patch failed to apply

Commit Message

Matthias Klose March 13, 2025, 10:08 a.m. UTC
  the gcobol and gcobc binaries are currently installed without honoring 
the program prefix and program suffix. Honor these while installing.

Ok for the trunk?

Matthias
  

Comments

Richard Biener March 13, 2025, 11:59 a.m. UTC | #1
On Thu, Mar 13, 2025 at 11:09 AM Matthias Klose <doko@debian.org> wrote:
>
> the gcobol and gcobc binaries are currently installed without honoring
> the program prefix and program suffix. Honor these while installing.
>
> Ok for the trunk?

OK.

Thanks,
Richard.

> Matthias
>
  

Patch

--- a/gcc/cobol/Make-lang.in
+++ b/gcc/cobol/Make-lang.in
@@ -34,8 +34,10 @@ 
 # - the compiler proper (eg: cc1plus)
 # - define the names for selecting the language in LANGUAGES.
 
-gcobol_INSTALL_NAME := $(shell echo gcobol|sed '$(program_transform_name)')
-gcobol_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcobol|sed '$(program_transform_name)')
+GCOBOL_INSTALL_NAME := $(shell echo gcobol|sed '$(program_transform_name)')
+GCOBOL_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcobol|sed '$(program_transform_name)')
+
+GCOBC_INSTALL_NAME := $(shell echo gcobc|sed '$(program_transform_name)')
 
 cobol: cobol1$(exeext)
 cobol.serial = cobol1$(exeext)
@@ -280,14 +282,14 @@ 
 cobol.rest.encap:
 
 cobol.install-common: installdirs
-	$(INSTALL_PROGRAM) gcobol$(exeext)      $(DESTDIR)$(bindir)/
+	$(INSTALL_PROGRAM) gcobol$(exeext)      $(DESTDIR)$(bindir)/$(GCOBOL_INSTALL_NAME)$(exeext)
 	$(INSTALL_PROGRAM) cobol1$(exeext)      $(DESTDIR)$(libexecsubdir)/
-	$(INSTALL) -m 755 $(srcdir)/cobol/gcobc $(DESTDIR)$(bindir)/
+	$(INSTALL) -m 755 $(srcdir)/cobol/gcobc $(DESTDIR)$(bindir)/$(GCOBC_INSTALL_NAME)$(exeext)
 	mkdir -p $(DESTDIR)$(datadir)/gcobol/udf
 	$(INSTALL_DATA) $(srcdir)/cobol/udf/*   $(DESTDIR)$(datadir)/gcobol/udf/
 
 cobol.install-man: installdirs
-	$(INSTALL_DATA) $(srcdir)/cobol/gcobol.1 $(DESTDIR)$(man1dir)/
+	$(INSTALL_DATA) $(srcdir)/cobol/gcobol.1 $(DESTDIR)$(man1dir)/$(GCOBOL_INSTALL_NAME)$(man1ext)
 	$(INSTALL_DATA) $(srcdir)/cobol/gcobol.3 $(DESTDIR)$(man3dir)/
 
 cobol.install-info: