0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-06-11 03:56:50 +00:00
Files
.cargo
.github
bindings
bottomless
bottomless-cli
docker-compose
docs
libsql
libsql-ffi
libsql-replication
libsql-server
libsql-shell
libsql-sqlite3
art
autoconf
contrib
crates
doc
ext
mptest
src
test
tool
win
GetFile.cs
GetTclKit.bat
Replace.cs
build-all-msvc.bat
build-shell.sh
cg_anno.tcl
checkSpacing.c
cktclsh.sh
custom.txt
dbhash.c
dbtotxt.c
dbtotxt.md
enlargedb.c
extract-sqlite3h.tcl
extract.c
fast_vacuum.c
fragck.tcl
fuzzershell.c
generate-artifacts.sh
genfkey.README
genfkey.test
getlock.c
index_usage.c
kvtest-speed.sh
lemon.c
lempar.c
libvers.c
loadfts.c
logest.c
max-limits.c
merge-test.tcl
mkautoconfamal.sh
mkccode.tcl
mkctimec.tcl
mkkeywordhash.c
mkmsvcmin.tcl
mkopcodec.tcl
mkopcodeh.tcl
mkopts.tcl
mkpragmatab.tcl
mkshellc.tcl
mksourceid.c
mkspeedsql.tcl
mksqlite3c-noext.tcl
mksqlite3c.tcl
mksqlite3h.tcl
mksqlite3internalh.tcl
mktoolzip.tcl
mkvsix.tcl
offsets.c
omittest-msvc.tcl
omittest.tcl
opcodesum.tcl
pagesig.c
pre-release.sh
replace.tcl
restore_jrnl.tcl
rollback-test.c
run-speed-test.sh
showdb.c
showjournal.c
showlocks.c
showshm.c
showstat4.c
showwal.c
soak1.tcl
spaceanal.tcl
speed-check.sh
speedtest.tcl
speedtest16.c
speedtest2.tcl
speedtest8.c
speedtest8inst1.c
spellsift.tcl
split-sqlite3c.tcl
sqldiff.c
sqlite3_analyzer.c.in
sqltclsh.c.in
sqltclsh.tcl
src-verify.c
srcck1.c
srctree-check.tcl
stack_usage.tcl
stripccomments.c
symbols-mingw.sh
symbols.sh
varint.c
vdbe-compress.tcl
vdbe_profile.tcl
version-info.c
warnings-clang.sh
warnings.sh
vsixtest
.gitignore
Dockerfile-wasm-udf
LIBSQL_VERSION
LICENSE.md
Makefile.in
Makefile.linux-gcc
Makefile.msc
README-SQLite.md
VERSION
aclocal.m4
config.guess
config.sub
configure
configure.ac
install-sh
libsql.pc.in
ltmain.sh
magic.txt
main.mk
manifest
manifest.uuid
spec.template
sqlite.pc.in
sqlite3.1
sqlite3.pc.in
sqlite_cfg.h.in
libsql-sys
libsql-sys-tmp
vendored
xtask
.dockerignore
.env
.gitignore
CODE_OF_CONDUCT.md
Cargo.lock
Cargo.toml
Dockerfile
Dockerfile.dev
LICENSE.md
README-libsql.md
README.md
docker-entrypoint.sh
fly.toml
rust-toolchain.toml
libsql/libsql-sqlite3/tool/srctree-check.tcl
2023-11-15 14:46:34 +01:00

80 lines
2.4 KiB
Tcl

#!/usr/bin/tclsh
#
# Run this script from the top of the source tree in order to confirm that
# various aspects of the source tree are up-to-date. Items checked include:
#
# * Makefile.msc and autoconf/Makefile.msc agree
# * src/ctime.tcl is consistent with tool/mkctimec.tcl
# * VERSION agrees with autoconf/tea/configure.ac
# * src/pragma.h agrees with tool/mkpragmatab.tcl
#
# Other tests might be added later.
#
# Error messages are printed and the process exists non-zero if problems
# are found. If everything is ok, no output is generated and the process
# exits with 0.
#
# Read an entire file.
#
proc readfile {filename} {
set fd [open $filename rb]
set txt [read $fd]
close $fd
return $txt
}
# Find the root of the tree.
#
set ROOT [file dir [file dir [file normalize $argv0]]]
cd $ROOT
# Name of the TCL interpreter
#
set TCLSH [info nameofexe]
######################### autoconf/tea/configure.ac ###########################
set confac [readfile $ROOT/autoconf/tea/configure.ac]
set vers [readfile $ROOT/VERSION]
set pattern {AC_INIT([sqlite],[}
append pattern [string trim $vers]
append pattern {])}
if {[string first $pattern $confac]<=0} {
puts "ERROR: ./autoconf/tea/configure.ac does not agree with ./VERSION"
exit 1
}
######################### autoconf/Makefile.msc ###############################
set f1 [readfile $ROOT/autoconf/Makefile.msc]
exec mv $ROOT/autoconf/Makefile.msc $ROOT/autoconf/Makefile.msc.tmp
exec $TCLSH $ROOT/tool/mkmsvcmin.tcl
set f2 [readfile $ROOT/autoconf/Makefile.msc]
exec mv $ROOT/autoconf/Makefile.msc.tmp $ROOT/autoconf/Makefile.msc
if {$f1 != $f2} {
puts "ERROR: ./autoconf/Makefile.msc does not agree with ./Makefile.msc"
}
######################### src/pragma.h ########################################
set f1 [readfile $ROOT/src/pragma.h]
exec mv $ROOT/src/pragma.h $ROOT/src/pragma.h.tmp
exec $TCLSH $ROOT/tool/mkpragmatab.tcl
set f2 [readfile $ROOT/src/pragma.h]
exec mv $ROOT/src/pragma.h.tmp $ROOT/src/pragma.h
if {$f1 != $f2} {
puts "ERROR: ./src/pragma.h does not agree with ./tool/mkpragmatab.tcl"
}
######################### src/ctime.c ########################################
set f1 [readfile $ROOT/src/ctime.c]
exec mv $ROOT/src/ctime.c $ROOT/src/ctime.c.tmp
exec $TCLSH $ROOT/tool/mkctimec.tcl
set f2 [readfile $ROOT/src/ctime.c]
exec mv $ROOT/src/ctime.c.tmp $ROOT/src/ctime.c
if {$f1 != $f2} {
puts "ERROR: ./src/ctime.c does not agree with ./tool/mkctimec.tcl"
}