Adapt JNI build to be buildable with or without SQLTester.
FossilOrigin-Name: adae7d78692af73e770a9cc0a4264ab32ecc18a5c0deb64f3c1e790d959bab43
This commit is contained in:
parent
c783fd36dc
commit
78fc4ae4d9
@ -43,6 +43,8 @@ SQLTester.class := $(SQLTester.java:.java=.class)
|
||||
# The future of FTS5 customization in this API is as yet unclear.
|
||||
# It would be a real doozy to bind to JNI.
|
||||
enable.fts5 ?= 1
|
||||
# If enable.tester is 0, the org/sqlite/jni/tester/* bits are elided.
|
||||
enable.tester ?= 1
|
||||
|
||||
# Be explicit about which Java files to compile so that we can work on
|
||||
# in-progress files without requiring them to be in a compilable statae.
|
||||
@ -90,7 +92,10 @@ JAVA_FILES.tester := $(patsubst %,$(dir.src.jni.tester)/%,\
|
||||
CLASS_FILES.main := $(JAVA_FILES.main:.java=.class)
|
||||
CLASS_FILES.tester := $(JAVA_FILES.tester:.java=.class)
|
||||
|
||||
JAVA_FILES += $(JAVA_FILES.main) $(JAVA_FILES.tester)
|
||||
JAVA_FILES += $(JAVA_FILES.main)
|
||||
ifeq (1,$(enable.tester))
|
||||
JAVA_FILES += $(JAVA_FILES.tester)
|
||||
endif
|
||||
|
||||
CLASS_FILES :=
|
||||
define DOTCLASS_DEPS
|
||||
@ -183,8 +188,10 @@ ifeq (1,$(enable.fts5))
|
||||
$(eval $(call ADD_JNI_H,fts5_api))
|
||||
$(eval $(call ADD_JNI_H,fts5_tokenizer))
|
||||
endif
|
||||
sqlite3-jni.h.in += $(dir.bld.c)/org_sqlite_jni_tester_SQLTester.h
|
||||
$(dir.bld.c)/org_sqlite_jni_tester_SQLTester.h: $(dir.src.jni.tester)/SQLTester.java
|
||||
ifeq (1,$(enable.tester))
|
||||
sqlite3-jni.h.in += $(dir.bld.c)/org_sqlite_jni_tester_SQLTester.h
|
||||
$(dir.bld.c)/org_sqlite_jni_tester_SQLTester.h: $(dir.src.jni.tester)/SQLTester.java
|
||||
endif
|
||||
#sqlite3-jni.dll.cfiles := $(dir.src.c)
|
||||
sqlite3-jni.dll.cflags := \
|
||||
-fPIC \
|
||||
@ -202,7 +209,9 @@ sqlite3-jni.dll.cflags := \
|
||||
# subdir which lives under $(JDK_HOME)/include and is a required
|
||||
# include path for client-level code.
|
||||
########################################################################
|
||||
|
||||
ifeq (1,$(enable.tester))
|
||||
sqlite3-jni.dll.cflags += -DS3JNI_ENABLE_SQLTester
|
||||
endif
|
||||
$(sqlite3-jni.h): $(sqlite3-jni.h.in) $(MAKEFILE)
|
||||
cat $(sqlite3-jni.h.in) > $@
|
||||
$(sqlite3-jni.dll): $(sqlite3-jni.h) $(sqlite3.c) $(sqlite3.h)
|
||||
@ -219,14 +228,17 @@ test: $(SQLite3Jni.class) $(sqlite3-jni.dll)
|
||||
org.sqlite.jni.Tester1 $(if $(test.flags),-- $(test.flags),)
|
||||
|
||||
tester.scripts := $(sort $(wildcard $(dir.src)/tests/*.test))
|
||||
.PHONY: tester
|
||||
|
||||
tester.flags ?= --verbose
|
||||
|
||||
.PHONY: tester
|
||||
ifeq (1,$(enable.tester))
|
||||
tester: $(CLASS_FILES.tester) $(sqlite3-jni.dll)
|
||||
$(bin.java) -ea -Djava.library.path=$(dir.bld.c) \
|
||||
$(java.flags) -cp $(classpath) \
|
||||
org.sqlite.jni.tester.SQLTester $(tester.flags) $(tester.scripts)
|
||||
else
|
||||
tester:
|
||||
@echo "SQLTester support is disabled. Build with enable.tester=1 to enable it."
|
||||
endif
|
||||
|
||||
$(package.jar): $(CLASS_FILES) $(MAKEFILE)
|
||||
rm -f $(dir.src)/c/*~ $(dir.src.jni)/*~
|
||||
@ -236,6 +248,7 @@ jar: $(package.jar)
|
||||
|
||||
CLEAN_FILES += $(dir.bld.c)/* \
|
||||
$(dir.src.jni)/*.class \
|
||||
$(dir.src.jni.tester)/*.class \
|
||||
$(sqlite3-jni.dll) \
|
||||
hs_err_pid*.log
|
||||
|
||||
|
@ -4019,6 +4019,7 @@ JDECLFtsXA(jobject,xUserData)(JENV_OSELF,jobject jFcx){
|
||||
// End of the main API bindings. Start of SQLTester bits...
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef S3JNI_ENABLE_SQLTester
|
||||
typedef struct SQLTesterJni SQLTesterJni;
|
||||
struct SQLTesterJni {
|
||||
sqlite3_int64 nDup;
|
||||
@ -4095,6 +4096,7 @@ Java_org_sqlite_jni_tester_SQLTester_installCustomExtensions(JENV_CSELF){
|
||||
sqlite3_auto_extension( (void(*)(void))SQLTester_auto_extension );
|
||||
}
|
||||
|
||||
#endif /* S3JNI_ENABLE_SQLTester */
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// End of SQLTester bindings. Start of lower-level bits.
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Add\sSQLTester\sdup()\sand\sdup_count()\sUDFs.\sCorrect\sarg\shandling\sof\sthe\s--run\scommand.
|
||||
D 2023-08-08T21:05:39.810
|
||||
C Adapt\sJNI\sbuild\sto\sbe\sbuildable\swith\sor\swithout\sSQLTester.
|
||||
D 2023-08-08T21:22:56.734
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -230,9 +230,9 @@ F ext/fts5/tool/showfts5.tcl d54da0e067306663e2d5d523965ca487698e722c
|
||||
F ext/icu/README.txt 7ab7ced8ae78e3a645b57e78570ff589d4c672b71370f5aa9e1cd7024f400fc9
|
||||
F ext/icu/icu.c c074519b46baa484bb5396c7e01e051034da8884bad1a1cb7f09bbe6be3f0282
|
||||
F ext/icu/sqliteicu.h fa373836ed5a1ee7478bdf8a1650689294e41d0c89c1daab26e9ae78a32075a8
|
||||
F ext/jni/GNUmakefile dcd9595bf9b218c8c97a60f558eaacedbd3901f63ed59475f38c73a7692dd084
|
||||
F ext/jni/GNUmakefile 52f402abb8c4695a58f734d20455cf1a5afaaa10ceacc47bcbf1b06a8d5d27e8
|
||||
F ext/jni/README.md e965674505e105626127ad45e628e4d19fcd379cdafc4d23c814c1ac2c55681d
|
||||
F ext/jni/src/c/sqlite3-jni.c 684d22ba352c300118a05918081b7219926469252c904896aa86c3a31025dbe1
|
||||
F ext/jni/src/c/sqlite3-jni.c dc1e8678a6acf182c7933cecba2664d760507abbc9af43201d3ac2c14fc64ea0
|
||||
F ext/jni/src/c/sqlite3-jni.h ec38592e88d32f09ba4bde13f2e135bb7cf8712356b807df521b3fc99edeab32
|
||||
F ext/jni/src/org/sqlite/jni/Authorizer.java 1308988f7f40579ea0e4deeaec3c6be971630566bd021c31367fe3f5140db892
|
||||
F ext/jni/src/org/sqlite/jni/AutoExtension.java 3409ad8954d6466bf772e6be9379e0e337312b446b668287062845755a16844d
|
||||
@ -2090,8 +2090,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P bb8321702eea52fa9d42987a4b053b32d8eba15580a39d7831cd8d6f1ceb62bf
|
||||
R 20b8372fe27975edee36fa6d84512581
|
||||
P 0dba3073f44685a51a5db7ff8886295fe04dfd43f69cbf53ad3d5afce741076b
|
||||
R 2cf9a6c26ac6b2b58530b5684e479d7d
|
||||
U stephan
|
||||
Z 9a23750fa7c3396fc72fc1349e829a3b
|
||||
Z 17c788afc9fee2046b5ea5feb4663dee
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
0dba3073f44685a51a5db7ff8886295fe04dfd43f69cbf53ad3d5afce741076b
|
||||
adae7d78692af73e770a9cc0a4264ab32ecc18a5c0deb64f3c1e790d959bab43
|
Loading…
x
Reference in New Issue
Block a user