diff options
author | Mark Wielaard <mark@klomp.org> | 2007-10-16 15:23:17 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2007-10-16 15:23:17 +0000 |
commit | 2b9f65a93cf632e001ebebb4c3b3057adc64342e (patch) | |
tree | 3e5c9303fd64488b10ded80e7d1c8058cd11d50a /scripts | |
parent | 30881e7bf036f4a1cd649ddb3b06184f8a7dad91 (diff) | |
download | classpath-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.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check_jni_methods.sh | 10 |
1 files changed, 5 insertions, 5 deletions
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. |