Mon Nov 12 13:47:33 2018 UTC ()
mk/install: Add support for STRIP_DEBUG_SUPPORTED.

This is a package-settable variable that will disable stripping binaries if
set to anything other than "yes" (the default).  This helps packages such as
anything built using golang where stripping binaries is harmful to them.

Document this and the recently introduced STRIP_FILES_SKIP.


(jperkin)
diff -r1.73 -r1.74 pkgsrc/mk/install/install.mk

cvs diff -r1.73 -r1.74 pkgsrc/mk/install/install.mk (expand / switch to unified diff)

--- pkgsrc/mk/install/install.mk 2018/11/12 13:42:16 1.73
+++ pkgsrc/mk/install/install.mk 2018/11/12 13:47:32 1.74
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: install.mk,v 1.73 2018/11/12 13:42:16 jperkin Exp $ 1# $NetBSD: install.mk,v 1.74 2018/11/12 13:47:32 jperkin Exp $
2# 2#
3# This file provides the code for the "install" phase. 3# This file provides the code for the "install" phase.
4# 4#
5# Public targets: 5# Public targets:
6# 6#
7# stage-install: 7# stage-install:
8# Installs the package files into LOCALBASE or ${DESTDIR}${LOCALBASE}. 8# Installs the package files into LOCALBASE or ${DESTDIR}${LOCALBASE}.
9# 9#
10 10
11# Interface for other infrastructure components: 11# Interface for other infrastructure components:
12# 12#
13# Hooks for use by the infrastructure: 13# Hooks for use by the infrastructure:
14# 14#
@@ -45,26 +45,33 @@ @@ -45,26 +45,33 @@
45# to save package authors from typing too much. 45# to save package authors from typing too much.
46# 46#
47# AUTO_MKDIRS 47# AUTO_MKDIRS
48# INSTALLATION_DIRS_FROM_PLIST 48# INSTALLATION_DIRS_FROM_PLIST
49# In most (or even all?) cases the PLIST files in the package 49# In most (or even all?) cases the PLIST files in the package
50# directory already contain all directories that are needed. 50# directory already contain all directories that are needed.
51# When this variable is set to "yes", all directories mentioned 51# When this variable is set to "yes", all directories mentioned
52# in the PLIST files will be created like in INSTALLATION_DIRS. 52# in the PLIST files will be created like in INSTALLATION_DIRS.
53# 53#
54# DESTDIR_VARNAME 54# DESTDIR_VARNAME
55# A variable name that should be set as staged installation location 55# A variable name that should be set as staged installation location
56# presented as ${DESTDIR} at install phase. 56# presented as ${DESTDIR} at install phase.
57# "DESTDIR" is set by default. 57# "DESTDIR" is set by default.
 58#
 59# STRIP_DEBUG_SUPPORTED
 60# If set to anything other than "yes" (the default), stripping will
 61# be disabled for the package.
 62#
 63# STRIP_FILES_SKIP
 64# A list of files relative to ${PREFIX} that will not be stripped.
58 65
59###################################################################### 66######################################################################
60### install (PUBLIC) 67### install (PUBLIC)
61###################################################################### 68######################################################################
62### install is a public target to install the package. It will 69### install is a public target to install the package. It will
63### acquire elevated privileges just-in-time. 70### acquire elevated privileges just-in-time.
64### 71###
65_INSTALL_TARGETS+= check-vulnerable 72_INSTALL_TARGETS+= check-vulnerable
66_INSTALL_TARGETS+= ${_PKGSRC_BUILD_TARGETS} 73_INSTALL_TARGETS+= ${_PKGSRC_BUILD_TARGETS}
67_INSTALL_TARGETS+= acquire-install-lock 74_INSTALL_TARGETS+= acquire-install-lock
68_INSTALL_TARGETS+= ${_COOKIE.install} 75_INSTALL_TARGETS+= ${_COOKIE.install}
69_INSTALL_TARGETS+= release-install-lock 76_INSTALL_TARGETS+= release-install-lock
70 77
@@ -166,27 +173,27 @@ _INSTALL_ALL_TARGETS+= install-check-um @@ -166,27 +173,27 @@ _INSTALL_ALL_TARGETS+= install-check-um
166_INSTALL_ALL_TARGETS+= check-files-pre 173_INSTALL_ALL_TARGETS+= check-files-pre
167.endif 174.endif
168_INSTALL_ALL_TARGETS+= install-makedirs 175_INSTALL_ALL_TARGETS+= install-makedirs
169.if defined(INSTALLATION_DIRS_FROM_PLIST) && \ 176.if defined(INSTALLATION_DIRS_FROM_PLIST) && \
170 !empty(INSTALLATION_DIRS_FROM_PLIST:M[Yy][Ee][Ss]) 177 !empty(INSTALLATION_DIRS_FROM_PLIST:M[Yy][Ee][Ss])
171_INSTALL_ALL_TARGETS+= install-dirs-from-PLIST 178_INSTALL_ALL_TARGETS+= install-dirs-from-PLIST
172.elif defined(AUTO_MKDIRS) && !empty(AUTO_MKDIRS:M[Yy][Ee][Ss]) 179.elif defined(AUTO_MKDIRS) && !empty(AUTO_MKDIRS:M[Yy][Ee][Ss])
173_INSTALL_ALL_TARGETS+= install-dirs-from-PLIST 180_INSTALL_ALL_TARGETS+= install-dirs-from-PLIST
174.endif 181.endif
175_INSTALL_ALL_TARGETS+= pre-install 182_INSTALL_ALL_TARGETS+= pre-install
176_INSTALL_ALL_TARGETS+= do-install 183_INSTALL_ALL_TARGETS+= do-install
177_INSTALL_ALL_TARGETS+= post-install 184_INSTALL_ALL_TARGETS+= post-install
178_INSTALL_ALL_TARGETS+= plist 185_INSTALL_ALL_TARGETS+= plist
179.if !empty(STRIP_DEBUG:M[Yy][Ee][Ss]) 186.if ${STRIP_DEBUG:Uno:tl} == "yes" && ${STRIP_DEBUG_SUPPORTED:Uyes:tl} == "yes"
180_INSTALL_ALL_TARGETS+= install-strip-debug 187_INSTALL_ALL_TARGETS+= install-strip-debug
181.endif 188.endif
182_INSTALL_ALL_TARGETS+= install-doc-handling 189_INSTALL_ALL_TARGETS+= install-doc-handling
183.if ${_USE_NEW_PKGINSTALL:Uno} == "no" 190.if ${_USE_NEW_PKGINSTALL:Uno} == "no"
184_INSTALL_ALL_TARGETS+= install-script-data 191_INSTALL_ALL_TARGETS+= install-script-data
185.endif 192.endif
186.if empty(CHECK_FILES:M[nN][oO]) && !empty(CHECK_FILES_SUPPORTED:M[Yy][Ee][Ss]) 193.if empty(CHECK_FILES:M[nN][oO]) && !empty(CHECK_FILES_SUPPORTED:M[Yy][Ee][Ss])
187_INSTALL_ALL_TARGETS+= check-files-post 194_INSTALL_ALL_TARGETS+= check-files-post
188.endif 195.endif
189_INSTALL_ALL_TARGETS+= _pkgformat-generate-metadata 196_INSTALL_ALL_TARGETS+= _pkgformat-generate-metadata
190_INSTALL_ALL_TARGETS+= privileged-install-hook 197_INSTALL_ALL_TARGETS+= privileged-install-hook
191_INSTALL_ALL_TARGETS+= error-check 198_INSTALL_ALL_TARGETS+= error-check
192 199