From 2522f3363d0ccbb714b010c6ce79eb698052cca3 Mon Sep 17 00:00:00 2001 From: Andrew John Hughes Date: Sun, 16 Jan 2005 02:14:44 +0000 Subject: 2005-01-16 Andrew John Hughes * Merge of November 2004 HEAD patches to generics branch --- scripts/Makefile.am | 2 + scripts/check_jni_methods.sh | 47 +++++++++++ scripts/classpath-build | 19 +++-- scripts/eclipse-gnu.xml | 186 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 248 insertions(+), 6 deletions(-) create mode 100644 scripts/Makefile.am create mode 100755 scripts/check_jni_methods.sh create mode 100644 scripts/eclipse-gnu.xml (limited to 'scripts') diff --git a/scripts/Makefile.am b/scripts/Makefile.am new file mode 100644 index 000000000..e4667418f --- /dev/null +++ b/scripts/Makefile.am @@ -0,0 +1,2 @@ + +EXTRA_DIST = check_jni_methods.sh diff --git a/scripts/check_jni_methods.sh b/scripts/check_jni_methods.sh new file mode 100755 index 000000000..c9cd16ead --- /dev/null +++ b/scripts/check_jni_methods.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +TMPFILE=`mktemp` +TMPFILE2=`mktemp` +TMPFILE3=`mktemp` + +# Find all methods defined in the header files generated +# from the java source files. +grep -h '^JNIEXPORT .* Java_' include/*.h | \ + sed -e 's,^JNIEXPORT .* JNICALL \(Java_\w*\) (.*$,\1,' | \ + sort > $TMPFILE + +# Find all methods in the JNI C source files. +find native/jni -name \*.c | \ + xargs grep -h '^Java_' | \ + sed -e 's,^\(Java_\w*\) *(.*$,\1,' \ + | sort > $TMPFILE2 + +# Write temporary ignore file. +cat > $TMPFILE3 << EOF +-Java_gnu_java_awt_peer_gtk_GtkFramePeer_nativeSetIconImageFromData +-Java_gnu_java_awt_peer_gtk_GtkMenuComponentPeer_dispose +-Java_java_lang_VMSystem_arraycopy +-Java_java_lang_VMSystem_identityHashCode +EOF + +# Compare again silently. +diff -ub -0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | grep -q -v -f $TMPFILE3 +RESULT=$? + +if test "$RESULT" = "0" ; then + 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 +fi + +# Cleanup. +rm -f $TMPFILE $TMPFILE2 $TMPFILE3 + +if test "$RESULT" = "0" ; then + exit 1 +fi + +exit 0 + diff --git a/scripts/classpath-build b/scripts/classpath-build index 0d0e38378..cd0e7d63e 100755 --- a/scripts/classpath-build +++ b/scripts/classpath-build @@ -1,5 +1,6 @@ #!/bin/sh +# cvs may timeout ... set -e export CVS_RSH=ssh @@ -12,6 +13,8 @@ DATE=`date +"%Y%m%d"` OUTPUTDIR=$HOME/public_html/classpath/daily LOGFILE=$OUTPUTDIR/classpath-$DATE.log +echo -n > $LOGFILE + if [ -d $CLASSPATH_CVSSRCDIR ] ; then echo "update cvs source tree" >> $LOGFILE cd $CLASSPATH_CVSSRCDIR @@ -22,8 +25,12 @@ if [ -d $CLASSPATH_SRCDIR ] ; then # delete old sources echo "delete old source tree" >> $LOGFILE + + # workaround for automake safety behaviour with umask + chmod u+w -R $CLASSPATH_SRCDIR + rm -rf $CLASSPATH_SRCDIR - + fi echo "copy cvs tree to source tree" >> $LOGFILE @@ -37,10 +44,7 @@ if [ -f configure.ac ] ; then fi # generate autofriends stuff -aclocal -I /usr/local/share/aclocal -I . >> $LOGFILE 2>&1 -autoheader >> $LOGFILE 2>&1 -autoconf >> $LOGFILE 2>&1 -automake >> $LOGFILE 2>&1 +./autogen.sh >> $LOGFILE 2>&1 # create build directory mkdir build @@ -48,7 +52,7 @@ cd build # configure and build classpath export LD_LIBRARY_PATH=/usr/local/lib -../configure --prefix=$HOME/local/classpath --with-jikes=/usr/bin/jikes --enable-jni --enable-gtk-peer --enable-regen-headers >> $LOGFILE 2>&1 +../configure --prefix=$HOME/local/classpath --with-jikes=/usr/bin/jikes --enable-glibj=both --enable-jni --enable-gtk-peer --enable-regen-headers >> $LOGFILE 2>&1 make >> $LOGFILE 2>&1 make install >> $LOGFILE 2>&1 @@ -59,3 +63,6 @@ cp classpath-$DATE.tar.gz $OUTPUTDIR cd $OUTPUTDIR ln -sf classpath-$DATE.tar.gz LATEST-SNAPSHOT ln -sf classpath-$DATE.log LATEST-BUILDLOG + +exit 0 + diff --git a/scripts/eclipse-gnu.xml b/scripts/eclipse-gnu.xml new file mode 100644 index 000000000..8d04e08e1 --- /dev/null +++ b/scripts/eclipse-gnu.xml @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.1