]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
After compiling jimsh, run sanity tests on it to ensure that it is built with -DJIM_C...
authorstephan <stephan@noemail.net>
Wed, 23 Oct 2024 16:46:46 +0000 (16:46 +0000)
committerstephan <stephan@noemail.net>
Wed, 23 Oct 2024 16:46:46 +0000 (16:46 +0000)
FossilOrigin-Name: ea6a14a6e64c0ed2306b9b3048132659094259b95b49a9572f7178c26b28f93a

Makefile.in
auto.def
manifest
manifest.uuid

index f7801f4e98a6b82b3d450ebc3a7020cb562d92f4..f284b242a9a62f474316b5e6605a91c3658a04c9 100644 (file)
@@ -75,6 +75,7 @@ includedir ?= @includedir@
 #
 # Just testing some default dir expansions...
 # srcdir = @srcdir@
+# builddir = @builddir@
 # top_srcdir = @top_srcdir@
 # abs_top_srcdir = @abs_top_srcdir@
 # abs_top_builddir = @abs_top_builddir@
@@ -127,10 +128,29 @@ TCCX += -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite
 # to build it with another option enabled for use with the various
 # code generators.
 #
-JIMSH = @srcdir@/jimsh
+# After jimsh is compiled, we run some sanity checks to ensure that
+# it was built in a way compatible with this project's scripts:
+#
+# 1) Ensure that it was built with realpath() or _fullpath() support.
+# Without that flag the [file normalize] command will always resolve
+# to an empty string.
+#
+# 2) Ensure that it is built with -DJIM_COMPAT (which may be
+# hard-coded into jimsh0.c). Without this, the [expr] command
+# accepts only a single argument.
+#
 CFLAGS_JIMSH ?= @CFLAGS_JIMSH@
+JIMSH = @builddir@/jimsh$(TEXE)
 $(JIMSH): $(TOP)/autosetup/jimsh0.c
-       $(BCC) -o $(JIMSH) $(CFLAGS_JIMSH) $(TOP)/autosetup/jimsh0.c
+       $(BCC) -o $@ $(CFLAGS_JIMSH) $(TOP)/autosetup/jimsh0.c
+       @if [ x = "x$$($(JIMSH) -e 'file normalize $(JIMSH)' 2>/dev/null)" ]; then \
+               echo "jimsh was built without -DHAVE_REALPATH or -DHAVE__FULLPATH." 1>&2; \
+               exit 1; \
+       fi
+       @if [ x3 != "x$$($(JIMSH) -e 'expr 1 + 2' 2>/dev/null)" ]; then \
+               echo "jimsh was built without -DJIM_COMPAT." 1>&2; \
+               exit 1; \
+       fi
 
 # BTCLSH is the tclsh-compatible app used for running various code
 # generators and other in-tree tools, as opposed to the TCL-based
index d8185c90ded39744804cbac62f97110b41386d12..2a298714d3bee3aed590945687e31749dd8b24ec 100644 (file)
--- a/auto.def
+++ b/auto.def
@@ -651,6 +651,7 @@ if {[cc-check-functions realpath]} {
 }
 msg-result "TCL for code generation: $cgtcl"
 unset cgtcl
+#define CFLAGS_JIMSH {-DJUST_TESTING}
 
 # /TCL
 ########################################################################
index 79dace90bfa27484c7f82a1a1eddb11a765a2e93..4c07bf7b92630891f055c74188a7f3a8ea147506 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C Work\saround\sa\sminor\sJimTCL\sregexp\sincompatibility\sin\stool/vdbe-compress.tcl.\sSummary:\sit\sthinks\sthat\sbackslash-escaped\soctal\svalues\sare\sback-references,\swhich\sit\sdoes\snot\slike.
-D 2024-10-23T16:03:51.991
+C After\scompiling\sjimsh,\srun\ssanity\stests\son\sit\sto\sensure\sthat\sit\sis\sbuilt\swith\s-DJIM_COMPAT\sand\sone\sof\s(-DHAVE_REALPATH,\s-DHAVE__FULLPATH).
+D 2024-10-23T16:46:46.669
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
-F Makefile.in 2bee04a7f1a852d95deee05abed3ec5c7b57828fdfb1dd76208f64ababe05734
+F Makefile.in 2543a2bc53ef627ec0cf45a41ad14f571b5a3bff0049d84a390c5183455c6a09
 F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6
 F Makefile.msc 58b69eda1faad5d475092b8aeffab9156ee4901a82db089b166607f2ec907ee4
 F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159
@@ -14,7 +14,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d
 F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
-F auto.def f18d3ac2c10f00e2dcb216e444180c1285b74fadc462107c44c45462d68fc2f5
+F auto.def d29dde15497d1de443b4fb9aba96d084eeaa4ed08c18939af8bb2aabdada1328
 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
 F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
@@ -2240,8 +2240,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 6c5826d7522eade0f5682367637f45b0b64a7cced3cd7d643a30fb9ab0acd2a9
-R 4b2c513ad55674fcf9024d65f21597c1
+P aeac23359bb681c0c86c55c83ab9c16973822f6bc4e1a11959102b062333e358
+R a7bc168b9304f807692f7a48ff3b1fd1
 U stephan
-Z 4d628e9a2ca6d7aa1cdb129ebf537bbf
+Z e22ea7d251580efff9ff3789b0efb608
 # Remove this line to create a well-formed Fossil manifest.
index f883a5a4e747f67176a4b0a5b5eb07502f453bab..ef9eb68ae4408d629fa12d22b6d4781a18a54293 100644 (file)
@@ -1 +1 @@
-aeac23359bb681c0c86c55c83ab9c16973822f6bc4e1a11959102b062333e358
+ea6a14a6e64c0ed2306b9b3048132659094259b95b49a9572f7178c26b28f93a