mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 22:34:18 +01:00
7382cc71e6
parts of the library we have omitted. storage/bdb/dist/s_config: Change mode to -rw-r--r-- storage/bdb/dist/s_crypto: Change mode to -rw-r--r-- storage/bdb/dist/s_dir: Change mode to -rw-r--r-- storage/bdb/dist/s_include: Change mode to -rw-r--r-- storage/bdb/dist/s_java_const: Change mode to -rw-r--r-- storage/bdb/dist/s_java_stat: Change mode to -rw-r--r-- storage/bdb/dist/s_java_swig: Change mode to -rw-r--r-- storage/bdb/dist/s_javah: Change mode to -rw-r--r-- storage/bdb/dist/s_java: Change mode to -rw-r--r-- storage/bdb/dist/s_je2db: Change mode to -rw-r--r-- storage/bdb/dist/s_readme: Change mode to -rw-r--r-- storage/bdb/dist/s_rpc: Change mode to -rw-r--r-- storage/bdb/dist/s_test: Change mode to -rw-r--r-- storage/bdb/dist/s_vxworks: Change mode to -rw-r--r-- storage/bdb/dist/s_win32_dsp: Change mode to -rw-r--r-- storage/bdb/dist/s_win32: Change mode to -rw-r--r-- storage/bdb/dist/s_winmsi: Change mode to -rw-r--r-- storage/bdb/dist/s_all: Don't bother with VxWorks or Java stuff storage/bdb/dist/s_perm: Skip mod_db4 handling storage/bdb/dist/s_recover: Skip examples handling storage/bdb/dist/s_symlink: Skip examples handling storage/bdb/dist/s_tags: Skip test_perf handling BitKeeper/deleted/.del-build_all.dsp~8d55522d9eb8f029: Delete: storage/bdb/build_win32/build_all.dsp BitKeeper/deleted/.del-db_java_xa.dsp~dffbaca42fa2dc81: Delete: storage/bdb/build_win32/db_java_xa.dsp BitKeeper/deleted/.del-db_lib.dsp~4cc7531e4cd72267: Delete: storage/bdb/build_win32/db_lib.dsp BitKeeper/etc/ignore: Simplify some storage/bdb ignore rules storage/bdb/build_win32/small_dsp.src: New BitKeeper file ``storage/bdb/build_win32/small_dsp.src'' storage/bdb/build_win64/app_dsp.src: New BitKeeper file ``storage/bdb/build_win64/app_dsp.src'' storage/bdb/build_win64/db_test.src: New BitKeeper file ``storage/bdb/build_win64/db_test.src'' storage/bdb/build_win64/dynamic_dsp.src: New BitKeeper file ``storage/bdb/build_win64/dynamic_dsp.src'' storage/bdb/build_win64/ex_repquote.src: New BitKeeper file ``storage/bdb/build_win64/ex_repquote.src'' storage/bdb/build_win64/java_dsp.src: New BitKeeper file ``storage/bdb/build_win64/java_dsp.src'' storage/bdb/build_win64/libdbrc.src: New BitKeeper file ``storage/bdb/build_win64/libdbrc.src'' storage/bdb/build_win64/small_dsp.src: New BitKeeper file ``storage/bdb/build_win64/small_dsp.src'' storage/bdb/build_win64/srcfile_dsp.src: New BitKeeper file ``storage/bdb/build_win64/srcfile_dsp.src'' storage/bdb/build_win64/static_dsp.src: New BitKeeper file ``storage/bdb/build_win64/static_dsp.src'' storage/bdb/build_win64/tcl_dsp.src: New BitKeeper file ``storage/bdb/build_win64/tcl_dsp.src''
55 lines
1.6 KiB
Bash
55 lines
1.6 KiB
Bash
#!/bin/sh -
|
|
# $Id: s_javah,v 1.1 2002/08/14 17:14:24 dda Exp $
|
|
#
|
|
# Use javah to build the libdb_java/com_*.h header files.
|
|
#
|
|
# To run this, you will need a javac and javah in your PATH.
|
|
# If possible, install tools with a recent vintage, JDK 1.3 or higher is good.
|
|
# Using Sun's JDK rather than some other installation ensures
|
|
# that the header files will not be constantly changed.
|
|
|
|
. ./RELEASE
|
|
|
|
JAVAC=javac
|
|
JAVAH=javah
|
|
export CLASSPATH
|
|
CLASSPATH=
|
|
|
|
# CLASSES are only those classes for which we have native methods.
|
|
D=com.sleepycat.db
|
|
CLASSES="$D.Dbc $D.DbEnv $D.Db $D.DbLock $D.DbLogc $D.DbLsn $D.Dbt $D.DbTxn $D.xa.DbXAResource"
|
|
|
|
d=/tmp/__javah
|
|
c=$d/classes
|
|
trap 'rm -rf $d; exit 0' 0 1 2 3 13 15
|
|
|
|
rm -rf $d
|
|
mkdir $d || exit 1
|
|
mkdir $c || exit 1
|
|
|
|
# Make skeleton versions of XA classes and interfaces
|
|
# We only need to compile them, not run them.
|
|
pkg="package javax.transaction.xa"
|
|
echo "$pkg; public interface XAResource {}" > $d/XAResource.java
|
|
echo "$pkg; public interface Xid {}" > $d/Xid.java
|
|
echo "$pkg; public class XAException extends Exception {}" \
|
|
> $d/XAException.java
|
|
|
|
|
|
# Create the .class files and use them with javah to create the .h files
|
|
${JAVAC} -d $c $d/*.java \
|
|
../java/src/com/sleepycat/db/*.java \
|
|
../java/src/com/sleepycat/db/xa/*.java || exit 1
|
|
${JAVAH} -classpath $c -d $d ${CLASSES} || exit 1
|
|
|
|
for cl in ${CLASSES}; do
|
|
h=`echo $cl | sed -e 's/\./_/g'`.h
|
|
t=$d/$h
|
|
f=../libdb_java/$h
|
|
if [ ! -f $t ]; then
|
|
echo "ERROR: $t does not exist"
|
|
exit 1
|
|
fi
|
|
cmp $t $f > /dev/null 2>&1 ||
|
|
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
|
|
done
|