diff options
author | rillig <rillig@pkgsrc.org> | 2020-03-11 19:21:00 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-03-11 19:21:00 +0000 |
commit | 1efcc824d352fee9998d22428ac28c341062ea92 (patch) | |
tree | 2fe02fdc12f53650066deaa774d5e5f5cdc2ef12 /mk/check | |
parent | 58210492a6e43b0f58a3e4fec917b783231870b4 (diff) | |
download | pkgsrc-1efcc824d352fee9998d22428ac28c341062ea92.tar.gz |
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 (limited to 'mk/check')
-rw-r--r-- | mk/check/check-portability.mk | 3 | ||||
-rw-r--r-- | mk/check/check-portability.sh | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/mk/check/check-portability.mk b/mk/check/check-portability.mk index c766961715f..f2da3ea959d 100644 --- a/mk/check/check-portability.mk +++ b/mk/check/check-portability.mk @@ -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 @@ _check-portability: [ -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 --git a/mk/check/check-portability.sh b/mk/check/check-portability.sh index 2a050b06fe0..8604fef832d 100644 --- a/mk/check/check-portability.sh +++ b/mk/check/check-portability.sh @@ -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 @@ check_shell() { -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 \ |