summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-11-13 23:21:53 +0000
committerrillig <rillig@pkgsrc.org>2006-11-13 23:21:53 +0000
commit1639b3587beb9e8a8bd39f21c68f1ad44b1caf1b (patch)
tree228233cf027c8f4027f9d5ac8cf7f026ced7d13a /mk
parentea9a3451a960383ee6aa1abb28ef7016904a9c16 (diff)
downloadpkgsrc-1639b3587beb9e8a8bd39f21c68f1ad44b1caf1b.tar.gz
Instead of $0 and $1 .. $NF, the function check_test_eqeq should test
the string in the ''line'' variable. This will make koffice build again.
Diffstat (limited to 'mk')
-rw-r--r--mk/check/check-portability.awk11
1 files changed, 6 insertions, 5 deletions
diff --git a/mk/check/check-portability.awk b/mk/check/check-portability.awk
index 3bd21771e9b..53d61a3ad57 100644
--- a/mk/check/check-portability.awk
+++ b/mk/check/check-portability.awk
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.awk,v 1.3 2006/11/10 08:17:06 rillig Exp $
+# $NetBSD: check-portability.awk,v 1.4 2006/11/13 23:21:53 rillig Exp $
#
# Checks a shell file for possible portability problems.
#
@@ -29,11 +29,12 @@ function check_random(line) {
}
}
-function check_test_eqeq(line) {
+function check_test_eqeq(line, n, word, i) {
- for (i = 3; i < NF; i++) {
- if ($i == "==") {
- if ($(i-2) == "test" || $(i-2) == "[") {
+ n = split(line, word);
+ for (i = 3; i < n; i++) {
+ if (word[i] == "==") {
+ if (word[i-2] == "test" || word[i-2] == "[") {
found_test_eqeq = yes;
cs_error_heading("Found test ... == ...:");
cs_error_msg(cs_fname ": " $0);