summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2007-10-16 15:23:17 +0000
committerMark Wielaard <mark@klomp.org>2007-10-16 15:23:17 +0000
commit2b9f65a93cf632e001ebebb4c3b3057adc64342e (patch)
tree3e5c9303fd64488b10ded80e7d1c8058cd11d50a
parent30881e7bf036f4a1cd649ddb3b06184f8a7dad91 (diff)
downloadclasspath-2b9f65a93cf632e001ebebb4c3b3057adc64342e.tar.gz
2007-10-16 from Alexandre Oliva <aoliva@redhat.com>
* scripts/check_jni_methods.sh: Don't depend on diff -b ignoring a single trailing whitespace.
-rw-r--r--ChangeLog5
-rwxr-xr-xscripts/check_jni_methods.sh10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 12e224c2d..406fde275 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-16 from Alexandre Oliva <aoliva@redhat.com>
+
+ * scripts/check_jni_methods.sh: Don't depend on diff -b ignoring
+ a single trailing whitespace.
+
2007-10-16 Andrew John Hughes <gnu_andrew@member.fsf.org>
* m4/acinclude.m4: Add -sourcepath so that
diff --git a/scripts/check_jni_methods.sh b/scripts/check_jni_methods.sh
index b46e37821..90a7735ba 100755
--- a/scripts/check_jni_methods.sh
+++ b/scripts/check_jni_methods.sh
@@ -16,16 +16,16 @@ grep -h '^JNIEXPORT .* Java_' include/*.h | \
# Find all methods in the JNI C source files.
find native/jni -name \*.c | \
xargs grep -h '^Java_' | \
- LC_ALL=C sed -e 's,^\(Java_[a-z_A-Z0-9]*\) *(.*$,\1,' > $TMPFILE2
+ LC_ALL=C sed -e 's,^\(Java_[a-z_A-Z0-9]*\).*$,\1,' > $TMPFILE2
# Or in the the C++ files. (Note that cpp doesn't follow gnu conventions atm)
# So we try to match both GNU style and some other style.
find native/jni -name \*.cpp | \
xargs grep -h '^Java_' | \
- LC_ALL=C sed -e 's,^\(Java_[a-z_A-Z0-9]*\) *(.*$,\1,' >> $TMPFILE2
+ LC_ALL=C sed -e 's,^\(Java_[a-z_A-Z0-9]*\).*$,\1,' >> $TMPFILE2
find native/jni -name \*.cpp | \
xargs egrep -h '^(JNIEXPORT .* JNICALL )?Java_' | \
cut -f4 -d\ | \
- LC_ALL=C sed -e 's,^\JNIEXPORT .* JNICALL \(Java_[a-z_A-Z0-9]*\) *(.*$,\1,' >> $TMPFILE2
+ LC_ALL=C sed -e 's,^\JNIEXPORT .* JNICALL \(Java_[a-z_A-Z0-9]*\).*$,\1,' >> $TMPFILE2
mv $TMPFILE2 $TMPFILE3
sort $TMPFILE3 | uniq > $TMPFILE2
rm $TMPFILE3
@@ -40,7 +40,7 @@ EOF
# Compare again silently.
# Use fgrep and direct the output to /dev/null for compatibility with older
# grep instead of using the non portable -q.
-if diff -b -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | \
+if diff -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | \
fgrep -v -f $TMPFILE3 > /dev/null;
then
PROBLEM=1
@@ -48,7 +48,7 @@ then
echo "(-) missing in implementation, (+) missing in header files"
# Compare the found method lists.
- diff -b -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | fgrep -v -f $TMPFILE3
+ diff -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | fgrep -v -f $TMPFILE3
fi
# Cleanup.