pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/configure Warnings must only be prefixed by a warni...
details: https://anonhg.NetBSD.org/pkgsrc/rev/eabaeda9e002
branches: trunk
changeset: 519958:eabaeda9e002
user: rillig <rillig%pkgsrc.org@localhost>
date: Thu Oct 12 20:36:34 2006 +0000
description:
Warnings must only be prefixed by a warnings heading, not an error
heading.
diffstat:
mk/configure/check-portability.sh | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diffs (60 lines):
diff -r c33d5f0a9227 -r eabaeda9e002 mk/configure/check-portability.sh
--- a/mk/configure/check-portability.sh Thu Oct 12 19:23:41 2006 +0000
+++ b/mk/configure/check-portability.sh Thu Oct 12 20:36:34 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: check-portability.sh,v 1.1 2006/10/12 17:57:05 rillig Exp $
+# $NetBSD: check-portability.sh,v 1.2 2006/10/12 20:36:34 rillig Exp $
#
# This program checks the extracted files for portability issues that
# are likely to result in false assumptions by the package.
@@ -15,6 +15,8 @@
exitcode=0
+last_heading=""
+
error_msg() {
echo "ERROR: [check-portability.sh] $*" 1>&2
exitcode=1
@@ -24,15 +26,20 @@
echo "WARNING: [check-portability.sh] $*" 1>&2
}
-last_heading=""
-heading() {
-
+error_heading() {
if test "$1" != "$last_heading"; then
last_heading="$1"
error_msg "=> $1"
fi
}
+warning_heading() {
+ if test "$1" != "$last_heading"; then
+ last_heading="$1"
+ warning_msg "=> $1"
+ fi
+}
+
# usage: check_shell <fname>
check_shell() {
# See the end of the loop for the redirection.
@@ -56,7 +63,7 @@
;;
*\$RANDOM*)
- heading "Found \$RANDOM:"
+ warning_heading "Found \$RANDOM:"
warning_msg "$fname: $line"
;;
esac
@@ -69,7 +76,7 @@
case "$1" in
"test" | "[")
if [ "==" = "$3" ]; then
- heading "Found test ... == ...:"
+ error_heading "Found test ... == ...:"
error_msg "$fname: $line"
fi
;;
Home |
Main Index |
Thread Index |
Old Index