Patchwork Add install-strip to sim/

login
register
mail settings
Submitter Tom Tromey
Date Dec. 18, 2019, 4:18 p.m.
Message ID <20191218161804.23441-1-tromey@adacore.com>
Download mbox | patch
Permalink /patch/36942/
State New
Headers show

Comments

Tom Tromey - Dec. 18, 2019, 4:18 p.m.
PR build/24572 notes that "make install-strip" fails.  For me, it
works in every directory except "sim", so this patch adds
install-strip targets to the Makefiles that appear there.

sim/ChangeLog
2019-12-18  Tom Tromey  <tromey@adacore.com>

	PR build/24572:
	* Makefile.in (install-strip): New target.

sim/common/ChangeLog
2019-12-18  Tom Tromey  <tromey@adacore.com>

	PR build/24572:
	* Makefile.in (install-strip): New target.

sim/igen/ChangeLog
2019-12-18  Tom Tromey  <tromey@adacore.com>

	PR build/24572:
	* Makefile.in (install-strip): New target.

sim/ppc/ChangeLog
2019-12-18  Tom Tromey  <tromey@adacore.com>

	PR build/24572:
	* Makefile.in (install-strip): New target.

sim/testsuite/ChangeLog
2019-12-18  Tom Tromey  <tromey@adacore.com>

	PR build/24572:
	* Makefile.in (install-strip): New target.

Change-Id: I76613bc5c7e7812284f33826f8a5d914477fcdc5
---
 sim/ChangeLog             |  5 +++++
 sim/Makefile.in           | 10 ++++++++++
 sim/common/ChangeLog      |  5 +++++
 sim/common/Makefile.in    |  1 +
 sim/igen/ChangeLog        |  5 +++++
 sim/igen/Makefile.in      |  1 +
 sim/ppc/ChangeLog         |  5 +++++
 sim/ppc/Makefile.in       |  5 +++++
 sim/testsuite/ChangeLog   |  5 +++++
 sim/testsuite/Makefile.in |  1 +
 10 files changed, 43 insertions(+)
Andrew Burgess - Dec. 18, 2019, 5:59 p.m.
* Tom Tromey <tromey@adacore.com> [2019-12-18 09:18:04 -0700]:

> PR build/24572 notes that "make install-strip" fails.  For me, it
> works in every directory except "sim", so this patch adds
> install-strip targets to the Makefiles that appear there.

LGTM.

Thanks,
Andrew

> 
> sim/ChangeLog
> 2019-12-18  Tom Tromey  <tromey@adacore.com>
> 
> 	PR build/24572:
> 	* Makefile.in (install-strip): New target.
> 
> sim/common/ChangeLog
> 2019-12-18  Tom Tromey  <tromey@adacore.com>
> 
> 	PR build/24572:
> 	* Makefile.in (install-strip): New target.
> 
> sim/igen/ChangeLog
> 2019-12-18  Tom Tromey  <tromey@adacore.com>
> 
> 	PR build/24572:
> 	* Makefile.in (install-strip): New target.
> 
> sim/ppc/ChangeLog
> 2019-12-18  Tom Tromey  <tromey@adacore.com>
> 
> 	PR build/24572:
> 	* Makefile.in (install-strip): New target.
> 
> sim/testsuite/ChangeLog
> 2019-12-18  Tom Tromey  <tromey@adacore.com>
> 
> 	PR build/24572:
> 	* Makefile.in (install-strip): New target.
> 
> Change-Id: I76613bc5c7e7812284f33826f8a5d914477fcdc5
> ---
>  sim/ChangeLog             |  5 +++++
>  sim/Makefile.in           | 10 ++++++++++
>  sim/common/ChangeLog      |  5 +++++
>  sim/common/Makefile.in    |  1 +
>  sim/igen/ChangeLog        |  5 +++++
>  sim/igen/Makefile.in      |  1 +
>  sim/ppc/ChangeLog         |  5 +++++
>  sim/ppc/Makefile.in       |  5 +++++
>  sim/testsuite/ChangeLog   |  5 +++++
>  sim/testsuite/Makefile.in |  1 +
>  10 files changed, 43 insertions(+)
> 
> diff --git a/sim/Makefile.in b/sim/Makefile.in
> index 5a953fd4ad5..3a85eeb581d 100644
> --- a/sim/Makefile.in
> +++ b/sim/Makefile.in
> @@ -166,6 +166,16 @@ install:
>  		else true; fi; \
>  	done
>  
> +install-strip:
> +	@rootme=`pwd` ; export rootme ; \
> +	for dir in . ${SUBDIRS}; do \
> +		if [ "$$dir" = "." ]; then \
> +			true; \
> +		elif [ -d $$dir ]; then \
> +			(cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install-strip) || exit 1; \
> +		else true; fi; \
> +	done
> +
>  installcheck:
>  	@echo No installcheck target is available yet for the GNU simulators.
>  
> diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in
> index c62bd260697..6d094aab363 100644
> --- a/sim/common/Makefile.in
> +++ b/sim/common/Makefile.in
> @@ -115,6 +115,7 @@ force:
>  
>  # Copy the files into directories where they will be run.
>  install: install-man
> +install-strip: install-man
>  
>  install-man: installdirs
>  	n=`echo run | sed '$(program_transform_name)'`; \
> diff --git a/sim/igen/Makefile.in b/sim/igen/Makefile.in
> index f3a797729ed..f287242e3e5 100644
> --- a/sim/igen/Makefile.in
> +++ b/sim/igen/Makefile.in
> @@ -183,4 +183,5 @@ config.status: configure
>  	$(SHELL) ./config.status --recheck
>  
>  install:
> +install-strip:
>  #
> diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
> index fb5a6bd21e3..8ad76c6ed3b 100644
> --- a/sim/ppc/Makefile.in
> +++ b/sim/ppc/Makefile.in
> @@ -884,5 +884,10 @@ install: installdirs
>  	n=`echo run | sed '$(program_transform_name)'`; \
>  	$(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
>  
> +install-strip: installdirs
> +	n=`echo run | sed '$(program_transform_name)'`; \
> +	$(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
> +	$(STRIP) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
> +
>  installdirs:
>  	$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)
> diff --git a/sim/testsuite/Makefile.in b/sim/testsuite/Makefile.in
> index a9b50ede98c..e127ae271a2 100644
> --- a/sim/testsuite/Makefile.in
> +++ b/sim/testsuite/Makefile.in
> @@ -81,6 +81,7 @@ install-info:
>  dvi:
>  
>  install:
> +install-strip:
>  
>  uninstall: force
>  
> -- 
> 2.21.0
>

Patch

diff --git a/sim/Makefile.in b/sim/Makefile.in
index 5a953fd4ad5..3a85eeb581d 100644
--- a/sim/Makefile.in
+++ b/sim/Makefile.in
@@ -166,6 +166,16 @@  install:
 		else true; fi; \
 	done
 
+install-strip:
+	@rootme=`pwd` ; export rootme ; \
+	for dir in . ${SUBDIRS}; do \
+		if [ "$$dir" = "." ]; then \
+			true; \
+		elif [ -d $$dir ]; then \
+			(cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install-strip) || exit 1; \
+		else true; fi; \
+	done
+
 installcheck:
 	@echo No installcheck target is available yet for the GNU simulators.
 
diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in
index c62bd260697..6d094aab363 100644
--- a/sim/common/Makefile.in
+++ b/sim/common/Makefile.in
@@ -115,6 +115,7 @@  force:
 
 # Copy the files into directories where they will be run.
 install: install-man
+install-strip: install-man
 
 install-man: installdirs
 	n=`echo run | sed '$(program_transform_name)'`; \
diff --git a/sim/igen/Makefile.in b/sim/igen/Makefile.in
index f3a797729ed..f287242e3e5 100644
--- a/sim/igen/Makefile.in
+++ b/sim/igen/Makefile.in
@@ -183,4 +183,5 @@  config.status: configure
 	$(SHELL) ./config.status --recheck
 
 install:
+install-strip:
 #
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index fb5a6bd21e3..8ad76c6ed3b 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -884,5 +884,10 @@  install: installdirs
 	n=`echo run | sed '$(program_transform_name)'`; \
 	$(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
 
+install-strip: installdirs
+	n=`echo run | sed '$(program_transform_name)'`; \
+	$(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
+	$(STRIP) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
+
 installdirs:
 	$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)
diff --git a/sim/testsuite/Makefile.in b/sim/testsuite/Makefile.in
index a9b50ede98c..e127ae271a2 100644
--- a/sim/testsuite/Makefile.in
+++ b/sim/testsuite/Makefile.in
@@ -81,6 +81,7 @@  install-info:
 dvi:
 
 install:
+install-strip:
 
 uninstall: force