]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Adapt the --all flag to apply to a different set of features, and default to enabled...
authorstephan <stephan@noemail.net>
Fri, 4 Apr 2025 16:17:02 +0000 (16:17 +0000)
committerstephan <stephan@noemail.net>
Fri, 4 Apr 2025 16:17:02 +0000 (16:17 +0000)
FossilOrigin-Name: b229c8f65acf41b57afacfde712c3a8040d3bd5139bd5e30d450669658185ddd

autosetup/proj.tcl
autosetup/sqlite-config.tcl
manifest
manifest.uuid

index 707da947e7b5754994498402b0684435cae99ec3..33f95afa4a741f004887f16a09c2bccc2b446c46 100644 (file)
@@ -345,6 +345,9 @@ proc proj-first-bin-of {args} {
 # to the default value of baz. If the user does not explicitly pass in
 # --foo-bar (with or without a value) then this returns 0.
 #
+# Calling [proj-opt-set] is, for purposes of the above, equivalent to
+# explicitly passing in the flag.
+#
 # Note: unlike most functions which deal with configure --flags, this
 # one does not validate that $key refers to a pre-defined flag. i.e.
 # it accepts arbitrary keys, even those not defined via an [options]
index 00f35cad1e2d66913a8f98514df5b95506c6e9a6..a9375b130f8ffad1d9c212ca796612a928c63322 100644 (file)
@@ -60,6 +60,19 @@ array set sqliteConfig [subst [proj-strip-hash-comments {
   # (dump-defines-txt) but also a JSON file named after this option's
   # value.
   dump-defines-json  ""
+
+  #
+  # The list of feature --flags which the --all flag implies. This
+  # requires special handling in a few places and gets replaced with
+  # a different list in the tcl-extension build.
+  #
+  all-flag-enables {fts4 fts5 rtree geopoly session}
+
+  #
+  # Default value for the --all flag. Gets changed for the
+  # tcl-extension build.
+  #
+  all-flag-default 0
 }]]
 
 ########################################################################
@@ -88,6 +101,12 @@ proc sqlite-configure {buildMode configScript} {
   if {$buildMode ni $allBuildModes} {
     user-error "Invalid build mode: $buildMode. Expecting one of: $allBuildModes"
   }
+  if {$::sqliteConfig(all-flag-default)} {
+    set allFlagHelp "Disable these extensions: $::sqliteConfig(all-flag-enables)"
+  } else {
+    set allFlagHelp "Enable these extensions: $::sqliteConfig(all-flag-enables)"
+  }
+
   set ::sqliteConfig(build-mode) $buildMode
   ########################################################################
   # A gentle introduction to flags handling in autosetup
@@ -194,7 +213,7 @@ proc sqlite-configure {buildMode configScript} {
         geopoly              => {Enable the GEOPOLY extension}
         rtree                => {Enable the RTREE extension}
         session              => {Enable the SESSION extension}
-        all                  => {Enable FTS4, FTS5, Geopoly, RTree, Sessions}
+        all=$::sqliteConfig(all-flag-default) => {$allFlagHelp}
         largefile=1
           => {This legacy flag has no effect on the library but may influence
               the generated sqlite_cfg.h by adding #define HAVE_LFS}
@@ -720,14 +739,9 @@ proc sqlite-setup-default-cflags {} {
 # Handle various SQLITE_ENABLE/OMIT_... feature flags.
 proc sqlite-handle-common-feature-flags {} {
   msg-result "Feature flags..."
-  if {"tcl-extension" eq $::sqliteConfig(build-mode)} {
-    set allFlagEnables {fts3 fts4 fts5 rtree geopoly}
-  } else {
-    set allFlagEnables {fts4 fts5 rtree rtree geopoly session}
-  }
   if {![opt-bool all]} {
     # Special handling for --disable-all
-    foreach flag $allFlagEnables {
+    foreach flag $::sqliteConfig(all-flag-enables) {
       if {![proj-opt-was-provided $flag]} {
         proj-opt-set $flag 0
       }
@@ -748,7 +762,7 @@ proc sqlite-handle-common-feature-flags {} {
       # The --geopoly flag, though, will automatically re-enable
       # --rtree, so --disable-rtree won't actually disable anything in
       # that case.
-      foreach k $allFlagEnables {
+      foreach k $::sqliteConfig(all-flag-enables) {
         if {![proj-opt-was-provided $k]} {
           proj-opt-set $k 1
         }
index 9e35c1a15d0cc3eb5b04ab18e60c41241e0bb74a..5931b1dca29524ba141c925779001c3408391209 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Improve\s--all\sflag\shandling\sso\sthat\scombinations\sof\s(--all\s--disable-FEATURE)\sand\s(--disable-all\s--FEATURE)\swork\smore\sintuitively.\sAdd\smissing\shandling\sof\sthe\s--fts3\sflag\s(it\swas\saccepted\sbut\signored\sbefore).\sAdd\sTCL_LIBS\sto\sthe\sset\sof\svars\sexported\svia\stclConfig.sh\sfor\suse\sin\sthe\stea\sbuild.
-D 2025-04-04T15:41:19.342
+C Adapt\sthe\s--all\sflag\sto\sapply\sto\sa\sdifferent\sset\sof\sfeatures,\sand\sdefault\sto\senabled,\sfor\sthe\stcl-extension\sbuild.
+D 2025-04-04T16:17:02.677
 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -51,8 +51,8 @@ F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e
 F autosetup/find_tclconfig.tcl e64886ffe3b982d4df42cd28ed91fe0b5940c2c5785e126c1821baf61bc86a7e
 F autosetup/jimsh0.c a57c16e65dcffc9c76e496757cb3f7fb47e01ecbd1631a0a5e01751fc856f049
 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
-F autosetup/proj.tcl 1e244d61c93fd79586be59e4718f8e3538ee47a9cbff325f62f7b222863c2fea
-F autosetup/sqlite-config.tcl 294a1e0e0f4c39bb210523b148e286d9f70a18f8f7407388ac77878da58c8a5c
+F autosetup/proj.tcl ad2cf7a01c3ff3571fea1da299910c76b00484f6662f3ba7a625051117837e8e
+F autosetup/sqlite-config.tcl 4349a7b68e100137b59b9fe27da7d622185a4932b95b77c7b7922800af5920bf
 F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
 F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
 F contrib/sqlitecon.tcl eb4c6578e08dd353263958da0dc620f8400b869a50d06e271ab0be85a51a08d3
@@ -2216,8 +2216,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
 F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 32ef3f26e7fb34dfdb23617a19bb9baa2e4c3dca564a88850b58a0fbe6446cf8
-R 0155e095440bdd5fe99e88b4e49cb70c
+P 26ef0ff4bfbb4425baa26fa5c8420f5da0603c38ef651104e566c7dc85bfaa3a
+R 5ab57a421300c0c0e5e98ecd6d96713d
 U stephan
-Z a056ac7f76093e9e0558ddb35384b15d
+Z 68f06e0eff70f5e6c5a65134984dc57b
 # Remove this line to create a well-formed Fossil manifest.
index c952cb379597865343586c9c66221ef1eb348098..b17172fa7d330b25444fbc8c2298fcbcf489ed09 100644 (file)
@@ -1 +1 @@
-26ef0ff4bfbb4425baa26fa5c8420f5da0603c38ef651104e566c7dc85bfaa3a
+b229c8f65acf41b57afacfde712c3a8040d3bd5139bd5e30d450669658185ddd