diff options
author | rillig <rillig@pkgsrc.org> | 2020-05-05 05:55:25 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-05-05 05:55:25 +0000 |
commit | 7c9b7a9a640892a837a4969f3c88afd107c017a3 (patch) | |
tree | 52c198d29b8f99755e597f4ec779278959bfd25b /mk | |
parent | e719ed11d7206b19e414cd07680201ed23f8113c (diff) | |
download | pkgsrc-7c9b7a9a640892a837a4969f3c88afd107c017a3.tar.gz |
mk/check/check-portability: opt-in for newer portability checks
There are a few portability checks that have been existing for years.
Later additions need an opt-in phase to avoid breaking existing usages.
https://mail-index.netbsd.org/tech-pkg/2020/05/04/msg023084.html
Diffstat (limited to 'mk')
-rw-r--r-- | mk/check/check-portability.mk | 10 | ||||
-rw-r--r-- | mk/check/check-portability.sh | 5 |
2 files changed, 12 insertions, 3 deletions
diff --git a/mk/check/check-portability.mk b/mk/check/check-portability.mk index fdc4b1ca508..929df9c25bc 100644 --- a/mk/check/check-portability.mk +++ b/mk/check/check-portability.mk @@ -1,4 +1,4 @@ -# $NetBSD: check-portability.mk,v 1.15 2020/05/04 21:32:48 rillig Exp $ +# $NetBSD: check-portability.mk,v 1.16 2020/05/05 05:55:26 rillig Exp $ # # This file contains some checks that are applied to the configure # scripts to check for certain constructs that are known to cause @@ -13,6 +13,13 @@ # # Default value: yes for PKG_DEVELOPERs, no otherwise. # +# CHECK_PORTABILITY_EXPERIMENTAL +# Enable additional experimental portability checks. New checks +# may be added without further notice, so expect some packages +# that previously succeeded to suddenly fail to build. +# +# Default value: no +# # Package-settable variables: # # CHECK_PORTABILITY_SKIP @@ -44,4 +51,5 @@ _check-portability: env SKIP_FILTER=${CHECK_PORTABILITY_SKIP:@p@${p}) skip=yes;;@:Q} \ PREFIX=${PREFIX} \ PATCHDIR=${PATCHDIR} \ + CHECK_PORTABILITY_EXPERIMENTAL=${CHECK_PORTABILITY_EXPERIMENTAL:Uno} \ sh ${PKGSRCDIR}/mk/check/check-portability.sh diff --git a/mk/check/check-portability.sh b/mk/check/check-portability.sh index 8e915382df1..0f48cd8c08d 100644 --- a/mk/check/check-portability.sh +++ b/mk/check/check-portability.sh @@ -1,4 +1,4 @@ -# $NetBSD: check-portability.sh,v 1.21 2020/05/04 21:48:18 rillig Exp $ +# $NetBSD: check-portability.sh,v 1.22 2020/05/05 05:55:26 rillig Exp $ # # This program checks all files in the current directory and any # subdirectories for portability issues that are likely to result in @@ -80,7 +80,8 @@ find ./* -type f -print 2>/dev/null \ (c|C|cc|cxx|f|go|pl|py|ac|m4) continue ;; esac - if [ $skip_shebang_test = yes ]; then + if [ "$CHECK_PORTABILITY_EXPERIMENTAL" = yes ] && + [ $skip_shebang_test = yes ]; then check_shell "$fname" continue fi |