summaryrefslogtreecommitdiff
path: root/mk/check
diff options
context:
space:
mode:
authorrillig <rillig>2007-01-02 17:58:11 +0000
committerrillig <rillig>2007-01-02 17:58:11 +0000
commit0bff45db35c83c599b3349f2b2d045b421c88748 (patch)
tree7a9b4e286135e3de09bb5c6bf4927e931f942aa6 /mk/check
parentb782f636c55a3a0f023b1371e6d43e5534de0c93 (diff)
downloadpkgsrc-0bff45db35c83c599b3349f2b2d045b421c88748.tar.gz
Removed the need to define the PKGSRCDIR environment variable.
Diffstat (limited to 'mk/check')
-rw-r--r--mk/check/check-headers.mk5
-rw-r--r--mk/check/check-headers.sh5
-rw-r--r--mk/check/check-portability.mk5
-rw-r--r--mk/check/check-portability.sh18
-rw-r--r--mk/check/check-subr.sh5
5 files changed, 20 insertions, 18 deletions
diff --git a/mk/check/check-headers.mk b/mk/check/check-headers.mk
index 2a0c22c885f..24b84f97192 100644
--- a/mk/check/check-headers.mk
+++ b/mk/check/check-headers.mk
@@ -1,4 +1,4 @@
-# $NetBSD: check-headers.mk,v 1.2 2006/11/09 14:41:18 rillig Exp $
+# $NetBSD: check-headers.mk,v 1.3 2007/01/02 17:58:11 rillig Exp $
#
# This file checks the C and C++ header files for possible problems.
#
@@ -32,6 +32,5 @@ _check-headers:
${RUN} \
[ -d ${WRKSRC}/. ] || exit 0; \
cd ${WRKSRC}; \
- env PKGSRCDIR=${PKGSRCDIR:Q} \
- SKIP_FILTER=${CHECK_HEADERS_SKIP:@p@${p}) skip=yes;;@:Q} \
+ env SKIP_FILTER=${CHECK_HEADERS_SKIP:@p@${p}) skip=yes;;@:Q} \
sh ${PKGSRCDIR}/mk/check/check-headers.sh
diff --git a/mk/check/check-headers.sh b/mk/check/check-headers.sh
index 9926538a4e6..c5222efe36b 100644
--- a/mk/check/check-headers.sh
+++ b/mk/check/check-headers.sh
@@ -1,4 +1,4 @@
-# $NetBSD: check-headers.sh,v 1.8 2006/11/10 07:59:01 rillig Exp $
+# $NetBSD: check-headers.sh,v 1.9 2007/01/02 17:58:11 rillig Exp $
#
# This program checks the header files for possible problems.
#
@@ -9,7 +9,8 @@
set -eu
-. "${PKGSRCDIR}/mk/check/check-subr.sh"
+checkdir=`dirname "$0"`
+. "$checkdir/check-subr.sh"
cs_setprogname "$0"
found_unresolved_variable=no
diff --git a/mk/check/check-portability.mk b/mk/check/check-portability.mk
index 418fa68c537..75f1f2d3846 100644
--- a/mk/check/check-portability.mk
+++ b/mk/check/check-portability.mk
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.mk,v 1.2 2006/11/09 14:36:18 rillig Exp $
+# $NetBSD: check-portability.mk,v 1.3 2007/01/02 17:58:11 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,6 +45,5 @@ _check-portability:
${RUN} \
[ -d ${WRKSRC}/. ] || exit 0; \
cd ${WRKSRC}; \
- env PKGSRCDIR=${PKGSRCDIR:Q} \
- SKIP_FILTER=${CHECK_PORTABILITY_SKIP:@p@${p}) skip=yes;;@:Q} \
+ env SKIP_FILTER=${CHECK_PORTABILITY_SKIP:@p@${p}) skip=yes;;@:Q} \
sh ${PKGSRCDIR}/mk/check/check-portability.sh
diff --git a/mk/check/check-portability.sh b/mk/check/check-portability.sh
index 68319563ddf..19b955bb291 100644
--- a/mk/check/check-portability.sh
+++ b/mk/check/check-portability.sh
@@ -1,17 +1,23 @@
-# $NetBSD: check-portability.sh,v 1.5 2006/12/31 13:35:10 rillig Exp $
+# $NetBSD: check-portability.sh,v 1.6 2007/01/02 17:58:11 rillig Exp $
#
-# This program checks the extracted files for portability issues that
-# are likely to result in false assumptions by the package.
+# This program checks all files in the current directory and any
+# subdirectories for portability issues that are likely to result in
+# false assumptions by the package.
#
# The most prominent example is the "==" operator of test(1), which is
# only implemented by bash and some versions of the ksh.
#
+# usage: check-portability.sh
+#
set -eu
-. "${PKGSRCDIR}/mk/check/check-subr.sh"
+checkdir=`dirname "$0"`
+. "$checkdir/check-subr.sh"
cs_setprogname "$0"
+: ${SKIP_FILTER:=""}
+
found_random=no
found_test_eqeq=no
@@ -20,8 +26,8 @@ check_shell() {
env \
CK_FNAME="$1" \
CK_PROGNAME="check-portability.awk" \
- awk -f "$PKGSRCDIR/mk/check/check-subr.awk" \
- -f "$PKGSRCDIR/mk/check/check-portability.awk" \
+ awk -f "$checkdir/check-subr.awk" \
+ -f "$checkdir/check-portability.awk" \
< "$1" 1>&2 \
|| cs_exitcode=1
}
diff --git a/mk/check/check-subr.sh b/mk/check/check-subr.sh
index 9c32d414f32..47ad2beae1a 100644
--- a/mk/check/check-subr.sh
+++ b/mk/check/check-subr.sh
@@ -1,12 +1,9 @@
-# $NetBSD: check-subr.sh,v 1.4 2006/11/11 23:08:00 rillig Exp $
+# $NetBSD: check-subr.sh,v 1.5 2007/01/02 17:58:11 rillig Exp $
#
# This file contains shell functions that are used by the various shell
# programs that check things in pkgsrc. All these programs must be
# called with the following environment variables set:
#
-# PKGSRCDIR
-# The root directory of the pkgsrc tree.
-#
# SKIP_FILTER
# A shell expression of the form
#