pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/check mk/check: enable check-portability for [[



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2791c564ebbc
branches:  trunk
changeset: 424469:2791c564ebbc
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Mar 11 19:21:00 2020 +0000

description:
mk/check: enable check-portability for [[

Since pkgtools/check-portability is not installed by default, it will not
harm any existing pkgsrc setup. To activate it, it has to be installed
manually. After a testing phase, it will be installed whenever
PKG_DEVELOPER is set.

diffstat:

 mk/check/check-portability.mk |  3 ++-
 mk/check/check-portability.sh |  7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r 797052583011 -r 2791c564ebbc mk/check/check-portability.mk
--- a/mk/check/check-portability.mk     Wed Mar 11 19:20:46 2020 +0000
+++ b/mk/check/check-portability.mk     Wed Mar 11 19:21:00 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.mk,v 1.9 2019/10/06 13:38:22 rillig Exp $
+# $NetBSD: check-portability.mk,v 1.10 2020/03/11 19:21:00 rillig Exp $
 #
 # This file contains some checks that are applied to the configure
 # scripts to check for certain constructs that are known to cause
@@ -45,4 +45,5 @@
        [ -d ${WRKSRC}/. ] || exit 0;                                   \
        cd ${WRKSRC};                                                   \
        env     SKIP_FILTER=${CHECK_PORTABILITY_SKIP:@p@${p}) skip=yes;;@:Q} \
+               PREFIX=${PREFIX}                                        \
                sh ${PKGSRCDIR}/mk/check/check-portability.sh
diff -r 797052583011 -r 2791c564ebbc mk/check/check-portability.sh
--- a/mk/check/check-portability.sh     Wed Mar 11 19:20:46 2020 +0000
+++ b/mk/check/check-portability.sh     Wed Mar 11 19:21:00 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.sh,v 1.10 2019/01/17 00:11:44 rillig Exp $
+# $NetBSD: check-portability.sh,v 1.11 2020/03/11 19:21:00 rillig Exp $
 #
 # This program checks all files in the current directory and any
 # subdirectories for portability issues that are likely to result in
@@ -27,6 +27,11 @@
                        -f "$checkdir/check-portability.awk" \
                < "$1" 1>&2 \
        || cs_exitcode=1
+
+       if test -f "${PREFIX}/bin/check-portability"; then
+               ${PREFIX}/bin/check-portability "$1" 1>&2 \
+               || cs_exitcode=1
+       fi
 }
 
 find * -type f -print 2>/dev/null \



Home | Main Index | Thread Index | Old Index