-C Fix\sthe\samalgamation\sso\sthat\sit\scan\sbe\scompiled\swith\sREDEF_IO\senabled.\s(CVS\s3782)
-D 2007-03-31T16:29:06
+C Add\sthe\samalgamation\sgenerator\sto\sthe\smakefile.\s(CVS\s3783)
+D 2007-03-31T22:29:05
F Makefile.in 2f2c3bf69faf0ae7b8e8af4f94f1986849034530
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F ext/fts2/fts2_tokenizer1.c 6067f2f710bc7e91c0688b7b11be1027777553e0
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895
F ltmain.sh 56abb507100ed2d4261f6dd1653dec3cf4066387
-F main.mk 0bf049ca7589932f1fdd074d71f0f6621a63e972
+F main.mk 49c1b97b57d2a0091fbecee6feb9a992661ff05a
F mkdll.sh cbc7d92d02f9317a3d24ab55bb727275417260ca
F mkopcodec.awk bd46ad001c98dfbab07b1713cb8e692fa0e5415d
F mkopcodeh.awk cde995d269aa06c94adbf6455bea0acedb913fa5
F tool/memleak3.tcl 7707006ee908cffff210c98158788d85bb3fcdbf
F tool/mkkeywordhash.c 520d0016eaac0d783ea8ffb7f91d150d0bf06e81
F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e x
-F tool/mksqlite3c.tcl 72969469d0487df1b1b50dfc7a2be56a2a193168
+F tool/mksqlite3c.tcl 59f5db8e291dd83f92be379c97f2c00b844ca3b8
F tool/omittest.tcl e6b3d6a1285f9813bc1dea53bb522b4b72774710
F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c
F tool/report1.txt 9eae07f26a8fc53889b45fc833a66a33daa22816
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 476e7c3fcc69d8b21d161c758aaa5ef7163abb15
-R bf353a147116ca034c191387f8be374c
+P 6a3d6142d8be18bf2a9913f0329bcce48867304b
+R 8f9be996e31b89d4cd4e62ba5ca94214
U drh
-Z e7a7582e202988b95ca76eab2f374fb0
+Z 4d11376f6943f83b5517f075c03b85dd
#
# make target_source
#
-# Then run this script
+# The make target above moves all of the source code files into
+# a subdirectory named "tsrc". (This script expects to find the files
+# there and will not work if they are not found.) There are a few
+# generated C code files that are also added to the tsrc directory.
+# For example, the "parse.c" and "parse.h" files to implement the
+# the parser are derived from "parse.y" using lemon. And the
+# "keywordhash.h" files is generated by a program named "mkkeywordhash".
#
-# tclsh mkonebigsourcefile.tcl
+# After the "tsrc" directory has been created and populated, run
+# this script:
#
-# The combined SQLite source code will be written into sqlite3.c
+# tclsh mksqlite3c.tcl
#
+# The amalgamated SQLite code will be written into sqlite3.c
+#
+
+# Begin by reading the "sqlite3.h" header file. Count the number of lines
+# in this file and extract the version number. That information will be
+# needed in order to generate the header of the amalgamation.
+#
+set in [open tsrc/sqlite3.h]
+set cnt 0
+set VERSION ?????
+while {![eof $in]} {
+ set line [gets $in]
+ if {$line=="" && [eof $in]} break
+ incr cnt
+ regexp {#define\s+SQLITE_VERSION\s+"(.*)"} $line all VERSION
+}
+close $in
# Open the output file and write a header comment at the beginning
# of the file.
#
set out [open sqlite3.c w]
-puts $out \
-"/******************************************************************************
-** This file is a amalgamation of many separate source files from SQLite. By
-** pulling all the source files into this single unified source file, the
-** entire code can be compiled as a single translation unit, which allows the
-** compiler to do a better job of optimizing.
-*/"
+set today [clock format [clock seconds] -format "%Y-%m-%d %H:%M:%S UTC" -gmt 1]
+puts $out [subst \
+{/******************************************************************************
+** This file is a amalgamation of many separate C source files from SQLite
+** version $VERSION. By combining all the individual C code files into this
+** single large file, the entire code can be compiled as a one translation
+** unit. This allows many compilers to do optimizations that would not be
+** possible if the files were compiled separately. Performance improvements
+** of 5% are more are commonly seen when SQLite is compiled as a single
+** translation unit.
+**
+** This file is all you need to compile SQLite. To use SQLite in other
+** programs, you need this file and the "sqlite3.h" header file that defines
+** the programming interface to the SQLite library. (If you do not have
+** the "sqlite3.h" header file at hand, you will find a copy in the first
+** $cnt lines past the header of this amalgamation.) Additional code
+** files may be needed if you want a wrapper to interface SQLite with your
+** choice of programming language. The code for the "sqlite3" command-line
+** shell is also in a separate file. This file contains only code for the
+** core SQLite library.
+**
+** This amalgamation was generated on $today.
+*/}]
# These are the header files used by SQLite. The first time any of these
# files are seen in a #include statement in the C code, include the complete
} {
set available_hdr($hdr) 1
}
+set available_hdr(sqlite3.h) 0
# 78 stars used for comment formatting.
set s78 \
# inlining opportunities.
#
foreach file {
+ sqlite3.h
+
os.c
printf.c