diff options
Diffstat (limited to 'mk/install')
-rw-r--r-- | mk/install/bsd.install-vars.mk | 4 | ||||
-rw-r--r-- | mk/install/install.mk | 23 |
2 files changed, 25 insertions, 2 deletions
diff --git a/mk/install/bsd.install-vars.mk b/mk/install/bsd.install-vars.mk index 4be1f413741..3655cb3a48c 100644 --- a/mk/install/bsd.install-vars.mk +++ b/mk/install/bsd.install-vars.mk @@ -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 @@ _MANCOMPRESSED!= \ _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 --git a/mk/install/install.mk b/mk/install/install.mk index d72e02e7813..a4675cf9d87 100644 --- a/mk/install/install.mk +++ b/mk/install/install.mk @@ -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+= pre-install _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 @@ post-install: .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 |