aboutsummaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authordrh <>2025-02-11 19:40:19 +0000
committerdrh <>2025-02-11 19:40:19 +0000
commit374c6a451e09bc6c14ef7e671bf4c788bfdfefef (patch)
tree4819d5442a4cb59e62a36da4f0f1da48345cf67e /tool
parentdb253d086235cab3912cf5ae534e7e90dc2b2531 (diff)
downloadsqlite-374c6a451e09bc6c14ef7e671bf4c788bfdfefef.tar.gz
sqlite-374c6a451e09bc6c14ef7e671bf4c788bfdfefef.zip
Omit the src/ctime.c source file, since it is automatically generated by a TCL
script. Instead, add rules to the various makefiles to generate ctime.c on demand. FossilOrigin-Name: 958bb5de7c484cc503c38d38d51a30f679244fd364df5cbfc1992e36995b2ff9
Diffstat (limited to 'tool')
-rwxr-xr-xtool/mkctimec.tcl10
-rw-r--r--tool/srctree-check.tcl17
2 files changed, 5 insertions, 22 deletions
diff --git a/tool/mkctimec.tcl b/tool/mkctimec.tcl
index 69d25c678..1a845b00b 100755
--- a/tool/mkctimec.tcl
+++ b/tool/mkctimec.tcl
@@ -4,13 +4,13 @@
#
# const char **azCompileOpt[]
#
-# definition used in src/ctime.c, run this script from
-# the checkout root. It generates src/ctime.c .
+# definition used in ctime.c, run this script from
+# the checkout root. It generates ctime.c .
#
-# Results are normally written into src/ctime.c. But if an argument is
+# Results are normally written into ctime.c. But if an argument is
# provided, results are written there instead. Examples:
#
-# tclsh tool/mkctimec.tcl ;# <-- results to src/ctime.c
+# tclsh tool/mkctimec.tcl ;# <-- ctime.c
#
# tclsh tool/mkctimec.tcl /dev/tty ;# <-- results to the terminal
#
@@ -440,7 +440,7 @@ foreach v $value2_options {
if {$argc>0} {
set destfile [lindex $argv 0]
} else {
- set destfile "[file dir [file dir [file normal $argv0]]]/src/ctime.c"
+ set destfile ctime.c
puts "Overwriting $destfile..."
}
diff --git a/tool/srctree-check.tcl b/tool/srctree-check.tcl
index b65e223db..918f12a9d 100644
--- a/tool/srctree-check.tcl
+++ b/tool/srctree-check.tcl
@@ -4,7 +4,6 @@
# 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
#
@@ -74,19 +73,3 @@ if {$f1 != $f2} {
puts "...... Fix: tclsh tool/mkpragmatab.tcl"
incr NERR
}
-
-######################### src/ctime.c ########################################
-
-set f1 [readfile $ROOT/src/ctime.c]
-exec $TCLSH $ROOT/tool/mkctimec.tcl tmp3.txt
-set f2 [readfile tmp3.txt]
-file delete tmp3.txt
-if {$f1 != $f2} {
- puts "ERROR: ./src/ctime.c does not agree with ./tool/mkctimec.tcl"
- puts "..... Fix: tclsh tool/mkctimec.tcl"
- incr NERR
-}
-
-# If any errors are seen, exit 1 so that the build will fail.
-#
-if {$NERR>0} {exit 1}