Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/install mk: Skip unnecessary dirs for CTF/debug con...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a4272044ba5f
branches:  trunk
changeset: 435480:a4272044ba5f
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Wed Jul 08 12:37:13 2020 +0000

description:
mk: Skip unnecessary dirs for CTF/debug conversion.

There won't (or at least should never!) be any files under share/ or man/ that
require conversion for CTF or debug support, so set sensible defaults for both
CTF_FILES_SKIP and STRIP_FILES_SKIP.  Further additions are welcome.

While here rearrange the ordering of the debug skips to match CTF and deliver
a small performance improvement by avoiding unnecessary file tests.

Combined, these reduce the runtime for "make install-ctf install-strip-debug"
in lang/rust down from wall/user/sys 10m33s/2m34s/9m30s to 1m13s/0m46s/1m4s.

diffstat:

 mk/install/bsd.install-vars.mk |  7 ++++---
 mk/install/install.mk          |  4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 9ef438babd30 -r a4272044ba5f mk/install/bsd.install-vars.mk
--- a/mk/install/bsd.install-vars.mk    Wed Jul 08 12:15:21 2020 +0000
+++ b/mk/install/bsd.install-vars.mk    Wed Jul 08 12:37:13 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.install-vars.mk,v 1.9 2018/11/12 14:22:58 jperkin Exp $
+# $NetBSD: bsd.install-vars.mk,v 1.10 2020/07/08 12:37:13 jperkin Exp $
 #
 # This Makefile fragment is included separately by bsd.pkg.mk and
 # defines some variables which must be defined earlier than where
@@ -63,10 +63,11 @@
 TOOLS_PATH.ctfconvert= ${TOOLS_PLATFORM.ctfconvert}
 TOOLS_ARGS.ctfconvert?=        -i
 CTFCONVERT?=           ctfconvert
-CTF_FILES_SKIP?=       # none
+CTF_FILES_SKIP?=       share/* ${PKGMANDIR}/*
 .endif
 
-STRIP_DEBUG?=  no
+STRIP_DEBUG?=          no
+STRIP_FILES_SKIP?=     share/* ${PKGMANDIR}/*
 
 .if !empty(_MANCOMPRESSED:M[yY][eE][sS]) && empty(_MANZ:M[yY][eE][sS])
 USE_TOOLS+=    gunzip
diff -r 9ef438babd30 -r a4272044ba5f mk/install/install.mk
--- a/mk/install/install.mk     Wed Jul 08 12:15:21 2020 +0000
+++ b/mk/install/install.mk     Wed Jul 08 12:37:13 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.78 2019/09/06 09:00:35 jperkin Exp $
+# $NetBSD: install.mk,v 1.79 2020/07/08 12:37:13 jperkin Exp $
 #
 # This file provides the code for the "install" phase.
 #
@@ -374,11 +374,11 @@
        @${STEP_MSG} "Automatic stripping of debug information"
        ${RUN}cd ${DESTDIR:Q}${PREFIX:Q};                               \
        ${CAT} ${_PLIST_NOKEYWORDS} | while read f; do                  \
-               [ ! -h "$${f}" ] || continue;                           \
                case "$${f}" in                                         \
                ${STRIP_FILES_SKIP:@p@${p}) continue;;@}                \
                *) ;;                                                   \
                esac;                                                   \
+               [ ! -h "$${f}" ] || continue;                           \
                tmp_f="$${f}.XXX";                                      \
                if ${STRIP_DBG} -o "$${tmp_f}" "$${f}" 2>/dev/null; then \
                        if [ -f "$${tmp_f}" -a -f "$${f}" ]; then       \



Home | Main Index | Thread Index | Old Index