* [PATCH] gdb: Support install-strip target
@ 2014-01-17 0:38 Roland McGrath
2014-01-17 2:55 ` Joel Brobecker
2014-01-18 2:32 ` Tom Tromey
0 siblings, 2 replies; 4+ messages in thread
From: Roland McGrath @ 2014-01-17 0:38 UTC (permalink / raw)
To: GDB
This makes gdb support the install-strip target, which all the other
binutils subdirs that are automake-driven already support. I just
copied the automake-generated logic.
OK for trunk and 7.7 branch?
Thanks,
Roland
gdb/
2014-01-16 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.
--- 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,7 @@ LN_S = @LN_S@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
DESTDIR =
@@ -66,6 +69,7 @@ RANLIB = @RANLIB@
DLLTOOL = @DLLTOOL@
WINDRES = @WINDRES@
MIG = @MIG@
+STRIP = @STRIP@
XGETTEXT = @XGETTEXT@
GMSGFMT = @GMSGFMT@
@@ -1111,6 +1115,12 @@ install-only: $(CONFIG_INSTALL)
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gdb: Support install-strip target
2014-01-17 0:38 [PATCH] gdb: Support install-strip target Roland McGrath
@ 2014-01-17 2:55 ` Joel Brobecker
2014-01-18 2:32 ` Tom Tromey
1 sibling, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2014-01-17 2:55 UTC (permalink / raw)
To: Roland McGrath; +Cc: GDB
> This makes gdb support the install-strip target, which all the other
> binutils subdirs that are automake-driven already support. I just
> copied the automake-generated logic.
>
> OK for trunk and 7.7 branch?
I had a look at the (generated) differences in aclocal.m4 and configure,
in order to evaluate the impact on 7.7, and I didn't see anything that
would cause an abort of the configure. So OK for 7.7 if ok for master.
> gdb/
> 2014-01-16 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.
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gdb: Support install-strip target
2014-01-17 0:38 [PATCH] gdb: Support install-strip target Roland McGrath
2014-01-17 2:55 ` Joel Brobecker
@ 2014-01-18 2:32 ` Tom Tromey
2014-01-21 19:20 ` Roland McGrath
1 sibling, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2014-01-18 2:32 UTC (permalink / raw)
To: Roland McGrath; +Cc: GDB
>>>>> "Roland" == Roland McGrath <mcgrathr@google.com> writes:
Roland> This makes gdb support the install-strip target, which all the other
Roland> binutils subdirs that are automake-driven already support. I just
Roland> copied the automake-generated logic.
Roland> OK for trunk and 7.7 branch?
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.
If that works ok, this patch is fine.
Otherwise a bit more is needed.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gdb: Support install-strip target
2014-01-18 2:32 ` Tom Tromey
@ 2014-01-21 19:20 ` Roland McGrath
0 siblings, 0 replies; 4+ messages in thread
From: Roland McGrath @ 2014-01-21 19:20 UTC (permalink / raw)
To: Tom Tromey; +Cc: GDB
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-21 19:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-17 0:38 [PATCH] gdb: Support install-strip target Roland McGrath
2014-01-17 2:55 ` Joel Brobecker
2014-01-18 2:32 ` Tom Tromey
2014-01-21 19:20 ` Roland McGrath
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).