@@ -154,9 +154,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
154154<h1 align =" center " >SQLite Source Repository</h1 >
155155
156156This repository contains the complete source code for the
157- [ SQLite database engine] ( https://sqlite.org/ ) going back
158- to 2000-05-29. The tree includes many tests and some
159- documentation, though additional tests and most documentation
157+ [ SQLite database engine] ( https://sqlite.org/ ) , including
158+ many tests. Additional tests and most documentation
160159are managed separately.
161160
162161See the [ on-line documentation] ( https://sqlite.org/ ) for more information
@@ -253,32 +252,31 @@ script found at the root of the source tree. Then run "make".
253252
254253For example:
255254
256- apt install gcc make tcl-dev ;# Install the necessary build tools
255+ apt install gcc make tcl-dev ;# Make sure you have all the necessary build tools
257256 tar xzf sqlite.tar.gz ;# Unpack the source tree into "sqlite"
258- mkdir bld ;# Build happens in a sibling directory
257+ mkdir bld ;# Build will occur in a sibling directory
259258 cd bld ;# Change to the build directory
260259 ../sqlite/configure ;# Run the configure script
261- make sqlite3 ;# The "sqlite3" command-line tool
262- make sqlite3.c ;# The "amalgamation" source file
263- make sqldiff ;# The "sqldiff" command-line tool
264- #### Targets below require tcl-dev ####
265- make tclextension-install ;# Install the SQLite TCL extension
260+ make sqlite3 ;# Builds the "sqlite3" command-line tool
261+ make sqlite3.c ;# Build the "amalgamation" source file
262+ make sqldiff ;# Builds the "sqldiff" command-line tool
263+ # Makefile targets below this point require tcl-dev
264+ make tclextension-install ;# Build and install the SQLite TCL extension
266265 make devtest ;# Run development tests
267266 make releasetest ;# Run full release tests
268267 make sqlite3_analyzer ;# Builds the "sqlite3_analyzer" tool
269268
270269See the makefile for additional targets. For debugging builds, the
271270core developers typically run "configure" with options like this:
272271
273- ../sqlite/configure --all --debug CFLAGS='-O0 -g'
272+ ../sqlite/configure --enable- all --enable -debug CFLAGS='-O0 -g'
274273
275274For release builds, the core developers usually do:
276275
277- ../sqlite/configure --all
276+ ../sqlite/configure --enable- all
278277
279- Core deliverables (sqlite3.c, sqlite3) can be built without a TCL, but
280- many makefile targets require a "tclsh" TCL interpreter version 8.6
281- or later. The "tclextension-install" target and the test targets that follow
278+ Almost all makefile targets require a "tclsh" TCL interpreter version 8.6 or
279+ later. The "tclextension-install" target and the test targets that follow
282280all require TCL development libraries too. ("apt install tcl-dev"). It is
283281helpful, but is not required, to install the SQLite TCL extension (the
284282"tclextension-install" target) prior to running tests. The "releasetest"
@@ -288,20 +286,20 @@ On "make" command-lines, one can add "OPTIONS=..." to specify additional
288286compile-time options over and above those set by ./configure. For example,
289287to compile with the SQLITE_OMIT_DEPRECATED compile-time option, one could say:
290288
291- ./configure --all
289+ ./configure --enable- all
292290 make OPTIONS=-DSQLITE_OMIT_DEPRECATED sqlite3
293291
294- The configure script uses [ autosetup ] ( https://msteveb.github.io/autosetup/ ) .
295- If the configure script does not work out for you, there is a generic
296- makefile named "Makefile.linux-gcc" in the top directory of the source tree
297- that you can copy and edit to suit your needs. Comments on the generic
298- makefile show what changes are needed.
292+ The configure script uses autoconf 2.61 and libtool. If the configure
293+ script does not work out for you, there is a generic makefile named
294+ "Makefile.linux-gcc" in the top directory of the source tree that you
295+ can copy and edit to suit your needs. Comments on the generic makefile
296+ show what changes are needed.
299297
300298## Compiling for Windows Using MSVC
301299
302300On Windows, everything can be compiled with MSVC.
303- You will also need a working installation of TCL if you want to run tests,
304- though TCL is not required if you just want to build SQLite itself.
301+ You will also need a working installation of TCL if you want to run tests.
302+ TCL is not required if you just want to build SQLite itself.
305303See the [ compile-for-windows.md] ( doc/compile-for-windows.md ) document for
306304additional information about how to install MSVC and TCL and configure your
307305build environment.
@@ -311,33 +309,32 @@ TCL library, using a command like this:
311309
312310 set TCLDIR=c:\Tcl
313311
314- SQLite itself does not contain any TCL code, but it does use TCL to run
315- tests. You may need to install TCL development libraries in order to
316- successfully complete some makefile targets. It is helpful, but is not
317- required, to install the SQLite TCL extension (the "tclextension-install"
318- target) prior to running tests.
319-
320- The source tree contains a "make.bat" file that allows the same "make"
321- commands of Unix to work on Windows. In the following, you can substitute
322- "nmake /f Makefile.msc" in place of "make", if you prefer to avoid this BAT
323- file:
324-
325- make sqlite3.exe
326- make sqlite3.c
327- make sqldiff.exe
328- #### Targets below require TCL development libraries ####
329- make tclextension-install
330- make devtest
331- make releasetest
332- make sqlite3_analyzer.exe
312+ SQLite uses "tclsh.exe" as part of the build process, and so that
313+ program will need to be somewhere on your %PATH%. SQLite itself
314+ does not contain any TCL code, but it does use TCL to run tests.
315+ You may need to install TCL development
316+ libraries in order to successfully complete some makefile targets.
317+ It is helpful, but is not required, to install the SQLite TCL extension
318+ (the "tclextension-install" target) prior to running tests.
319+
320+ Build using Makefile.msc. Example:
321+
322+ nmake /f Makefile.msc sqlite3.exe
323+ nmake /f Makefile.msc sqlite3.c
324+ nmake /f Makefile.msc sqldiff.exe
325+ # Makefile targets below this point require TCL development libraries
326+ nmake /f Makefile.msc tclextension-install
327+ nmake /f Makefile.msc devtest
328+ nmake /f Makefile.msc releasetest
329+ nmake /f Makefile.msc sqlite3_analyzer.exe
333330
334331There are many other makefile targets. See comments in Makefile.msc for
335332details.
336333
337334As with the unix Makefile, the OPTIONS=... argument can be passed on the nmake
338335command-line to enable new compile-time options. For example:
339336
340- make OPTIONS=-DSQLITE_OMIT_DEPRECATED sqlite3.exe
337+ nmake /f Makefile.msc OPTIONS=-DSQLITE_OMIT_DEPRECATED sqlite3.exe
341338
342339## Source Tree Map
343340
@@ -350,7 +347,8 @@ command-line to enable new compile-time options. For example:
350347 * ** test/** - This directory and its subdirectories contains code used
351348 for testing. Files that end in "` .test ` " are TCL scripts that run
352349 tests using an augmented TCL interpreter named "testfixture". Use
353- a command like "` make testfixture ` " to build that
350+ a command like "` make testfixture ` " (unix) or
351+ "` nmake /f Makefile.msc testfixture.exe ` " (windows) to build that
354352 augmented TCL interpreter, then run individual tests using commands like
355353 "` testfixture test/main.test ` ". This test/ subdirectory also contains
356354 additional C code modules and scripts for other kinds of testing.
@@ -532,11 +530,10 @@ implementation. It will not be the easiest library in the world to hack.
532530 (and some other test programs too) is built and run when you type
533531 "make test".
534532
535- * ** VERSION** , ** manifest** , ** manifest.tags** , and ** manifest.uuid** -
536- These files define the current SQLite version number. The "VERSION" file
537- is human generated, but the "manifest", "manifest.tags", and
538- "manifest.uuid" files are automatically generated by the
539- [ Fossil version control system] ( https://fossil-scm.org/ ) .
533+ * ** VERSION** , ** manifest** , and ** manifest.uuid** - These files define
534+ the current SQLite version number. The "VERSION" file is human generated,
535+ but the "manifest" and "manifest.uuid" files are automatically generated
536+ by the [ Fossil version control system] ( https://fossil-scm.org/ ) .
540537
541538There are many other source files. Each has a succinct header comment that
542539describes its purpose and role within the larger system.
@@ -562,6 +559,10 @@ makefile:
562559
563560> make verify-source
564561
562+ Or on windows:
563+
564+ > nmake /f Makefile.msc verify-source
565+
565566Using the makefile to verify source integrity is good for detecting
566567accidental changes to the source tree, but malicious changes could be
567568hidden by also modifying the makefiles.
0 commit comments