<h1 align="center">SQLite Source Repository</h1>
This repository contains the complete source code for the
-[SQLite database engine](https://sqlite.org/), including
-many tests. Additional tests and most documentation
+[SQLite database engine](https://sqlite.org/) going back
+to 2000-05-29. The tree includes many tests and some
+documentation, though additional tests and most documentation
are managed separately.
See the [on-line documentation](https://sqlite.org/) for more information
For example:
- apt install gcc make tcl-dev ;# Make sure you have all the necessary build tools
+ apt install gcc make tcl-dev ;# Install the necessary build tools
tar xzf sqlite.tar.gz ;# Unpack the source tree into "sqlite"
- mkdir bld ;# Build will occur in a sibling directory
+ mkdir bld ;# Build happens in a sibling directory
cd bld ;# Change to the build directory
../sqlite/configure ;# Run the configure script
- make sqlite3 ;# Builds the "sqlite3" command-line tool
- make sqlite3.c ;# Build the "amalgamation" source file
- make sqldiff ;# Builds the "sqldiff" command-line tool
- # Makefile targets below this point require tcl-dev
- make tclextension-install ;# Build and install the SQLite TCL extension
+ make sqlite3 ;# The "sqlite3" command-line tool
+ make sqlite3.c ;# The "amalgamation" source file
+ make sqldiff ;# The "sqldiff" command-line tool
+ #### Targets below require tcl-dev ####
+ make tclextension-install ;# Install the SQLite TCL extension
make devtest ;# Run development tests
make releasetest ;# Run full release tests
make sqlite3_analyzer ;# Builds the "sqlite3_analyzer" tool
See the makefile for additional targets. For debugging builds, the
core developers typically run "configure" with options like this:
- ../sqlite/configure --enable-all --enable-debug CFLAGS='-O0 -g'
+ ../sqlite/configure --all --debug CFLAGS='-O0 -g'
For release builds, the core developers usually do:
- ../sqlite/configure --enable-all
+ ../sqlite/configure --all
-Almost all makefile targets require a "tclsh" TCL interpreter version 8.6 or
-later. The "tclextension-install" target and the test targets that follow
+Core deliverables (sqlite3.c, sqlite3) can be built without a TCL, but
+many makefile targets require a "tclsh" TCL interpreter version 8.6
+or later. The "tclextension-install" target and the test targets that follow
all require TCL development libraries too. ("apt install tcl-dev"). It is
helpful, but is not required, to install the SQLite TCL extension (the
"tclextension-install" target) prior to running tests. The "releasetest"
compile-time options over and above those set by ./configure. For example,
to compile with the SQLITE_OMIT_DEPRECATED compile-time option, one could say:
- ./configure --enable-all
+ ./configure --all
make OPTIONS=-DSQLITE_OMIT_DEPRECATED sqlite3
The configure script uses [autosetup](https://msteveb.github.io/autosetup/).
## Compiling for Windows Using MSVC
On Windows, everything can be compiled with MSVC.
-You will also need a working installation of TCL if you want to run tests.
-TCL is not required if you just want to build SQLite itself.
+You will also need a working installation of TCL if you want to run tests,
+though TCL is not required if you just want to build SQLite itself.
See the [compile-for-windows.md](doc/compile-for-windows.md) document for
additional information about how to install MSVC and TCL and configure your
build environment.
set TCLDIR=c:\Tcl
-SQLite uses "tclsh.exe" as part of the build process, and so that
-program will need to be somewhere on your %PATH%. SQLite itself
-does not contain any TCL code, but it does use TCL to run tests.
-You may need to install TCL development
-libraries in order to successfully complete some makefile targets.
-It is helpful, but is not required, to install the SQLite TCL extension
-(the "tclextension-install" target) prior to running tests.
-
-Build using Makefile.msc. Example:
-
- nmake /f Makefile.msc sqlite3.exe
- nmake /f Makefile.msc sqlite3.c
- nmake /f Makefile.msc sqldiff.exe
- # Makefile targets below this point require TCL development libraries
- nmake /f Makefile.msc tclextension-install
- nmake /f Makefile.msc devtest
- nmake /f Makefile.msc releasetest
- nmake /f Makefile.msc sqlite3_analyzer.exe
+SQLite itself does not contain any TCL code, but it does use TCL to run
+tests. You may need to install TCL development libraries in order to
+successfully complete some makefile targets. It is helpful, but is not
+required, to install the SQLite TCL extension (the "tclextension-install"
+target) prior to running tests.
+
+The source tree contains a "make.bat" file that allows the same "make"
+commands of Unix to work on Windows. In the following, you can substitute
+"nmake /f Makefile.msc" in place of "make", if you prefer to avoid this BAT
+file:
+
+ make sqlite3.exe
+ make sqlite3.c
+ make sqldiff.exe
+ #### Targets below require TCL development libraries ####
+ make tclextension-install
+ make devtest
+ make releasetest
+ make sqlite3_analyzer.exe
There are many other makefile targets. See comments in Makefile.msc for
details.
As with the unix Makefile, the OPTIONS=... argument can be passed on the nmake
command-line to enable new compile-time options. For example:
- nmake /f Makefile.msc OPTIONS=-DSQLITE_OMIT_DEPRECATED sqlite3.exe
+ make OPTIONS=-DSQLITE_OMIT_DEPRECATED sqlite3.exe
## Source Tree Map
* **test/** - This directory and its subdirectories contains code used
for testing. Files that end in "`.test`" are TCL scripts that run
tests using an augmented TCL interpreter named "testfixture". Use
- a command like "`make testfixture`" (unix) or
- "`nmake /f Makefile.msc testfixture.exe`" (windows) to build that
+ a command like "`make testfixture`" to build that
augmented TCL interpreter, then run individual tests using commands like
"`testfixture test/main.test`". This test/ subdirectory also contains
additional C code modules and scripts for other kinds of testing.
(and some other test programs too) is built and run when you type
"make test".
- * **VERSION**, **manifest**, and **manifest.uuid** - These files define
- the current SQLite version number. The "VERSION" file is human generated,
- but the "manifest" and "manifest.uuid" files are automatically generated
- by the [Fossil version control system](https://fossil-scm.org/).
+ * **VERSION**, **manifest**, **manifest.tags**, and **manifest.uuid** -
+ These files define the current SQLite version number. The "VERSION" file
+ is human generated, but the "manifest", "manifest.tags", and
+ "manifest.uuid" files are automatically generated by the
+ [Fossil version control system](https://fossil-scm.org/).
There are many other source files. Each has a succinct header comment that
describes its purpose and role within the larger system.
> make verify-source
-Or on windows:
-
-> nmake /f Makefile.msc verify-source
-
Using the makefile to verify source integrity is good for detecting
accidental changes to the source tree, but malicious changes could be
hidden by also modifying the makefiles.
-C Correct\sto\sthe\sREADME.md\sfile.
-D 2025-11-30T10:49:09.441
+C More\stweaks\sto\sthe\sREADME.md\sfile.
+D 2025-11-30T11:12:37.039
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F Makefile.in 3ce07126d7e87c7464301482e161fdae6a51d0a2aa06b200b8f0000ef4d6163b
F Makefile.linux-generic bd3e3cacd369821a6241d4ea1967395c962dfe3057e38cb0a435cee0e8b789d0
F Makefile.msc 295bc62fdd8663a6581cc43252403fac3cb784002164ff53fac8d15fc72fdfaa
-F README.md d226a0459e05b6c47f8100eb075a4b2291669cd58eb467bf8b21defc2ee52c70
+F README.md 3fa51fc7ababc32edd175ae8b2986c86d5ea120c1cb1e57c7f7849492d1405ec
F VERSION 74672bfd4c7826c0fc6f84762488a707c52e7d2d94af42ccb0edcc6c74311c41
F art/icon-243x273.gif 9750b734f82fdb3dc43127753d5e6fbf3b62c9f4e136c2fbf573b2f57ea87af5
F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d87031
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P a2b53a71e9354260c7fd0ada093cebd56a20a04add12ff2a2d788c386bf8964f
-R 3709475446d888d9c1279877acccb89d
+P 3cd3256c7c595f54c8c12fafd1fb60349db82f69eb54fd9896b24db46a8b00d0
+R 8d7c07269c661f434eeb9522fe5e44f6
U drh
-Z dfad83dc271e0ccd7c49cc6270e6bd04
+Z ded76f57b28c9895e13e364ea6c70858
# Remove this line to create a well-formed Fossil manifest.