This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb: Support install-strip target
- From: Roland McGrath <mcgrathr at google dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: GDB <gdb-patches at sourceware dot org>
- Date: Tue, 21 Jan 2014 11:20:02 -0800
- Subject: Re: [PATCH] gdb: Support install-strip target
- Authentication-results: sourceware.org; auth=none
- References: <CAB=4xhqkKyNaXr2MH6i2Uu6=15akmp6WLtfVZ1Uw6q+=o2sshw at mail dot gmail dot com> <87y52ej9zm dot fsf at fleche dot redhat dot com>
On Fri, Jan 17, 2014 at 6:32 PM, Tom Tromey <tromey@redhat.com> wrote:
> My only question is what happens when install -s is run on 'gcore',
> which is a shell script; I don't remember if install is smart about this
> or not. I think automake defines a separate INSTALL_SCRIPT to handle
> this.
Good catch. Here's what I've committed.
Thanks,
Roland
gdb/
2014-01-21 Roland McGrath <mcgrathr@google.com>
* configure.ac: Call AM_PROG_INSTALL_STRIP.
* configure: Regenerate.
* aclocal.m4: Regenerate.
* Makefile.in (install_sh, INSTALL_STRIP_PROGRAM, STRIP):
New substituted variables.
(install-strip): New target.
(INSTALL_SCRIPT): New substituted variable.
(FLAGS_TO_PASS): Add it.
(install-only): Use $(INSTALL_SCRIPT) rather than
$(INSTALL_PROGRAM) for gcore.
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -44,6 +44,8 @@ htmldir = @htmldir@
pdfdir = @pdfdir@
includedir = @includedir@
+install_sh = @install_sh@
+
# This can be referenced by `LIBINTL' as computed by
# ZW_GNU_GETTEXT_SISTER_DIR.
top_builddir = .
@@ -56,6 +58,8 @@ LN_S = @LN_S@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
DESTDIR =
@@ -66,6 +70,7 @@ RANLIB = @RANLIB@
DLLTOOL = @DLLTOOL@
WINDRES = @WINDRES@
MIG = @MIG@
+STRIP = @STRIP@
XGETTEXT = @XGETTEXT@
GMSGFMT = @GMSGFMT@
@@ -648,6 +653,7 @@ FLAGS_TO_PASS = \
"MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \
"INSTALL=$(INSTALL)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"RUNTEST=$(RUNTEST)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)"
@@ -1107,11 +1113,17 @@ install-only: $(CONFIG_INSTALL)
true ; \
fi ; \
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
- $(INSTALL_PROGRAM) gcore \
+ $(INSTALL_SCRIPT) gcore \
$(DESTDIR)$(bindir)/$$transformed_name; \
fi
@$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do
+install-strip:
+ $(MAKE) $(FLAGS_TO_PASS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install-only
+
install-python:
$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(GDB_DATADIR)/python/gdb
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -30,6 +30,7 @@ AC_PROG_CC
AC_USE_SYSTEM_EXTENSIONS
ACX_LARGEFILE
AM_PROG_CC_STDC
+AM_PROG_INSTALL_STRIP
AC_CONFIG_AUX_DIR(..)
AC_CANONICAL_SYSTEM