pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/install Add STRIP_DEBUG option, which removes debug...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2fb53a695826
branches: trunk
changeset: 398559:2fb53a695826
user: joerg <joerg%pkgsrc.org@localhost>
date: Wed Sep 02 14:40:40 2009 +0000
description:
Add STRIP_DEBUG option, which removes debug information from all files,
leaving basic symbol tables intact. Document that INSTALL_UNSTRIPPED
doesn't work for all packages.
diffstat:
mk/install/bsd.install-vars.mk | 4 +++-
mk/install/install.mk | 23 ++++++++++++++++++++++-
2 files changed, 25 insertions(+), 2 deletions(-)
diffs (69 lines):
diff -r e2383e5c827b -r 2fb53a695826 mk/install/bsd.install-vars.mk
--- a/mk/install/bsd.install-vars.mk Wed Sep 02 13:32:56 2009 +0000
+++ b/mk/install/bsd.install-vars.mk Wed Sep 02 14:40:40 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.install-vars.mk,v 1.7 2007/07/02 14:54:10 joerg Exp $
+# $NetBSD: bsd.install-vars.mk,v 1.8 2009/09/02 14:40:40 joerg Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -46,6 +46,8 @@
_MANZ= ${MANZ:Dyes:Uno}
MAKEVARS+= _MANCOMPRESSED _MANZ
+STRIP_DEBUG?= no
+
.if !empty(_MANCOMPRESSED:M[yY][eE][sS]) && empty(_MANZ:M[yY][eE][sS])
USE_TOOLS+= gunzip
.endif
diff -r e2383e5c827b -r 2fb53a695826 mk/install/install.mk
--- a/mk/install/install.mk Wed Sep 02 13:32:56 2009 +0000
+++ b/mk/install/install.mk Wed Sep 02 14:40:40 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.52 2008/11/18 22:03:56 rillig Exp $
+# $NetBSD: install.mk,v 1.53 2009/09/02 14:40:41 joerg Exp $
#
# This file provides the code for the "install" phase.
#
@@ -26,6 +26,11 @@
# INSTALL_UNSTRIPPED
# If "yes", all binaries and shared libraries are installed
# unstripped. Otherwise they are stripped while being installed.
+# This option is not supported by all packages.
+#
+# STRIP_DEBUG
+# If set to "yes", call ${STRI} -g to remove debug information
+# from all files. The symbol tables are still preserved.
#
# Keywords: strip unstripped
#
@@ -183,6 +188,9 @@
_INSTALL_ALL_TARGETS+= do-install
_INSTALL_ALL_TARGETS+= post-install
_INSTALL_ALL_TARGETS+= plist
+.if !empty(STRIP_DEBUG:M[Yy][Ee][Ss])
+_INSTALL_ALL_TARGETS+= install-strip-debug
+.endif
_INSTALL_ALL_TARGETS+= install-doc-handling
_INSTALL_ALL_TARGETS+= install-script-data
.if empty(CHECK_FILES:M[nN][oO]) && !empty(CHECK_FILES_SUPPORTED:M[Yy][Ee][Ss])
@@ -325,6 +333,19 @@
.endif
######################################################################
+### install-strip-debug (PRIVATE)
+######################################################################
+### install-strip-debug tries to strip debug information from
+### the files in PLIST.
+###
+.PHONY: install-strip-debug
+install-strip-debug: plist
+ @${STEP_MSG} "Automatic stripping of debug information"
+ ${RUN}${CAT} ${PLIST} \
+ | ${SED} -e 's|^|${DESTDIR}${PREFIX}/|' \
+ | ${XARGS} ${STRIP} -g 2>/dev/null || ${TRUE}
+
+######################################################################
### install-doc-handling (PRIVATE)
######################################################################
### install-doc-handling does automatic document (de)compression based
Home |
Main Index |
Thread Index |
Old Index