--- a/incubator/ooSQLite/Makefile.win
+++ b/incubator/ooSQLite/Makefile.win
@@ -43,22 +43,39 @@
 # automatically added to the LIB and INCLUDE environment variables by this make
 # file.
 #
-# Otherwise, either uncomment the next line and define the correct REXX_HOME, or
-# be sure the LIB and INCLUDE environment variables allow the compiler to find
-# the ooRexx native API headers and libraries.
+# Otherwise, either uncomment the REXX_HOME line and define the correct
+# REXX_HOME, or be sure the LIB and INCLUDE environment variables allow the
+#compiler to find  the ooRexx native API headers and libraries.
 #
 # On a build system for ooRexx, you can set REXX_HOME to point to Win32Dbg or
 # Win32Rel, as appropriate, in your build directory.  For this to work, you
 # will have to have built the interpreter.
 #
+# A command line svn is needed to automatically get the correct svn revision
+# into the compiled binary.  If a command line svn is not available, the build
+# will work, but the svn revision will be 0.  If you are building yourself, you
+# can build one time, will which generate a file: src\ooSQLite.ver.incl.  You
+# can then edit this file manually to set the svn revision number.  Edit:
+#
+#   OOSQLITE_VER_STR="1.0.0.0"
+#   SVN_REVSION=0
+#
+# to, for example:
+#
+#   OOSQLITE_VER_STR="1.0.0.8524"
+#   SVN_REVSION=8524
+#
 # A working Rexx and zip.exe is needed on the system to build the distribution
 # file.  (The target is 'dist')
+#
+# Unncomment the next line and define the correct REXX_HOME, if needed:
 
 #REXX_HOME = C:\work.ooRexx\wc\main\Win32Dbg   # For example
 
-# Define RELEASE on the command line, or here, to build a non-debug version.  By
-# default debug versions are built.  I.e. nMake RELEASE=1 /F Makefile.win
-#RELEASE = 1
+# Define DEBUG on the command line, or here, to build a debug version.  By
+# default non-debug (release) versions are built.
+# I.e. nMake DEBUG=1 /F Makefile.win
+#DEBUG = 1
 
 
 !IF DEFINED(REXX_HOME)
@@ -100,43 +117,48 @@
 #	  cl /EHsc /nologo $(VERDEFS) $(WARNINGFLAGS) $(MISCDEFS) -c -O2 /Gr /MT /Gs /FAcs /FaC:\work.ooRexx\wc\main\Win32Rel\ASM\oodMessaging.asm  /FoC:\work.ooRexx\wc\main\Win32Rel\oodMessaging.obj -IC:\work.ooRexx\wc\main\lib\ -IC:\work.ooRexx\wc\main\common\ -IC:\work.ooRexx\wc\main\common\platform\windows\ -IC:\work.ooRexx\wc\main\api\ -IC:\work.ooRexx\wc\main\api\platform\windows\ -IC:\work.ooRexx\wc\main\interpreter\ -IC:\work.ooRexx\wc\main\interpreter\classes\ -IC:\work.ooRexx\wc\main\interpreter\classes\support\ -IC:\work.ooRexx\wc\main\interpreter\runtime\ -IC:\work.ooRexx\wc\main\interpreter\behaviour\ -IC:\work.ooRexx\wc\main\interpreter\concurrency\ -IC:\work.ooRexx\wc\main\interpreter\execution\ -IC:\work.ooRexx\wc\main\interpreter\memory\ -IC:\work.ooRexx\wc\main\interpreter\package\ -IC:\work.ooRexx\wc\main\interpreter\expression\ -IC:\work.ooRexx\wc\main\interpreter\instructions\ -IC:\work.ooRexx\wc\main\interpreter\parser\ -IC:\work.ooRexx\wc\main\interpreter\platform\windows\ -IC:\work.ooRexx\wc\main\interpreter\streamLibrary\ -IC:\work.ooRexx\wc\main\interpreter\messages\ -IC:\work.ooRexx\wc\main\platform\windows\ -IC:\work.ooRexx\wc\main\rexutils\windows -IC:\work.ooRexx\wc\main\extensions\platform\windows\oodialog\ -I\ -IC:\work.ooRexx\wc\main\extensions\platform\windows\ole\ -IC:\work.ooRexx\wc\main\extensions\platform\windows\orxscrpt\ -IC:\work.ooRexx\wc\main\interpreter\messages\ -IC:\work.ooRexx\wc\main\extensions\hostemu\  C:\work.ooRexx\wc\main\extensions\platform\windows\oodialog\oodMessaging.cpp
 #
 #	  link  $(objs) $(res)  /MAP /NOLOGO  /SUBSYSTEM:Windows  $(winlibs) /DLL $(rexxlibs)  -def:ooDialog.def  -out:oodialog.dll
+#
+# Note that /Gr is not compatible with SQLITE_ENABLE_FTS3, so it is removed.
+#
 
 
 WARNINGFLAGS = /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
 VERDEFS = /DOOSQLITE_VER_MAJOR=$(OOSQLITE_MAJOR) /DOOSQLITE_VER_MINOR=$(OOSQLITE_MINOR) /DOOSQLITE_VER_LEVEL=$(OOSQLITE_MOD_LVL) /DOOSQLITE_VER_BUILD=$(OOSQLITE_BLD_LVL) /DOOSQLITE_VER_STRING=$(OOSQLITE_VER_STR) /DOOSQLITE_COPYRIGHT_YEAR=\"$(OOSQLITE_COPY_YEAR)\"
 EXTRAINCLUDE = /I src\sqlite
 
-SQLITEFLAGS=/DSQLITE_ENABLE_COLUMN_METADATA /DSQLITE_ENABLE_MEMORY_MANAGEMENT
+SQLITEFLAGS=/DSQLITE_ENABLE_COLUMN_METADATA /DSQLITE_ENABLE_MEMORY_MANAGEMENT /DSQLITE_ENABLE_FTS3 /DSQLITE_ENABLE_FTS3_PARENTHESIS
 BASEFLAGS = $(WARNINGFLAGS) $(VERDEFS) $(EXTRAINCLUDE) $(SQLITEFLAGS)
 
 # The linker flag /OPT:REF removes unreferenced functions and data.  In order for
 # /OPT:REF to work, the code must be compiled with /Gy.  /Gy is automatically turned
 # on with /Zi.  /OPT:REF is the default unless /DEBUG is specified.
-!IF DEFINED(RELEASE)
+!IF DEFINED(DEBUG)
+
+OUT_DIR = build\debug
+BIN_DIR = bin.dbg
+
+MISCDEFS = /D:_X86_ /DWIN32 /DNULL=0 /DOOSQLDBG
+CFLAGS =  /nologo /EHsc /Zi /Od /MTd /D_DEBUG /DEBUGTYPE:CV /Fd$(OUT_DIR)\ooSQLiteDbg.pdb $(BASEFLAGS) $(MISCDEFS) /c
+LFLAGS_EXE = /nologo /DEBUG /OPT:REF -debugtype:cv /SUBSYSTEM:Console $(REXX_LIBS) $(WIN_LIBS)
+LFLAGS_DLL = /nologo /DEBUG /OPT:REF -debugtype:cv /SUBSYSTEM:Windows $(REXX_LIBS) $(WIN_LIBS) -def:$(PLATFORM_DIR)\ooSQLite.def /DLL
+
+!ELSE
 
 OUT_DIR = build\release
 BIN_DIR = bin\windows
 
 MISCDEFS = /D:_X86_ /DWIN32 /DNDEBUG /DNULL=0
-CFLAGS = /nologo /EHsc /O2 /Gr /Gs /Gy /FAs /Fa$(OUT_DIR)\ /MT $(BASEFLAGS) $(MISCDEFS) /c
+CFLAGS = /nologo /EHsc /O2 /Gs /Gy /FAs /Fa$(OUT_DIR)\ /MT $(BASEFLAGS) $(MISCDEFS) /c
+BOTAN_CFLAGS = /nologo /EHs /O2 /Gs /Gy /FAs /Fa$(OUT_DIR)\ /MT /wd4244 /wd4267 $(BASEFLAGS) /DNOMINMAX $(MISCDEFS) /c
+
 LFLAGS_EXE = /nologo /SUBSYSTEM:Console $(REXX_LIBS) $(WIN_LIBS)
 LFLAGS_DLL = /nologo /SUBSYSTEM:Windows $(REXX_LIBS) $(WIN_LIBS) -def:$(PLATFORM_DIR)\ooSQLite.def /DLL
 
-!ELSE
-
-OUT_DIR = build\debug
-BIN_DIR = bin.dbg
-
-MISCDEFS = /D:_X86_ /DWIN32 /DNULL=0 /DOOSQLDBG
-CFLAGS =  /nologo /EHsc /Zi /Od /Gr /MTd /D_DEBUG /DEBUGTYPE:CV /Fd$(OUT_DIR)\ooSQLiteDbg.pdb $(BASEFLAGS) $(MISCDEFS) /c
-LFLAGS_EXE = /nologo /DEBUG /OPT:REF -debugtype:cv /SUBSYSTEM:Console $(REXX_LIBS) $(WIN_LIBS)
-LFLAGS_DLL = /nologo /DEBUG /OPT:REF -debugtype:cv /SUBSYSTEM:Windows $(REXX_LIBS) $(WIN_LIBS) -def:$(PLATFORM_DIR)\ooSQLite.def /DLL
-
 !ENDIF
 
 # What we want to build.  ooSQLite3.exe is the command line version of SQLite.
 # ooSQLite3.exe should be no different than what you can download from the
-# SQLite website as sqlite3.exe, it has no ooRexx addtitions.
+# SQLite website as sqlite3.exe, except that it has a few defaults changed.
 all: $(BIN_DIR)\oosqlite.dll $(BIN_DIR)\ooSQLite3.exe $(BIN_DIR)\ooSQLite.cls