blob: 192e44a05d2ec4788fec81fa01f6f1ccab4a5ff9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/include
JAVADEST = src/com/wiredtiger/db
JAVADESTFULL = $(srcdir)/$(JAVADEST)
JAVAEXAMPLES = $(top_srcdir)/examples/java/com/wiredtiger/examples
JAVATEST = $(top_srcdir)/test/java/com/wiredtiger/test
BUILT_SOURCES = wiredtiger_wrap.c
SWIG_SOURCES = wiredtiger.i
JDOCDIR = $(top_srcdir)/docs/java
# The Java documentation is currently generated by Doxygen - disable javadoc
#java_DATA = $(JDOCDIR)/index.html
javadir = $(datadir)/java/$(PACKAGE)-$(PACKAGE_VERSION)
JAVA_SRC = \
$(JAVADESTFULL)/AsyncCallback.java \
$(JAVADESTFULL)/AsyncOp.java \
$(JAVADESTFULL)/AsyncOpType.java \
$(JAVADESTFULL)/Connection.java \
$(JAVADESTFULL)/Cursor.java \
$(JAVADESTFULL)/SearchStatus.java \
$(JAVADESTFULL)/PackFormatInputStream.java \
$(JAVADESTFULL)/PackInputStream.java \
$(JAVADESTFULL)/PackOutputStream.java \
$(JAVADESTFULL)/PackUtil.java \
$(JAVADESTFULL)/Session.java \
$(JAVADESTFULL)/WiredTigerException.java \
$(JAVADESTFULL)/WiredTigerPackingException.java \
$(JAVADESTFULL)/WiredTigerPanicException.java \
$(JAVADESTFULL)/WiredTigerRollbackException.java \
$(JAVADESTFULL)/wiredtiger.java \
$(JAVADESTFULL)/wiredtigerConstants.java \
$(JAVADESTFULL)/wiredtigerJNI.java \
$(JAVAEXAMPLES)/ex_access.java \
$(JAVAEXAMPLES)/ex_all.java \
$(JAVAEXAMPLES)/ex_async.java \
$(JAVAEXAMPLES)/ex_call_center.java \
$(JAVAEXAMPLES)/ex_cursor.java \
$(JAVAEXAMPLES)/ex_log.java \
$(JAVAEXAMPLES)/ex_schema.java \
$(JAVAEXAMPLES)/ex_stat.java \
$(JAVAEXAMPLES)/ex_thread.java
JAVA_JUNIT = \
$(JAVATEST)/AutoCloseTest.java \
$(JAVATEST)/AsyncTest.java \
$(JAVATEST)/BackupCursorTest.java \
$(JAVATEST)/ConfigTest.java \
$(JAVATEST)/CursorTest.java \
$(JAVATEST)/CursorTest02.java \
$(JAVATEST)/ExceptionTest.java \
$(JAVATEST)/PackTest.java \
$(JAVATEST)/PackTest02.java \
$(JAVATEST)/PackTest03.java \
$(JAVATEST)/WiredTigerSuite.java
dist_java_JAVA = $(JAVA_SRC) @JAVA_JUNIT@
dist_java_DATA = wiredtiger.jar
EXTRA_JAVA = $(JAVA_JUNIT)
java_LTLIBRARIES = libwiredtiger_java.la
TESTS_JUNIT = AllJunitTests
TESTS = @TESTS_JUNIT@
AllJunitTests:
echo "#! /bin/sh" > $@
echo 'SCRIPT_DIR=`dirname $$0`' >> $@
echo 'env LD_LIBRARY_PATH=$$SCRIPT_DIR/../../.libs:$$SCRIPT_DIR/.libs DYLD_LIBRARY_PATH=$$SCRIPT_DIR/../../.libs JAVA_LIBRARY_PATH=$$SCRIPT_DIR/.libs @JUNIT@ com.wiredtiger.test.WiredTigerSuite' >> $@
chmod +x $@
mkdir -p WT_HOME
CPPFLAGS += $(JNI_CPPFLAGS)
# Some warnings when compiling the generated code are unavoidable
CFLAGS += -w
libwiredtiger_java_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES)
#libwiredtiger_java_la_LDFLAGS = -module
libwiredtiger_java_la_LIBADD = $(abs_top_builddir)/libwiredtiger.la
all-local: wiredtiger.jar
$(srcdir)/wiredtiger_wrap.c: $(top_srcdir)/src/include/wiredtiger.in $(SWIG_SOURCES)
(cd $(srcdir) && \
$(SWIG) -Wall -v -java -nodefaultctor -nodefaultdtor -package com.wiredtiger.db -I$(abs_top_builddir) -outdir $(JAVADEST) -o wiredtiger_wrap.c wiredtiger.i)
$(JDOCDIR)/index.html: $(dist_java_JAVA)
mkdir -p $(JDOCDIR)
javadoc -public -d $(JDOCDIR) -link http://docs.oracle.com/javase/6/docs/api $(JAVADESTFULL)/wiredtiger.java $(JAVADESTFULL)/wiredtigerConstants.java $(JAVADESTFULL)/[A-Z]*.java
wiredtiger.jar: $(dist_java_JAVA) classjava.stamp
(cd $(top_builddir) && \
$(JAR) -cf wiredtiger.jar com/)
cp $(top_builddir)/wiredtiger.jar .
|