mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Update the srctree-check.tcl script and child script so that they can be run
on a read-only source tree and so that if any inconsistencies are found, the script returns a non-zero exit code and thus halts the build. FossilOrigin-Name: a0cc7e8117abf03c8d0ab903f1f4b8ff48b6c0e6de85080c9d2a915fd1c16778
This commit is contained in:
@@ -9,6 +9,14 @@
|
||||
# Then add the extra "case PragTyp_XXXXX:" and subsequent code for the
|
||||
# new pragma in ../src/pragma.c.
|
||||
#
|
||||
# The results are normally written into the ../src/pragma.h file. However,
|
||||
# if an alternative output file name is provided as an argument, then
|
||||
# results are written into the alternative. For example:
|
||||
#
|
||||
# tclsh tool/mkpragmatab.tcl ;# <--- Results to src/pragma.h
|
||||
#
|
||||
# tclsh tool/mkpragmatab.tcl /dev/tty ;# <-- results to terminal
|
||||
#
|
||||
|
||||
# Flag meanings:
|
||||
set flagMeaning(NeedSchema) {Force schema load before running}
|
||||
@@ -402,8 +410,12 @@ set pragma_def {
|
||||
|
||||
# Open the output file
|
||||
#
|
||||
set destfile "[file dir [file dir [file normal $argv0]]]/src/pragma.h"
|
||||
puts "Overwriting $destfile with new pragma table..."
|
||||
if {$argc>0} {
|
||||
set destfile [lindex $argv 0]
|
||||
} else {
|
||||
set destfile "[file dir [file dir [file normal $argv0]]]/src/pragma.h"
|
||||
puts "Overwriting $destfile with new pragma table..."
|
||||
}
|
||||
set fd [open $destfile wb]
|
||||
puts $fd {/* DO NOT EDIT!
|
||||
** This file is automatically generated by the script at
|
||||
|
Reference in New Issue
Block a user