diff --git a/Makefile.in b/Makefile.in index bcae830f58..77f96a948c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -764,7 +764,10 @@ src-verify: $(TOP)/tool/src-verify.c # JimTCL is part of the autosetup suite and is suitable for certain # in-tree TCL jobs, but it requires that we build it with non-default -# flags. +# flags. Note that the build tree will, if no system-level tclsh is +# found, also have a ./jimsh0. That one is a bare-bones build for the +# configure process, whereas we need to build it with another option +# enabled for use with the various code generators. # JIMSH = @srcdir@/jimsh @if CFLAGS_JIMSH diff --git a/auto.def b/auto.def index 33a9cdfa5f..10009d060e 100644 --- a/auto.def +++ b/auto.def @@ -781,11 +781,11 @@ foreach {boolFlag featureFlag ifSetEvalThis} { } memsys5 -DSQLITE_ENABLE_MEMSYS5 {} } { - if {[hwaci-opt-truthy $boolFlag]} { + hwaci-if-opt-truthy $boolFlag { add-feature-flag $featureFlag msg-result "Enabling $boolFlag" eval $ifSetEvalThis - } else { + } { msg-result "Not enabling $boolFlag" } } @@ -817,8 +817,6 @@ define ENABLE_SHARED $enable_shared if {1} { hwaci-make-from-dot-in Makefile hwaci-make-from-dot-in sqlite3.pc - # hwaci-make-from-dot-in sqlite_cfg.h - if {1} { # for sqlite_cfg.h define PACKAGE_URL {https://sqlite.org} @@ -834,8 +832,6 @@ if {1} { -bare {SIZEOF_* HAVE_DECL_*} \ -auto {HAVE_* PACKAGE_*} -none * } - # make-config-header sqlite_cfg.h -bare {SIZEOF_* HAVE_*} -none * - # make-config-header sqlite_cfg.h #hwaci-make-from-dot-in ext/wasm/GNUmakefile } diff --git a/autosetup/hwaci-common.tcl b/autosetup/hwaci-common.tcl index 29c7c3da81..72219f3851 100644 --- a/autosetup/hwaci-common.tcl +++ b/autosetup/hwaci-common.tcl @@ -12,22 +12,36 @@ # Routines for Steve Bennett's autosetup which are common to trees # managed in and around the umbrella of the SQLite project. # +# Routines with a suffix of - are intended for internal use, +# within this file, and are not part of the API which auto.def files +# should rely on. +# # This file was initially derived from one used in the libfossil -# project, authored by the same person who ported it here (so there's -# no licensing issue despite this code having at least two near-twins -# running around). +# project, authored by the same person who ported it here, noted here +# only as an indication that there are no licensing issue despite this +# code having at least two near-twins running around in other trees. ######################################################################## -array set _hwaciCache {} ; # used for caching various results. +array set hwaci-cache- {} ; # used for caching various results. + +proc hwaci-warn {msg} { + puts "WARNING: $msg" +} +proc hwaci-notice {msg} { + puts "NOTICE: $msg" +} +proc hwaci-error {msg} { + user-error "ERROR: $msg" +} ######################################################################## -# hwaci-lshift shifts $count elements from the list named $listVar and +# hwaci-lshift- shifts $count elements from the list named $listVar and # returns them. # # Modified slightly from: https://wiki.tcl-lang.org/page/lshift # # On an empty list, returns "". -proc hwaci-lshift {listVar {count 1}} { +proc hwaci-lshift- {listVar {count 1}} { upvar 1 $listVar l if {![info exists l]} { # make the error message show the real variable name @@ -47,10 +61,10 @@ proc hwaci-lshift {listVar {count 1}} { # routine makes to the LIBS define. Returns the result of # cc-check-function-in-lib. proc hwaci-check-function-in-lib {function libs {otherlibs {}}} { - # TODO: this can now be implemented using autosetup's define-push - set _LIBS [get-define LIBS] - set found [cc-check-function-in-lib $function $libs $otherlibs] - define LIBS $_LIBS + set found "" + define-push {LIBS} { + set found [cc-check-function-in-lib $function $libs $otherlibs] + } return $found } @@ -64,11 +78,11 @@ proc hwaci-check-function-in-lib {function libs {otherlibs {}}} { # If defName is empty then "BIN_X" is used, where X is the upper-case # form of $binName with any '-' characters replaced with '_'. proc hwaci-bin-define {binName {defName {}}} { - global _hwaciCache + global hwaci-cache- set cacheName "$binName:$defName" set check {} - if {[info exists _hwaciCache($cacheName)]} { - set check $_hwaciCache($cacheName) + if {[info exists hwaci-cache-($cacheName)]} { + set check $hwaci-cache-($cacheName) } msg-checking "Looking for $binName ... " if {"" ne $check} { @@ -83,10 +97,10 @@ proc hwaci-bin-define {binName {defName {}}} { set check [find-executable-path $binName] if {"" eq $check} { msg-result "not found" - set _hwaciCache($cacheName) " _ 0 _ " + set hwaci-cache-($cacheName) " _ 0 _ " } else { msg-result $check - set _hwaciCache($cacheName) $check + set hwaci-cache-($cacheName) $check } if {"" eq $defName} { set defName "BIN_[string toupper [string map {- _} $binName]]" @@ -155,17 +169,12 @@ proc hwaci-opt-truthy {flag} { ######################################################################## # If [hwaci-opt-truthy $flag] is true, eval $then, else eval $else. -# -# Note that this may or may not, depending on the content of $then and -# $else, be functionally equivalent to: -# -# if {[hwaci-if-opt-truthy flag]} {...} else {...} -# -# When referencing $vars in $then and $else, the latter can resolve -# (without further assistance) the vars from its current scope, -# whereas $then and $else will not. -proc hwaci-if-opt-truthy {flag then {else {}}} { - if {[hwaci-opt-truthy $flag]} {eval $then} else {eval $else} +proc hwaci-if-opt-truthy {boolFlag thenScript {elseScript {}}} { + if {[hwaci-opt-truthy $boolFlag]} { + uplevel 1 $thenScript + } else { + uplevel 1 $elseScript + } } ######################################################################## @@ -201,15 +210,15 @@ proc hwaci-define-if-opt-truthy {flag def msg {iftrue 1} {iffalse 0}} { # If args[0] is -v then the boolean semantics are inverted: if # the option is set, it gets define'd to 0, else 1. Returns the # define'd value. -proc hwaci-opt-bool-01 {args} { +proc hwaci-set-bool-01 {args} { set invert 0 if {[lindex $args 0] eq "-v"} { set invert 1 set args [lrange $args 1 end] } - set optName [hwaci-lshift args] - set defName [hwaci-lshift args] - set descr [hwaci-lshift args] + set optName [hwaci-lshift- args] + set defName [hwaci-lshift- args] + set descr [hwaci-lshift- args] if {"" eq $descr} { set descr $defName } diff --git a/manifest b/manifest index 222245855f..ee7e3844a2 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Rename\sTCL_GENERATOR\sto\sBTCL\sfor\sconsistency\swith\sBCC/TCC. -D 2024-09-27T09:40:55.075 +C General\stinkering\sand\scleanups\sin\sthe\sautosetup\sbits. +D 2024-09-27T12:15:14.956 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 -F Makefile.in fe90969736fa820a80433efe1c7eab7edc7a3f3784150268baa370a6e279f192 +F Makefile.in 5ac6defaba5f19e487a02c920bdffd42033e2be31172fefaff40cbf997d42947 F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6 F Makefile.msc e3c4723c27464acc31da4420b808c8d2690180ba2b915897bece0a9d5d2cecf6 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 fa4c056d8225c195213bdacdb1aa40b4a4bdee598d7076e9bafd9899327efae5 +F auto.def 63a9d902a3326370aed3698c961161b6f1d975c047fa110e7ea9bcb83c8cd006 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903 F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac @@ -46,7 +46,7 @@ F autosetup/cc-lib.tcl 493c5935b5dd3bf9bd4eca89b07c8b1b1a9356d61783035144e21795f F autosetup/cc-shared.tcl 4f024e94a47f427ba61de1739f6381ef0080210f9fae89112d5c1de1e5460d78 F autosetup/cc.tcl 1b52de228642c1db5a714d54ca974d723ec8b4092e8c3765d348b625850f7311 F autosetup/default.auto 5cdf016de2140e50f1db190a02039dc42fb390af1dda4cc4853e3042a9ef0e82 -F autosetup/hwaci-common.tcl e47d127a33de5729ebcc0fd83a6e09c332b1867b43abdb90a0da76bdc536cfee +F autosetup/hwaci-common.tcl c6638a9ffb180ed2b240357c443ca60cc16d48d15c6e492b2965d2197ef0fb37 F autosetup/jimsh0.c 1b5fe91fffcddbc29f2b16acb80f1650632ea2edbe8336b8155ef7b4c66f6d8d F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba F autosetup/system.tcl 3a39d6e0b3bfba526fd39afe07c1d0d325e5a31925013a1ba7c671e1128e31bb @@ -2233,8 +2233,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 f395c269d55c2b5ceb074f26d0b63f65b1f04ec513fe203c7e73e3a876b1f055 -R 29a5fb72187eaa096ca16d979b700320 +P a7ff8f3c2c86f435a08d568a07f019a59dcca8f66a719d242289fa0c7097c2af +R 35d30a680586fc0d89ef4699e74bef45 U stephan -Z c604f90d680170e4b76ef7797c6d4f74 +Z b93d9def15ae319c294048d66bd247b2 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 1a05538def..dbf92f2b43 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a7ff8f3c2c86f435a08d568a07f019a59dcca8f66a719d242289fa0c7097c2af +a290e3b15de75f6a0a4975b5747449525fb2b58b3947b8ca0ab64a4d3cca228e