pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/install mk: Skip many more CTF and debug files by d...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/46e5ab0a633c
branches:  trunk
changeset: 387641:46e5ab0a633c
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Nov 03 08:29:32 2022 +0000

description:
mk: Skip many more CTF and debug files by default.

Leave CTF_FILES_SKIP and STRIP_FILES_SKIP purely for packages to set any
additional paths to skip.

diffstat:

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

diffs (67 lines):

diff -r b33638205949 -r 46e5ab0a633c mk/install/bsd.install-vars.mk
--- a/mk/install/bsd.install-vars.mk    Thu Nov 03 08:26:10 2022 +0000
+++ b/mk/install/bsd.install-vars.mk    Thu Nov 03 08:29:32 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.install-vars.mk,v 1.12 2022/10/12 10:47:00 jperkin Exp $
+# $NetBSD: bsd.install-vars.mk,v 1.13 2022/11/03 08:29:32 jperkin Exp $
 #
 # This Makefile fragment is included separately by bsd.pkg.mk and
 # defines some variables which must be defined earlier than where
@@ -63,11 +63,11 @@
 TOOLS_PATH.ctfconvert= ${TOOLS_PLATFORM.ctfconvert}
 TOOLS_ARGS.ctfconvert?=        -i
 CTFCONVERT?=           ctfconvert
-CTF_FILES_SKIP?=       include/* info/* share/* ${PKGMANDIR}/*
+CTF_FILES_SKIP?=
 .endif
 
 STRIP_DEBUG?=          no
-STRIP_FILES_SKIP?=     include/* info/* share/* ${PKGMANDIR}/*
+STRIP_FILES_SKIP?=
 
 .if !empty(_MANCOMPRESSED:M[yY][eE][sS]) && empty(_MANZ:M[yY][eE][sS])
 USE_TOOLS+=    gunzip
diff -r b33638205949 -r 46e5ab0a633c mk/install/install.mk
--- a/mk/install/install.mk     Thu Nov 03 08:26:10 2022 +0000
+++ b/mk/install/install.mk     Thu Nov 03 08:29:32 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.81 2022/07/06 18:53:58 rillig Exp $
+# $NetBSD: install.mk,v 1.82 2022/11/03 08:29:32 jperkin Exp $
 #
 # This file provides the code for the "install" phase.
 #
@@ -340,6 +340,18 @@
        @${DO_NADA}
 .endif
 
+#
+# Filename matches that will never be suitable for debug handling.  This is
+# not meant to be exhaustive, but to catch the most common directories and
+# extensions to avoid expensive checks and improve performance.
+#
+_DEBUG_SKIP_PATTERNS=  include/* info/* share/*
+_DEBUG_SKIP_PATTERNS+= ${PKGMANDIR}/* ${PKGLOCALEDIR}/locale/*
+_DEBUG_SKIP_PATTERNS+= *.css *.html *.js *.json *.md *.rst *.txt *.xml
+_DEBUG_SKIP_PATTERNS+= *.php *.pl *.pm *.py *.pyc *.pyi *.pyo *.rb *.ri
+_DEBUG_SKIP_PATTERNS+= *.png *.gz *.svg *.gif
+_DEBUG_SKIP_PATTERNS+= *.a *.c *.h *.hpp *.la
+
 ######################################################################
 ### install-ctf (PRIVATE)
 ######################################################################
@@ -351,6 +363,7 @@
        ${RUN}cd ${DESTDIR:Q}${PREFIX:Q};                               \
        ${CAT} ${_PLIST_NOKEYWORDS} | while read f; do                  \
                case "$${f}" in                                         \
+               ${_DEBUG_SKIP_PATTERNS:@p@${p}) continue ;;@}           \
                ${CTF_FILES_SKIP:@p@${p}) continue ;;@}                 \
                *) ;;                                                   \
                esac;                                                   \
@@ -376,6 +389,7 @@
        ${RUN}cd ${DESTDIR:Q}${PREFIX:Q};                               \
        ${CAT} ${_PLIST_NOKEYWORDS} | while read f; do                  \
                case "$${f}" in                                         \
+               ${_DEBUG_SKIP_PATTERNS:@p@${p}) continue ;;@}           \
                ${STRIP_FILES_SKIP:@p@${p}) continue;;@}                \
                *) ;;                                                   \
                esac;                                                   \



Home | Main Index | Thread Index | Old Index