From: stephan Date: Fri, 24 Oct 2025 16:25:23 +0000 (+0000) Subject: ext/wasm/GNUmakefile: (A) When using a custom sqlite3.c, use sqlite3.h from the same... X-Git-Tag: major-release~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=67fa337744244255e424572ba47ca06b22635b91;p=thirdparty%2Fsqlite.git ext/wasm/GNUmakefile: (A) When using a custom sqlite3.c, use sqlite3.h from the same directory instead of the top of this tree. (B) Re-add preprocessor flags for SEE which were misplaced during recent build refactoring. FossilOrigin-Name: 1b1e530a9149ce62d3d53f5c558e358d4e6d1b00e0cce8bb04cb6b13d1841538 --- diff --git a/ext/wasm/GNUmakefile b/ext/wasm/GNUmakefile index 764c151783..ceceae9860 100644 --- a/ext/wasm/GNUmakefile +++ b/ext/wasm/GNUmakefile @@ -227,7 +227,7 @@ endef # Args: as for $(b.c-pp.shcmd). define b.c-pp.target $(3): $$(MAKEFILE_LIST) $$(bin.c-pp) $(2) - @$$(call b.c-pp.shcmd,$(1),$(2),$(3),$(4)) + @$$(call b.c-pp.shcmd,$(1),$(2),$(3),$(4) $(b.c-pp.target.flags)) CLEAN_FILES += $(3) endef @@ -254,19 +254,35 @@ b.strip-js-emcc-bindings = \ echo '$(1) $(emo.garbage) (Probably) /createExportWrapper()/d and /makeInvalidEarlyAccess()/d' +# +# Set up sqlite3.c and sqlite3.h... +# +# To build with SEE (https://sqlite.org/see), either put sqlite3-see.c +# in $(dir.top) or pass sqlite3.c=PATH_TO_sqlite3-see.c to the $(MAKE) +# invocation. Note that only encryption modules with no 3rd-party +# dependencies will currently work here: AES256-OFB, AES128-OFB, and +# AES128-CCM. Not coincidentally, those 3 modules are included in the +# sqlite3-see.c bundle. Note, however, that distributing an SEE build +# of the WASM on a public site is in violation of the SEE license +# because it effectively provides a usable copy of the SEE build to +# all visitors. +# +# A custom sqlite3.c must not have any spaces in its name. +# $(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.c ?= $(firstword $(wildcard $(dir.top)/sqlite3-see.c) $(sqlite3.canonical.c)) +sqlite3.h = $(dir $(sqlite3.c))/sqlite3.h + # # bin.version-info = binary to output various sqlite3 version info for # embedding in the JS files and in building the distribution zip file. # It must NOT be in $(dir.tmp) because we need it to survive the # cleanup process for the dist build to work properly. -# -# Slight caveat: this uses the version info from the in-tree -# sqlite3.c/h, which may diff from a user-provided $(sqlite3.c). The -# end result is that the generated JS files may have static version -# info from $(bin.version-info) which differ from their runtime-emitted -# version info (e.g. from sqlite3_libversion()). -bin.version-info = $(dir.top)/version-info +bin.version-info = ./version-info $(bin.version-info): $(dir.tool)/version-info.c $(sqlite3.h) $(dir.top)/Makefile + $(CC) -o $@ -I$(dir $(sqlite3.h)) $(dir.tool)/version-info.c $(MAKE) -C $(dir.top) version-info t-version-info: $(bin.version-info) # @@ -282,27 +298,6 @@ t-stripccomments: $(bin.stripccomments) DISTCLEAN_FILES += $(bin.stripccomments) -# -# Set up sqlite3.c and sqlite3.h... -# -# To build with SEE (https://sqlite.org/see), either put sqlite3-see.c -# in $(dir.top) or pass sqlite3.c=PATH_TO_sqlite3-see.c to the $(MAKE) -# invocation. Note that only encryption modules with no 3rd-party -# dependencies will currently work here: AES256-OFB, AES128-OFB, and -# AES128-CCM. Not coincidentally, those 3 modules are included in the -# sqlite3-see.c bundle. Note, however, that distributing an SEE build -# of the WASM on a public site is in violation of the SEE license -# because it effectively provides a usable copy of the SEE build to -# all visitors. -# -# A custom sqlite3.c must not have any spaces in its name. -# $(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.c ?= $(firstword $(wildcard $(dir.top)/sqlite3-see.c) $(sqlite3.canonical.c)) -sqlite3.h = $(dir.top)/sqlite3.h - ifeq (1,$(MAKING_CLEAN)) SQLITE_C_IS_SEE = 0 else @@ -314,7 +309,6 @@ else endif endif - # # barebones=1 disables all "extraneous" stuff from sqlite3-wasm.c, the # goal being to create a WASM file with only the core APIs. diff --git a/manifest b/manifest index 275cb09211..9124b988a5 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\s[4e713558f6c6ea3d]\sso\sthat\sit\ssupports\sseparate\sbuilds\sof\srtree. -D 2025-10-24T16:01:55.945 +C ext/wasm/GNUmakefile:\s(A)\sWhen\susing\sa\scustom\ssqlite3.c,\suse\ssqlite3.h\sfrom\sthe\ssame\sdirectory\sinstead\sof\sthe\stop\sof\sthis\stree.\s(B)\sRe-add\spreprocessor\sflags\sfor\sSEE\swhich\swere\smisplaced\sduring\srecent\sbuild\srefactoring. +D 2025-10-24T16:25:23.083 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -576,7 +576,7 @@ F ext/session/sqlite3session.c b3de195ce668cace9b324599bf6255a70290cbfb5451e826e F ext/session/sqlite3session.h 7404723606074fcb2afdc6b72c206072cdb2b7d8ba097ca1559174a80bc26f7a F ext/session/test_session.c 8766b5973a6323934cb51248f621c3dc87ad2a98f023c3cc280d79e7d78d36fb F ext/wasm/EXPORTED_FUNCTIONS.fiddle.in 27450c8b8c70875a260aca55435ec927068b34cef801a96205adb81bdcefc65c -F ext/wasm/GNUmakefile be5cbc4733403459589daf2e0784653c23e7ca8353e78398ef223565d63aa68b +F ext/wasm/GNUmakefile 29b58b16b46d1b90014c44ec5f28c2f3ea8aafeaa9fff9a3b712993b2c06d551 F ext/wasm/README-dist.txt f01081a850ce38a56706af6b481e3a7878e24e42b314cfcd4b129f0f8427066a F ext/wasm/README.md 2e87804e12c98f1d194b7a06162a88441d33bb443efcfe00dc6565a780d2f259 F ext/wasm/SQLTester/GNUmakefile e0794f676d55819951bbfae45cc5e8d7818dc460492dc317ce7f0d2eca15caff @@ -2171,8 +2171,8 @@ F tool/version-info.c 33d0390ef484b3b1cb685d59362be891ea162123cea181cb8e6d2cf6dd F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P b92478c389a9ff57302c021444ced09aef067ab55394dcda38cde97a3f2628d4 -R f5c01aa0313dd47389b9fc4484bf6d21 -U drh -Z a2e9d8f94144911e9df51120edea5ff6 +P d030e955d703772e1637ef2c07d29816fc869ead0a15a85ec8b4633e5ca08e0a +R 9bf38b4c98e4bb4b2c24c1c7f3cac102 +U stephan +Z 74b826dcad1b9ff589b6543aa2aa088e # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index ecdd5340cd..3a85f8d0c3 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d030e955d703772e1637ef2c07d29816fc869ead0a15a85ec8b4633e5ca08e0a +1b1e530a9149ce62d3d53f5c558e358d4e6d1b00e0cce8bb04cb6b13d1841538