1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Version 3.48.0 for the bedrock branch

FossilOrigin-Name: fab341c8295545739cdce8b71e38ead68cb80a6f836f7ec0540b387f17b6cbe2
This commit is contained in:
drh
2025-01-14 12:28:43 +00:00
37 changed files with 1227 additions and 119 deletions

View File

@@ -15,6 +15,7 @@ Options:
--info Show info on existing SQLite TCL extension installs
--install-only Install an extension previously build
--uninstall Uninstall the extension
--version-check Check extension version against this source tree
--destdir DIR Installation root (used by "make install DESTDIR=...")
Other options are retained and passed through into the compiler.}
@@ -24,6 +25,7 @@ set build 1
set install 1
set uninstall 0
set infoonly 0
set versioncheck 0
set CC {}
set OPTS {}
set DESTDIR ""; # --destdir "$(DESTDIR)"
@@ -36,11 +38,18 @@ for {set ii 0} {$ii<[llength $argv]} {incr ii} {
} elseif {$a0=="--uninstall"} {
set build 0
set install 0
set versioncheck 0
set uninstall 1
} elseif {$a0=="--info"} {
set build 0
set install 0
set versioncheck 0
set infoonly 1
} elseif {$a0=="--version-check"} {
set build 0
set install 0
set infoonly 0
set versioncheck 1
} elseif {$a0=="--cc" && $ii+1<[llength $argv]} {
incr ii
set CC [lindex $argv $ii]
@@ -156,6 +165,33 @@ if {$tcl_platform(platform)=="windows"} {
set CMD [subst $cmd]
}
# Check the SQLite TCL extension that is loaded by default by this running
# TCL interpreter to see if it has the same SQLITE_SOURCE_ID as the source
# code in the directory holding this script.
#
if {$versioncheck} {
if {[catch {package require sqlite3} msg]} {
puts stderr "No SQLite TCL extension available: $msg"
exit 1
}
sqlite3 db :memory:
set extvers [db one {SELECT sqlite_source_id()}]
db close
set fd [open sqlite3.h rb]
set sqlite3h [read $fd]
close $fd
regexp {#define SQLITE_SOURCE_ID +"([^"]+)"} $sqlite3h all srcvers
set srcvers [string range $srcvers 0 78]
set extvers [string range $extvers 0 78]
if {$srcvers==$extvers} {
puts "source code and extension versions aligned:\n$extvers"
exit 0
}
puts stderr "source code and extension versions differ"
puts stderr "source: $srcvers\nextension: $extvers"
exit 1
}
# Show information about prior installs
#
if {$infoonly} {

View File

@@ -9,7 +9,15 @@ set vers [read $fd]
close $fd
scan $vers %d.%d.%d major minor patch
set numvers [format {3%02d%02d00} $minor $patch]
set cmd "zip sqlite-amalgamation-$numvers.zip\
sqlite3.c sqlite3.h shell.c sqlite3ext.h"
set dir sqlite-amalgamation-$numvers
file delete -force $dir
file mkdir $dir
set filelist {sqlite3.c sqlite3.h shell.c sqlite3ext.h}
foreach f $filelist {
file copy $f $dir/$f
}
set cmd "zip -r $dir.zip $dir"
puts $cmd
file delete -force $dir.zip
exec {*}$cmd
file delete -force $dir

View File

@@ -62,7 +62,7 @@ set nVersion [eval format "%d%03d%03d" [split $zVersion .]]
#
set PWD [pwd]
cd $TOP
set tmpfile tmp-[clock millisec]-[expr {int(rand()*100000000000)}].txt
set tmpfile $PWD/tmp-[clock millisec]-[expr {int(rand()*100000000000)}].txt
exec $PWD/mksourceid manifest > $tmpfile
set fd [open $tmpfile rb]
set zSourceId [string trim [read $fd]]