Initial pass at 'make dist' rules for the JNI bundle, but they still need a bare-bones, posix-make-compatible makefile to include in the bundle.

FossilOrigin-Name: ff54e66a4d43f2f0f8b25ded970779e6760865a05346e09b39607bb035b02bd7
This commit is contained in:
stephan 2023-08-10 18:57:37 +00:00
parent 2ee01b0c9a
commit a52b8c8845
3 changed files with 61 additions and 10 deletions

View File

@ -17,6 +17,7 @@ package.version := 0.0.1
package.jar := sqlite3-jni-$(package.version).jar
dir.top := ../..
dir.tool := ../../tool
dir.jni := $(patsubst %/,%,$(dir $(MAKEFILE)))
dir.src := $(dir.jni)/src
@ -134,9 +135,10 @@ all: $(SQLite3Jni.class)
# $(sqlite3.canonical.c) must point to the sqlite3.c in
# the sqlite3 canonical source tree, as that source file
# is required for certain utility and test code.
sqlite3.canonical.c := $(dir.top)/sqlite3.c
sqlite3.canonical.c := $(firstword $(wildcard $(dir.src.c)/sqlite3.c $(dir.top)/sqlite3.c))
sqlite3.canonical.h := $(firstword $(wildcard $(dir.src.c)/sqlite3.h $(dir.top)/sqlite3.h))
sqlite3.c ?= $(firstword $(wildcard $(dir.top)/sqlite3-see.c) $(sqlite3.canonical.c))
sqlite3.h := $(dir.top)/sqlite3.h
sqlite3.h := $(sqlite3.canonical.h)
#ifeq (,$(shell grep sqlite3_activate_see $(sqlite3.c) 2>/dev/null))
# SQLITE_C_IS_SEE := 0
#else
@ -263,3 +265,52 @@ clean:
distclean: clean
-rm -f $(DISTCLEAN_FILES)
-rm -fr $(dir.bld.c)
########################################################################
# disttribution bundle rules...
ifeq (,$(filter snapshot,$(MAKECMDGOALS)))
dist-name-prefix := sqlite-jni
else
dist-name-prefix := sqlite-jni-snapshot-$(shell /usr/bin/date +%Y%m%d)
endif
dist-name := $(dist-name-prefix)-TEMP
dist-dir.top := $(dist-name)
dist-dir.src := $(dist-dir.top)/src
dist-dir.c := $(dist-dir.src)/c
dist.top.extras := \
README.md
.PHONY: dist snapshot
dist: \
$(bin.version-info) $(sqlite3.canonical.c) \
$(MAKEFILE) $(MAKEFILE.dist)
@echo "Making end-user deliverables..."
@rm -fr $(dist-dir.top)
@mkdir -p $(dist-dir.top) $(dist-dir.c)
@cp -p $(dist.top.extras) $(dist-dir.top)/.
@cp -p $(dir.src.c)/*.[ch] $(dist-dir.c)/.
@cp -p $(sqlite3.canonical.c) $(sqlite3.canonical.h) $(dist-dir.c)/.
@cp -rp $(dir.src)/org $(dist-dir.src)
@set -e; \
vnum=$$($(bin.version-info) --download-version); \
vdir=$(dist-name-prefix)-$$vnum; \
arczip=$$vdir.zip; \
echo "Making $$arczip ..."; \
rm -fr $$arczip $$vdir; \
mv $(dist-dir.top) $$vdir; \
zip -qr $$arczip $$vdir -x '*.class' -x '*~'; \
rm -fr $$vdir; \
ls -la $$arczip; \
set +e; \
unzip -lv $$arczip || echo "Missing unzip app? Not fatal."
snapshot: dist
.PHONY: dist-clean
clean: dist-clean
dist-clean:
rm -fr $(dist-name) $(wildcard sqlite-jni-*.zip)

View File

@ -1,5 +1,5 @@
C Merge\strunk\sinto\sjni\sbranch\sfor\sthe\snewly-relocated\sversion-info\stool.
D 2023-08-10T17:39:26.960
C Initial\spass\sat\s'make\sdist'\srules\sfor\sthe\sJNI\sbundle,\sbut\sthey\sstill\sneed\sa\sbare-bones,\sposix-make-compatible\smakefile\sto\sinclude\sin\sthe\sbundle.
D 2023-08-10T18:57:37.830
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -231,7 +231,7 @@ 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 b579d1c9a55e54ca66859d77218226544402896602b39432070f6a3cbdba0cc7
F ext/jni/GNUmakefile 5a3e20bab883979f7b74fc21ba75dda5300e569cd1d61250c424fae0318c9381
F ext/jni/README.md e965674505e105626127ad45e628e4d19fcd379cdafc4d23c814c1ac2c55681d
F ext/jni/src/c/sqlite3-jni.c fa251d2033d2210a88ac6190db923f76681be609b97f840360318ab366f3cbdd
F ext/jni/src/c/sqlite3-jni.h b19a104e0566440af566366cea72188bd994a96ba85c3f196acaa6f4a4609a55
@ -2064,7 +2064,7 @@ F tool/symbols.sh 1612bd947750e21e7b47befad5f6b3825b06cce0705441f903bf35ced65ae9
F tool/varint.c 5d94cb5003db9dbbcbcc5df08d66f16071aee003
F tool/vdbe-compress.tcl 1dcb7632e57cf57105248029e6e162fddaf6c0fccb3bb9e6215603752c5a2d4a
F tool/vdbe_profile.tcl 3ac5a4a9449f4baf77059358ea050db3e34395ccf59c5464d29b91746d5b961e
F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd72273503ae7d5 w ext/wasm/version-info.c
F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd72273503ae7d5
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
@ -2089,8 +2089,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 4d635f781b55ed9011bdf07ee6bed2d004b1c2ebba76aa110e26d8fe3152a733 4b0871fd367b6d9706e892aa13f64604967f5e3ba92381960f73aeabd3d23f84
R 30af3e66dbd0b2532a573f872e33a7d9
P cc8e8cba67c0dcfb9b416041a19456cf5248d909f3efb6fee707a5950be4f374
R 235efa3b2867de98f67e2a3f239b46e6
U stephan
Z 514337a044b3ac61c7ad0f7afbdbd01a
Z c61740ae33854adb8fa7a57e62ce6199
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
cc8e8cba67c0dcfb9b416041a19456cf5248d909f3efb6fee707a5950be4f374
ff54e66a4d43f2f0f8b25ded970779e6760865a05346e09b39607bb035b02bd7