summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rw-r--r--mk/check/check-portability.mk3
-rw-r--r--mk/check/check-portability.sh9
-rw-r--r--mk/check/check-subr.awk4
3 files changed, 12 insertions, 4 deletions
diff --git a/mk/check/check-portability.mk b/mk/check/check-portability.mk
index 7d19b7fbbd8..fdc4b1ca508 100644
--- a/mk/check/check-portability.mk
+++ b/mk/check/check-portability.mk
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.mk,v 1.14 2020/03/13 08:11:36 rillig Exp $
+# $NetBSD: check-portability.mk,v 1.15 2020/05/04 21:32:48 rillig Exp $
#
# This file contains some checks that are applied to the configure
# scripts to check for certain constructs that are known to cause
@@ -43,4 +43,5 @@ _check-portability:
cd ${WRKSRC}; \
env SKIP_FILTER=${CHECK_PORTABILITY_SKIP:@p@${p}) skip=yes;;@:Q} \
PREFIX=${PREFIX} \
+ PATCHDIR=${PATCHDIR} \
sh ${PKGSRCDIR}/mk/check/check-portability.sh
diff --git a/mk/check/check-portability.sh b/mk/check/check-portability.sh
index c4a7e3ca882..87cf1461501 100644
--- a/mk/check/check-portability.sh
+++ b/mk/check/check-portability.sh
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.sh,v 1.19 2020/03/13 08:11:36 rillig Exp $
+# $NetBSD: check-portability.sh,v 1.20 2020/05/04 21:32:48 rillig Exp $
#
# This program checks all files in the current directory and any
# subdirectories for portability issues that are likely to result in
@@ -34,6 +34,8 @@ check_shell() {
fi
}
+patched_files=",$(awk 'BEGIN { ORS = "," } /^\+\+\+ / { print $2 }' "$PATCHDIR"/patch-*),"
+
find ./* -type f -print 2>/dev/null \
| sed 's,$,_,' \
| {
@@ -44,6 +46,11 @@ find ./* -type f -print 2>/dev/null \
skip=no
eval "case \"\$fname\" in $SKIP_FILTER *.orig) skip=yes;; esac"
+ case "$fname" in *.in)
+ case ",$patched_files," in *,"${fname%.in}",*)
+ skip=yes
+ esac
+ esac
[ $skip = no ] || continue
skip_shebang_test=no
diff --git a/mk/check/check-subr.awk b/mk/check/check-subr.awk
index 70a7d2381ee..a713068c7db 100644
--- a/mk/check/check-subr.awk
+++ b/mk/check/check-subr.awk
@@ -1,4 +1,4 @@
-# $NetBSD: check-subr.awk,v 1.3 2006/12/31 13:35:10 rillig Exp $
+# $NetBSD: check-subr.awk,v 1.4 2020/05/04 21:32:48 rillig Exp $
#
# This file contains functions that are used by the various awk
# programs that check things in pkgsrc. All these programs must be
@@ -7,7 +7,7 @@
# CK_FNAME
# The name of the file that is checked. Since awk interprets
# command line arguments in a weird way, the input file must be
-# passed via stdin.
+# passed via the environment.
#
# CK_PROGNAME
# The program name to be used in diagnostic messages.