Hi Dalibor, On Wed, 2005-08-17 at 03:41 +0200, Dalibor Topic wrote: > thanks for your patch and your help in testing this on IRC. While the > build works fine for me wihout it, ( > [...] > make[4]: Leaving directory > `/home/topic/projects/build-classpath/native/jni/qt-peer' > make[3]: Leaving directory > `/home/topic/projects/build-classpath/native/jni/qt-peer' > make[3]: Entering directory > `/home/topic/projects/build-classpath/native/jni' > cd ../../../classpath/classpath && scripts/check_jni_methods.sh > diff: `-0' option is obsolete; use `-U 0' > diff: Try `diff --help' for more information. > make[3]: Leaving directory `/home/topic/projects/build-classpath/native/jni' > make[2]: Leaving directory `/home/topic/projects/build-classpath/native/jni' > [...] > ), > feel free to check it in if it helps in your build environment.
Strange. Our build environments much be a bit different since I don't get this warning. I changed my patch to use -U 0 now. 2005-08-17 Mark Wielaard <[EMAIL PROTECTED]> * scripts/check_jni_methods.sh: Find JNI method declarations in .cpp files. Check both GNU style functions (start of line) and one-line like declarations. Use diff -U 0, not -0. Committed, Mark
Index: scripts/check_jni_methods.sh =================================================================== RCS file: /cvsroot/classpath/classpath/scripts/check_jni_methods.sh,v retrieving revision 1.8 diff -u -r1.8 check_jni_methods.sh --- scripts/check_jni_methods.sh 13 Aug 2005 18:00:14 -0000 1.8 +++ scripts/check_jni_methods.sh 17 Aug 2005 10:14:42 -0000 @@ -18,8 +18,19 @@ # 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,' | \ - sort > $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 +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 +mv $TMPFILE2 $TMPFILE3 +sort $TMPFILE3 > $TMPFILE2 +rm $TMPFILE3 # Write temporary ignore file. cat > $TMPFILE3 << EOF @@ -29,14 +40,14 @@ EOF # Compare again silently. -if diff -ub -0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | grep -q -v -f $TMPFILE3; +if diff -b -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | grep -q -v -f $TMPFILE3; then PROBLEM=1 echo "Found a problem with the JNI methods declared and implemented." echo "(-) missing in implementation, (+) missing in header files" # Compare the found method lists. - diff -ub -0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | grep -v -f $TMPFILE3 + diff -b -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | grep -v -f $TMPFILE3 fi # Cleanup.
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches