#
proc proj-looks-like-mac {{key host}} {
switch -glob -- [get-define $key] {
- *apple* {
+ *-*-darwin {
+ # https://sqlite.org/forum/forumpost/7b218c3c9f207646
+ # There's at least one Linux out there which matches *apple*.
return 1
}
default {
#
proc proj-dll-extension {} {
set inner {{key} {
- switch -glob -- [get-define $key] {
- *apple* {
- return ".dylib"
- }
- *-*-ming* - *-*-cygwin - *-*-msys {
- return ".dll"
- }
- default {
- return ".so"
- }
+ if {[proj-looks-like-mac $key]} {
+ return ".dylib"
}
+ if {[proj-looks-like-windows $key]} {
+ return ".dll"
+ }
+ return ".so"
}}
define BUILD_DLLEXT [apply $inner build]
define TARGET_DLLEXT [apply $inner host]
upvar $argvName argv
upvar $tgtArrayName outFlags
array set flags {}; # staging area
- array set scripts {}; # map of -flag=>script
- array set consuming {}; # map of -flag=>1 for arg-consuming flags
- array set multi {}; # map of -flag=>1 for multi-time flags
- array set seen {}; # map of -flag=>number of times seen
- array set call {}; # map of -flag=>1 for -call entries
+ array set blob {}; # holds markers for various per-key state and options
set incrSkip 1; # 1 if we stop at the first non-flag, else 0
# Parse $prototype for flag definitions...
set n [llength $prototype]
#puts "**** checkProtoFlag #$i of $n k=$k fv=$fv"
switch -exact -- $fv {
-literal {
- proj-assert {![info exists consuming($k)]}
- set scripts($k) [list expr [lindex $prototype [incr i]]]
+ proj-assert {![info exists blob(${k}.consumes)]}
+ set blob(${k}.script) [list expr [lindex $prototype [incr i]]]
}
-apply {
set fv [lindex $prototype [incr i]]
# Treat this as a lambda literal
set fv [list $fv]
}
- lappend call($k) "apply $fv"
+ lappend blob(${k}.call) "apply $fv"
}
-call {
# arg is either a proc name or {apply $aLambda}
set fv [lindex $prototype [incr i]]
- lappend call($k) $fv
+ lappend blob(${k}.call) $fv
}
default {
- proj-assert {![info exists consuming($k)]}
- set scripts($k) $fv
+ proj-assert {![info exists blob(${k}.consumes)]}
+ set blob(${k}.script) $fv
}
}
if {$i >= $n} {
if {[string match {*\*} $k]} {
# Re-map -foo* to -foo and flag -foo as a repeatable flag
set k [string map {* ""} $k]
- incr multi($k)
+ incr blob(${k}.multi)
}
if {[info exists flags($k)]} {
if {$i >= $n} {
proj-error -up "[proj-scope]: Missing argument for $k => flag"
}
- incr consuming($k)
+ incr blob(${k}.consumes)
set vi [lindex $prototype $i]
if {$vi in {-apply -call}} {
proj-error -up "[proj-scope]: Missing default value for $k flag"
set flags($k) $vi
}
#puts "-- flags"; parray flags
- #puts "-- scripts"; parray scripts
- #puts "-- calls"; parray call
+ #puts "-- blob"; parray blob
set rc 0
- set rv {}
+ set rv {}; # staging area for the target argv value
set skipMode 0
set n [llength $argv]
# Now look for those flags in $argv...
lappend rv $arg
} elseif {"--" eq $arg} {
# "--" is the conventional way to end processing of args
- if {[incr seen(--)] > 1} {
+ if {[incr blob(--)] > 1} {
# Elide only the first one
lappend rv $arg
}
incr skipMode $incrSkip
} elseif {[info exists flags($arg)]} {
# A known flag...
- set isMulti [info exists multi($arg)]
- incr seen($arg)
- if {1 < $seen($arg) && !$isMulti} {
+ set isMulti [info exists blob(${arg}.multi)]
+ incr blob(${arg}.seen)
+ if {1 < $blob(${arg}.seen) && !$isMulti} {
proj-error -up [proj-scope] "$arg flag was used multiple times"
}
set vMode 0; # 0=as-is, 1=eval, 2=call
- set isConsuming [info exists consuming($arg)]
+ set isConsuming [info exists blob(${arg}.consumes)]
if {$isConsuming} {
incr i
if {$i >= $n} {
proj-error -up [proj-scope] "is missing argument for $arg flag"
}
set vv [lindex $argv $i]
- } elseif {[info exists scripts($arg)]} {
+ } elseif {[info exists blob(${arg}.script)]} {
set vMode 1
- set vv $scripts($arg)
+ set vv $blob(${arg}.script)
} else {
set vv $flags($arg)
}
- if {[info exists call($arg)]} {
+ if {[info exists blob(${arg}.call)]} {
set vMode 2
- set vv [concat {*}$call($arg) $arg $vv]
+ set vv [concat {*}$blob(${arg}.call) $arg $vv]
} elseif {$isConsuming} {
proj-assert {!$vMode}
# fall through
}
}
if {$isConsuming && $isMulti} {
- if {1 == $seen($arg)} {
+ if {1 == $blob(${arg}.seen)} {
# On the first hit, overwrite the default with a new list.
set flags($arg) [list $vv]
} else {
-C Fix\san\sissue\sgoing\sback\sto\sversion\s3.39.0\swith\stransitive\sIS\sconstraints\nin\squeries\sthat\smake\suse\sof\sRIGHT\sJOIN.\s\sProblem\sreported\sby\n[forum:/forumpost/68f29a2005|forum\spost\s68f29a2005].
-D 2025-06-16T17:36:11.335
+C proj.tcl\sportability\sfixes\sand\scleanups\ssuggested\sin\s[forum:7b218c3c9f|forum\spost\s7b218c3c9f].\sBranching\sso\sthat\sit\scan\sbe\stested\son\smsys/cygwin/haiku\sbefore\scommitting\sto\sit.
+D 2025-06-17T14:37:31.325
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F autosetup/find_tclconfig.tcl e64886ffe3b982d4df42cd28ed91fe0b5940c2c5785e126c1821baf61bc86a7e
F autosetup/jimsh0.c 563b966c137a4ce3c9333e5196723b7ac0919140a9d7989eb440463cd855c367
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
-F autosetup/proj.tcl a4d7eb8d7e05328ac6202abe813da300db2fa89f1936a69f3f9d75300b4ff244
+F autosetup/proj.tcl d2428ea25745d25a090b938647737818accd5b802511776a186c9f1bcce53420
F autosetup/sqlite-config.tcl ccda82e43e377b832aae72a1678b1dc17dcaff36ed0ebbd8f0cfc88612ae8de3
F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
F autosetup/teaish/README.txt b40071e6f8506500a2f7f71d5fc69e0bf87b9d7678dd9da1e5b4d0acbf40b1ca
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 94b53c20e9bc8687c44272419aa7a93076eebdeae9a4f50b95b96a49993f9c0d
-R 9792eecd1b6591bc063a59b87986da50
-U drh
-Z 7fae65e62acbc3e4e5d9b145df615a7d
+P 9441fff52cc4e19c44df1a77ffe474f409d519b270c7166ce17f99e6ea48fc1e
+R 521cd36fd533b38f39517faf822f8bdc
+T *branch * linux-named-apple
+T *sym-linux-named-apple *
+T -sym-trunk * Cancelled\sby\sbranch.
+U stephan
+Z 5f5e8471bf9be6c3059712dd72eeed12
# Remove this line to create a well-formed Fossil manifest.