1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Work around a JimTCL regsub incompatibility in mkccode.tcl.

FossilOrigin-Name: c2e5dd791cce3ec4f1f009e945b8c66e8c5e01ae25077f345389f04e3c004ecf
This commit is contained in:
stephan
2024-10-19 13:18:56 +00:00
parent a1e6fbebdf
commit 49de624e41
3 changed files with 17 additions and 10 deletions

View File

@ -6,7 +6,7 @@
#
# Usage example:
#
# tclsh mktclsqliteprog.tcl demoapp.c.in >demoapp.c
# tclsh mkccode.tcl demoapp.c.in >demoapp.c
#
# The demoapp.c.in file contains a mixture of C code, TCL script, and
# processing directives used by mktclsqliteprog.tcl to build the final C-code
@ -56,8 +56,15 @@ while {1} {
set line [gets $in]
if {[eof $in]} break
if {[regexp {^INCLUDE (.*)} $line all path]} {
regsub {^\$ROOT\y} $path $ROOT path
regsub {^\$HOME\y} $path $HOME path
if {0} {
# https://github.com/msteveb/jimtcl/issues/320
regsub {^\$ROOT\y} $path $ROOT path
regsub {^\$HOME\y} $path $HOME path
} else {
set path [string map "\$ROOT $ROOT" $path]
set path [string map "\$HOME $HOME" $path]
# or: set path [string map "\$HOME $HOME \$ROOT $ROOT" $path]
}
set in2 [open $path rb]
puts "/* INCLUDE $path */"
if {$instr} {