11<h1 align =" center " >SQLite Source Repository</h1 >
22
33This repository contains the complete source code for the
4- [ SQLite database engine] ( https://sqlite.org/ ) going back
5- to 2000-05-29. The tree includes many tests and some
6- documentation, though additional tests and most documentation
4+ [ SQLite database engine] ( https://sqlite.org/ ) , including
5+ many tests. Additional tests and most documentation
76are managed separately.
87
98See the [ on-line documentation] ( https://sqlite.org/ ) for more information
@@ -100,32 +99,31 @@ script found at the root of the source tree. Then run "make".
10099
101100For example:
102101
103- apt install gcc make tcl-dev ;# Install the necessary build tools
102+ apt install gcc make tcl-dev ;# Make sure you have all the necessary build tools
104103 tar xzf sqlite.tar.gz ;# Unpack the source tree into "sqlite"
105- mkdir bld ;# Build happens in a sibling directory
104+ mkdir bld ;# Build will occur in a sibling directory
106105 cd bld ;# Change to the build directory
107106 ../sqlite/configure ;# Run the configure script
108- make sqlite3 ;# The "sqlite3" command-line tool
109- make sqlite3.c ;# The "amalgamation" source file
110- make sqldiff ;# The "sqldiff" command-line tool
111- #### Targets below require tcl-dev ####
112- make tclextension-install ;# Install the SQLite TCL extension
107+ make sqlite3 ;# Builds the "sqlite3" command-line tool
108+ make sqlite3.c ;# Build the "amalgamation" source file
109+ make sqldiff ;# Builds the "sqldiff" command-line tool
110+ # Makefile targets below this point require tcl-dev
111+ make tclextension-install ;# Build and install the SQLite TCL extension
113112 make devtest ;# Run development tests
114113 make releasetest ;# Run full release tests
115114 make sqlite3_analyzer ;# Builds the "sqlite3_analyzer" tool
116115
117116See the makefile for additional targets. For debugging builds, the
118117core developers typically run "configure" with options like this:
119118
120- ../sqlite/configure --all --debug CFLAGS='-O0 -g'
119+ ../sqlite/configure --enable- all --enable -debug CFLAGS='-O0 -g'
121120
122121For release builds, the core developers usually do:
123122
124- ../sqlite/configure --all
123+ ../sqlite/configure --enable- all
125124
126- Core deliverables (sqlite3.c, sqlite3) can be built without a TCL, but
127- many makefile targets require a "tclsh" TCL interpreter version 8.6
128- or later. The "tclextension-install" target and the test targets that follow
125+ Almost all makefile targets require a "tclsh" TCL interpreter version 8.6 or
126+ later. The "tclextension-install" target and the test targets that follow
129127all require TCL development libraries too. ("apt install tcl-dev"). It is
130128helpful, but is not required, to install the SQLite TCL extension (the
131129"tclextension-install" target) prior to running tests. The "releasetest"
@@ -135,20 +133,20 @@ On "make" command-lines, one can add "OPTIONS=..." to specify additional
135133compile-time options over and above those set by ./configure. For example,
136134to compile with the SQLITE_OMIT_DEPRECATED compile-time option, one could say:
137135
138- ./configure --all
136+ ./configure --enable- all
139137 make OPTIONS=-DSQLITE_OMIT_DEPRECATED sqlite3
140138
141- The configure script uses [ autosetup ] ( https://msteveb.github.io/autosetup/ ) .
142- If the configure script does not work out for you, there is a generic
143- makefile named "Makefile.linux-gcc" in the top directory of the source tree
144- that you can copy and edit to suit your needs. Comments on the generic
145- makefile show what changes are needed.
139+ The configure script uses autoconf 2.61 and libtool. If the configure
140+ script does not work out for you, there is a generic makefile named
141+ "Makefile.linux-gcc" in the top directory of the source tree that you
142+ can copy and edit to suit your needs. Comments on the generic makefile
143+ show what changes are needed.
146144
147145## Compiling for Windows Using MSVC
148146
149147On Windows, everything can be compiled with MSVC.
150- You will also need a working installation of TCL if you want to run tests,
151- though TCL is not required if you just want to build SQLite itself.
148+ You will also need a working installation of TCL if you want to run tests.
149+ TCL is not required if you just want to build SQLite itself.
152150See the [ compile-for-windows.md] ( doc/compile-for-windows.md ) document for
153151additional information about how to install MSVC and TCL and configure your
154152build environment.
@@ -158,33 +156,32 @@ TCL library, using a command like this:
158156
159157 set TCLDIR=c:\Tcl
160158
161- SQLite itself does not contain any TCL code, but it does use TCL to run
162- tests. You may need to install TCL development libraries in order to
163- successfully complete some makefile targets. It is helpful, but is not
164- required, to install the SQLite TCL extension (the "tclextension-install"
165- target) prior to running tests.
166-
167- The source tree contains a "make.bat" file that allows the same "make"
168- commands of Unix to work on Windows. In the following, you can substitute
169- "nmake /f Makefile.msc" in place of "make", if you prefer to avoid this BAT
170- file:
171-
172- make sqlite3.exe
173- make sqlite3.c
174- make sqldiff.exe
175- #### Targets below require TCL development libraries ####
176- make tclextension-install
177- make devtest
178- make releasetest
179- make sqlite3_analyzer.exe
159+ SQLite uses "tclsh.exe" as part of the build process, and so that
160+ program will need to be somewhere on your %PATH%. SQLite itself
161+ does not contain any TCL code, but it does use TCL to run tests.
162+ You may need to install TCL development
163+ libraries in order to successfully complete some makefile targets.
164+ It is helpful, but is not required, to install the SQLite TCL extension
165+ (the "tclextension-install" target) prior to running tests.
166+
167+ Build using Makefile.msc. Example:
168+
169+ nmake /f Makefile.msc sqlite3.exe
170+ nmake /f Makefile.msc sqlite3.c
171+ nmake /f Makefile.msc sqldiff.exe
172+ # Makefile targets below this point require TCL development libraries
173+ nmake /f Makefile.msc tclextension-install
174+ nmake /f Makefile.msc devtest
175+ nmake /f Makefile.msc releasetest
176+ nmake /f Makefile.msc sqlite3_analyzer.exe
180177
181178There are many other makefile targets. See comments in Makefile.msc for
182179details.
183180
184181As with the unix Makefile, the OPTIONS=... argument can be passed on the nmake
185182command-line to enable new compile-time options. For example:
186183
187- make OPTIONS=-DSQLITE_OMIT_DEPRECATED sqlite3.exe
184+ nmake /f Makefile.msc OPTIONS=-DSQLITE_OMIT_DEPRECATED sqlite3.exe
188185
189186## Source Tree Map
190187
@@ -197,7 +194,8 @@ command-line to enable new compile-time options. For example:
197194 * ** test/** - This directory and its subdirectories contains code used
198195 for testing. Files that end in "` .test ` " are TCL scripts that run
199196 tests using an augmented TCL interpreter named "testfixture". Use
200- a command like "` make testfixture ` " to build that
197+ a command like "` make testfixture ` " (unix) or
198+ "` nmake /f Makefile.msc testfixture.exe ` " (windows) to build that
201199 augmented TCL interpreter, then run individual tests using commands like
202200 "` testfixture test/main.test ` ". This test/ subdirectory also contains
203201 additional C code modules and scripts for other kinds of testing.
@@ -379,11 +377,10 @@ implementation. It will not be the easiest library in the world to hack.
379377 (and some other test programs too) is built and run when you type
380378 "make test".
381379
382- * ** VERSION** , ** manifest** , ** manifest.tags** , and ** manifest.uuid** -
383- These files define the current SQLite version number. The "VERSION" file
384- is human generated, but the "manifest", "manifest.tags", and
385- "manifest.uuid" files are automatically generated by the
386- [ Fossil version control system] ( https://fossil-scm.org/ ) .
380+ * ** VERSION** , ** manifest** , and ** manifest.uuid** - These files define
381+ the current SQLite version number. The "VERSION" file is human generated,
382+ but the "manifest" and "manifest.uuid" files are automatically generated
383+ by the [ Fossil version control system] ( https://fossil-scm.org/ ) .
387384
388385There are many other source files. Each has a succinct header comment that
389386describes its purpose and role within the larger system.
@@ -409,6 +406,10 @@ makefile:
409406
410407> make verify-source
411408
409+ Or on windows:
410+
411+ > nmake /f Makefile.msc verify-source
412+
412413Using the makefile to verify source integrity is good for detecting
413414accidental changes to the source tree, but malicious changes could be
414415hidden by also modifying the makefiles.
0 commit comments