# Set this non-0 to create and use the SQLite amalgamation file.
#
+!IFNDEF USE_AMALGAMATION
USE_AMALGAMATION = 1
+!ENDIF
# Set this non-0 to use the International Components for Unicode (ICU).
#
+!IFNDEF USE_ICU
USE_ICU = 0
+!ENDIF
# Set this non-0 to dynamically link to the MSVC runtime library.
#
+!IFNDEF USE_CRT_DLL
USE_CRT_DLL = 0
+!ENDIF
# Set this non-0 to attempt setting the native compiler automatically
# for cross-compiling the command line tools needed during the compilation
# process.
#
+!IFNDEF XCOMPILE
XCOMPILE = 0
+!ENDIF
# Set this non-0 to use the native libraries paths for cross-compiling
# the command line tools needed during the compilation process.
#
+!IFNDEF USE_NATIVE_LIBPATHS
USE_NATIVE_LIBPATHS = 0
+!ENDIF
# Set this 0 to skip the compiling and embedding of version resources.
#
+!IFNDEF USE_RC
USE_RC = 1
+!ENDIF
# Set this non-0 to compile binaries suitable for the WinRT environment.
# This setting does not apply to any binaries that require Tcl to operate
# properly (i.e. the text fixture, etc).
#
+!IFNDEF FOR_WINRT
FOR_WINRT = 0
+!ENDIF
# Set this non-0 to skip attempting to look for and/or link with the Tcl
# runtime library.
#
+!IFNDEF NO_TCL
NO_TCL = 0
+!ENDIF
# Set this to non-0 to create and use PDBs.
#
+!IFNDEF SYMBOLS
SYMBOLS = 1
+!ENDIF
# Set this to non-0 to use the SQLite debugging heap subsystem.
#
+!IFNDEF MEMDEBUG
MEMDEBUG = 0
+!ENDIF
# Set this to non-0 to use the Win32 native heap subsystem.
#
+!IFNDEF WIN32HEAP
WIN32HEAP = 0
+!ENDIF
# Set this to one of the following values to enable various debugging
# features. Each level includes the debugging options from the previous
# 4 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
# 5 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
#
+!IFNDEF DEBUG
DEBUG = 0
+!ENDIF
# Check for the predefined command macro CC. This should point to the compiler
# binary for the target platform. If it is not defined, simply define it to
-C Fix\sduplicate\stest\sname\sin\swhereD.test.
-D 2012-10-10T13:59:11.378
+C Tooling\ssupport\sfor\sincluding\sthe\sdebug\sbuild\sin\sthe\sVSIX\spackage.
+D 2012-10-12T18:06:07.816
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5f4f26109f9d80829122e0e09f9cda008fa065fb
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
-F Makefile.msc a8495ef567c1872cd9e0679c96a02aafbf9c43b5
+F Makefile.msc 1d8a5d3cf33b8b8d3247c99367a37af384cc7ebd
F Makefile.vxworks b18ad88e9a8c6a001f5cf4a389116a4f1a7ab45f
F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
F VERSION edab4af5a4623f8198833ea481ce98ab53750a8d
F test/win32lock.test b2a539e85ae6b2d78475e016a9636b4451dc7fb9
F test/zeroblob.test caaecfb4f908f7bc086ed238668049f96774d688
F test/zerodamage.test e7f77fded01dfcdf92ac2c5400f1e35d7a21463c
-F tool/build-all-msvc.bat cd505f24717ca4ecd94c651f763d7bb4e7fe68af x
+F tool/build-all-msvc.bat 76b835e0ab91e30f22d8aa48db9dea4d2dc59e9f x
F tool/build-shell.sh b64a481901fc9ffe5ca8812a2a9255b6cfb77381
F tool/checkSpacing.c 810e51703529a204fc4e1eb060e9ab663e3c06d2
F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
F tool/mksqlite3c.tcl 589c7f44e990be1b8443cfe4808dce392b0327fa
F tool/mksqlite3h.tcl 78013ad79a5e492e5f764f3c7a8ef834255061f8
F tool/mksqlite3internalh.tcl 3dca7bb5374cee003379b8cbac73714f610ef795
-F tool/mkvsix.tcl 19b2ab9ea16445953a76568a5bbe4cb864f92dfe
+F tool/mkvsix.tcl a27951f30bb39c3504196610f17f687fc0b1c94d
F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091
F tool/omittest.tcl 4665982e95a6e5c1bd806cf7bc3dea95be422d77
F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9
-P 96247853ef3d556a13b899b4c907b9fa2c78d513
-R eb33f3fc302126c0f34a21ed878e78ec
+P 1182b54af0fd43d5e6aa6399837e7915aa60a578
+R 9e8254ec6d4a71f688da7a8600f59454
U mistachkin
-Z 046d6c9be8479dde4d96235907c599c3
+Z 3494f0e2927d2f78ffed9eda067be39b
-1182b54af0fd43d5e6aa6399837e7915aa60a578
\ No newline at end of file
+de784399ed1f0e27fc875e32719643d19819c8fb
\ No newline at end of file
\r
REM SET __ECHO=ECHO\r
REM SET __ECHO2=ECHO\r
+REM SET __ECHO3=ECHO\r
IF NOT DEFINED _AECHO (SET _AECHO=REM)\r
IF NOT DEFINED _CECHO (SET _CECHO=REM)\r
IF NOT DEFINED _VECHO (SET _VECHO=REM)\r
REM\r
SET PATH=%TOOLPATH%;%SystemRoot%\System32;%SystemRoot%\r
\r
- REM\r
- REM NOTE: Launch a nested command shell to perform the following steps:\r
- REM\r
- REM 1. Setup the MSVC environment for this platform using the\r
- REM official batch file.\r
- REM\r
- REM 2. Make sure that no stale build output files are present.\r
- REM\r
- REM 3. Build the "sqlite3.dll" and "sqlite3.lib" binaries for this\r
- REM platform.\r
- REM\r
- REM 4. Copy the "sqlite3.dll" and "sqlite3.lib" binaries for this\r
- REM platform to the platform-specific directory beneath the\r
- REM binary directory.\r
- REM\r
- "%ComSpec%" /C (\r
+ FOR %%B IN (Debug Retail) DO (\r
REM\r
- REM NOTE: Attempt to setup the MSVC environment for this platform.\r
+ REM NOTE: When preparing the debug build, set the DEBUG and MEMDEBUG\r
+ REM environment variables to be picked up by the MSVC makefile\r
+ REM itself.\r
REM\r
- %__ECHO% CALL "%VCINSTALLDIR%\vcvarsall.bat" %%P\r
-\r
- IF ERRORLEVEL 1 (\r
- ECHO Failed to call "%VCINSTALLDIR%\vcvarsall.bat" for platform %%P.\r
- GOTO errors\r
+ IF /I "%%B" == "Debug" (\r
+ SET DEBUG=2\r
+ SET MEMDEBUG=1\r
+ ) ELSE (\r
+ CALL :fn_UnsetVariable DEBUG\r
+ CALL :fn_UnsetVariable MEMDEBUG\r
)\r
\r
REM\r
- REM NOTE: If this batch file is not running in "what-if" mode, check to\r
- REM be sure we were actually able to setup the MSVC environment as\r
- REM current versions of their official batch file do not set the\r
- REM exit code upon failure.\r
+ REM NOTE: Launch a nested command shell to perform the following steps:\r
REM\r
- IF NOT DEFINED __ECHO (\r
- IF NOT DEFINED WindowsSdkDir (\r
- ECHO Cannot build, Windows SDK not found for platform %%P.\r
- GOTO errors\r
- )\r
- )\r
-\r
+ REM 1. Setup the MSVC environment for this platform using the\r
+ REM official batch file.\r
REM\r
- REM NOTE: When using MSVC 2012, the native SDK path cannot simply use\r
- REM the "lib" sub-directory beneath the location specified in the\r
- REM WindowsSdkDir environment variable because that location does\r
- REM not actually contain the necessary library files for x86.\r
- REM This must be done for each iteration because it relies upon\r
- REM the WindowsSdkDir environment variable being set by the batch\r
- REM file used to setup the MSVC environment.\r
+ REM 2. Make sure that no stale build output files are present.\r
REM\r
- IF DEFINED SET_NSDKLIBPATH (\r
- CALL :fn_CopyVariable WindowsSdkDir NSDKLIBPATH\r
- CALL :fn_AppendVariable NSDKLIBPATH \lib\win8\um\x86\r
- )\r
-\r
+ REM 3. Build the "sqlite3.dll" and "sqlite3.lib" binaries for this\r
+ REM platform.\r
REM\r
- REM NOTE: Unless prevented from doing so, invoke NMAKE with the MSVC\r
- REM makefile to clean any stale build output from previous\r
- REM iterations of this loop and/or previous runs of this batch\r
- REM file, etc.\r
+ REM 4. Copy the "sqlite3.dll" and "sqlite3.lib" binaries for this\r
+ REM platform to the platform-specific directory beneath the\r
+ REM binary directory.\r
REM\r
- IF NOT DEFINED NOCLEAN (\r
- %__ECHO% nmake -f Makefile.msc clean\r
+ "%ComSpec%" /C (\r
+ REM\r
+ REM NOTE: Attempt to setup the MSVC environment for this platform.\r
+ REM\r
+ %__ECHO3% CALL "%VCINSTALLDIR%\vcvarsall.bat" %%P\r
\r
IF ERRORLEVEL 1 (\r
- ECHO Failed to clean for platform %%P.\r
+ ECHO Failed to call "%VCINSTALLDIR%\vcvarsall.bat" for platform %%P.\r
GOTO errors\r
)\r
- ) ELSE (\r
+\r
REM\r
- REM NOTE: Even when the cleaning step has been disabled, we still need\r
- REM to remove the build output for the files we are specifically\r
- REM wanting to build for each platform.\r
+ REM NOTE: If this batch file is not running in "what-if" mode, check to\r
+ REM be sure we were actually able to setup the MSVC environment\r
+ REM as current versions of their official batch file do not set\r
+ REM the exit code upon failure.\r
REM\r
- %__ECHO% DEL /Q sqlite3.dll sqlite3.lib sqlite3.pdb\r
- )\r
+ IF NOT DEFINED __ECHO (\r
+ IF NOT DEFINED WindowsSdkDir (\r
+ ECHO Cannot build, Windows SDK not found for platform %%P.\r
+ GOTO errors\r
+ )\r
+ )\r
\r
- REM\r
- REM NOTE: Invoke NMAKE with the MSVC makefile to build the "sqlite3.dll"\r
- REM binary. The x86 compiler will be used to compile the native\r
- REM command line tools needed during the build process itself.\r
- REM Also, disable looking for and/or linking to the native Tcl\r
- REM runtime library.\r
- REM\r
- %__ECHO% nmake -f Makefile.msc sqlite3.dll "NCC=""%VCINSTALLDIR%\bin\cl.exe""" USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%\r
+ REM\r
+ REM NOTE: When using MSVC 2012, the native SDK path cannot simply use\r
+ REM the "lib" sub-directory beneath the location specified in the\r
+ REM WindowsSdkDir environment variable because that location does\r
+ REM not actually contain the necessary library files for x86.\r
+ REM This must be done for each iteration because it relies upon\r
+ REM the WindowsSdkDir environment variable being set by the batch\r
+ REM file used to setup the MSVC environment.\r
+ REM\r
+ IF DEFINED SET_NSDKLIBPATH (\r
+ CALL :fn_CopyVariable WindowsSdkDir NSDKLIBPATH\r
+ CALL :fn_AppendVariable NSDKLIBPATH \lib\win8\um\x86\r
+ )\r
\r
- IF ERRORLEVEL 1 (\r
- ECHO Failed to build "sqlite3.dll" for platform %%P.\r
- GOTO errors\r
- )\r
+ REM\r
+ REM NOTE: Unless prevented from doing so, invoke NMAKE with the MSVC\r
+ REM makefile to clean any stale build output from previous\r
+ REM iterations of this loop and/or previous runs of this batch\r
+ REM file, etc.\r
+ REM\r
+ IF NOT DEFINED NOCLEAN (\r
+ %__ECHO% nmake -f Makefile.msc clean\r
+\r
+ IF ERRORLEVEL 1 (\r
+ ECHO Failed to clean for platform %%P.\r
+ GOTO errors\r
+ )\r
+ ) ELSE (\r
+ REM\r
+ REM NOTE: Even when the cleaning step has been disabled, we still\r
+ REM need to remove the build output for the files we are\r
+ REM specifically wanting to build for each platform.\r
+ REM\r
+ %__ECHO% DEL /Q sqlite3.dll sqlite3.lib sqlite3.pdb\r
+ )\r
\r
- REM\r
- REM NOTE: Copy the "sqlite3.dll" file to the platform-specific directory\r
- REM beneath the binary directory.\r
- REM\r
- %__ECHO% XCOPY sqlite3.dll "%BINARYDIRECTORY%\%%D\" %FFLAGS% %DFLAGS%\r
+ REM\r
+ REM NOTE: Call NMAKE with the MSVC makefile to build the "sqlite3.dll"\r
+ REM binary. The x86 compiler will be used to compile the native\r
+ REM command line tools needed during the build process itself.\r
+ REM Also, disable looking for and/or linking to the native Tcl\r
+ REM runtime library.\r
+ REM\r
+ %__ECHO% nmake -f Makefile.msc sqlite3.dll XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%\r
\r
- IF ERRORLEVEL 1 (\r
- ECHO Failed to copy "sqlite3.dll" to "%BINARYDIRECTORY%\%%D\".\r
- GOTO errors\r
- )\r
+ IF ERRORLEVEL 1 (\r
+ ECHO Failed to build %%B "sqlite3.dll" for platform %%P.\r
+ GOTO errors\r
+ )\r
\r
- REM\r
- REM NOTE: Copy the "sqlite3.lib" file to the platform-specific directory\r
- REM beneath the binary directory.\r
- REM\r
- %__ECHO% XCOPY sqlite3.lib "%BINARYDIRECTORY%\%%D\" %FFLAGS% %DFLAGS%\r
+ REM\r
+ REM NOTE: Copy the "sqlite3.dll" file to the appropriate directory for\r
+ REM the build and platform beneath the binary directory.\r
+ REM\r
+ %__ECHO% XCOPY sqlite3.dll "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%\r
\r
- IF ERRORLEVEL 1 (\r
- ECHO Failed to copy "sqlite3.lib" to "%BINARYDIRECTORY%\%%D\".\r
- GOTO errors\r
- )\r
+ IF ERRORLEVEL 1 (\r
+ ECHO Failed to copy "sqlite3.dll" to "%BINARYDIRECTORY%\%%B\%%D\".\r
+ GOTO errors\r
+ )\r
\r
- REM\r
- REM NOTE: Copy the "sqlite3.pdb" file to the platform-specific directory\r
- REM beneath the binary directory unless we are prevented from doing\r
- REM so.\r
- REM\r
- IF NOT DEFINED NOSYMBOLS (\r
- %__ECHO% XCOPY sqlite3.pdb "%BINARYDIRECTORY%\%%D\" %FFLAGS% %DFLAGS%\r
+ REM\r
+ REM NOTE: Copy the "sqlite3.lib" file to the appropriate directory for\r
+ REM the build and platform beneath the binary directory.\r
+ REM\r
+ %__ECHO% XCOPY sqlite3.lib "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%\r
\r
IF ERRORLEVEL 1 (\r
- ECHO Failed to copy "sqlite3.pdb" to "%BINARYDIRECTORY%\%%D\".\r
+ ECHO Failed to copy "sqlite3.lib" to "%BINARYDIRECTORY%\%%B\%%D\".\r
GOTO errors\r
)\r
+\r
+ REM\r
+ REM NOTE: Copy the "sqlite3.pdb" file to the appropriate directory for\r
+ REM the build and platform beneath the binary directory unless we\r
+ REM are prevented from doing so.\r
+ REM\r
+ IF NOT DEFINED NOSYMBOLS (\r
+ %__ECHO% XCOPY sqlite3.pdb "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%\r
+\r
+ IF ERRORLEVEL 1 (\r
+ ECHO Failed to copy "sqlite3.pdb" to "%BINARYDIRECTORY%\%%B\%%D\".\r
+ GOTO errors\r
+ )\r
+ )\r
)\r
)\r
)\r
return [writeFile $fileName [uplevel 1 [list subst [readFile $fileName]]]]
}
\f
-proc replacePlatform { fileName platformName } {
+proc replaceBuildAndPlatform { fileName buildName platformName } {
#
# NOTE: Returns the specified file name containing the platform name instead
# of platform placeholder tokens.
#
- return [string map [list <platform> $platformName] $fileName]
+ return [string map [list <build> $buildName <platform> $platformName] \
+ $fileName]
}
\f
set script [file normalize [info script]]
if {![info exists fileNames(source)]} then {
set fileNames(source) [list "" "" "" \
[file join $sourceDirectory sqlite3.h] \
- [file join $binaryDirectory <platform> sqlite3.lib] \
- [file join $binaryDirectory <platform> sqlite3.dll]]
+ [file join $binaryDirectory <build> <platform> sqlite3.lib] \
+ [file join $binaryDirectory <build> <platform> sqlite3.dll]]
if {![info exists no(symbols)]} then {
lappend fileNames(source) \
- [file join $binaryDirectory <platform> sqlite3.pdb]
+ [file join $binaryDirectory <build> <platform> sqlite3.pdb]
}
}
set fileNames(destination) [list \
[file join $stagingDirectory extension.vsixmanifest] \
[file join $stagingDirectory SDKManifest.xml] \
- [file join $stagingDirectory DesignTime CommonConfiguration \
- <platform> SQLite.WinRT.props] \
- [file join $stagingDirectory DesignTime CommonConfiguration \
- <platform> sqlite3.h] \
- [file join $stagingDirectory DesignTime CommonConfiguration \
- <platform> sqlite3.lib] \
- [file join $stagingDirectory Redist CommonConfiguration \
- <platform> sqlite3.dll]]
+ [file join $stagingDirectory DesignTime <build> <platform> \
+ SQLite.WinRT.props] \
+ [file join $stagingDirectory DesignTime <build> <platform> sqlite3.h] \
+ [file join $stagingDirectory DesignTime <build> <platform> sqlite3.lib] \
+ [file join $stagingDirectory Redist <build> <platform> sqlite3.dll]]
if {![info exists no(symbols)]} then {
lappend fileNames(destination) \
- [file join $stagingDirectory Redist Debug \
- <platform> sqlite3.pdb]
+ [file join $stagingDirectory Redist <build> <platform> sqlite3.pdb]
}
}
-if {![info exists fileNames(neutral)]} then {
- set fileNames(neutral) [list 1 1 1 1 0 0]
+if {![info exists fileNames(buildNeutral)]} then {
+ set fileNames(buildNeutral) [list 1 1 1 1 0 0]
if {![info exists no(symbols)]} then {
- lappend fileNames(neutral) 0
+ lappend fileNames(buildNeutral) 0
+ }
+}
+
+if {![info exists fileNames(platformNeutral)]} then {
+ set fileNames(platformNeutral) [list 1 1 1 1 0 0]
+
+ if {![info exists no(symbols)]} then {
+ lappend fileNames(platformNeutral) 0
}
}
}
}
+if {![info exists fileNames(noDebug)]} then {
+ set fileNames(noDebug) [list 0 0 0 0 0 0]
+
+ if {![info exists no(symbols)]} then {
+ lappend fileNames(noDebug) 0
+ }
+}
+
+if {![info exists fileNames(noRetail)]} then {
+ set fileNames(noRetail) [list 0 0 0 0 0 0]
+
+ if {![info exists no(symbols)]} then {
+ lappend fileNames(noRetail) 1
+ }
+}
+
+###############################################################################
+
+#
+# NOTE: Setup the list of builds supported by this script.
+#
+if {![info exists buildNames]} then {
+ set buildNames [list Debug Retail]
+}
+
###############################################################################
#
#
foreach sourceFileName $fileNames(source) \
destinationFileName $fileNames(destination) \
- isNeutral $fileNames(neutral) useSubst $fileNames(subst) {
+ buildNeutral $fileNames(buildNeutral) platformNeutral \
+ $fileNames(platformNeutral) useSubst $fileNames(subst) \
+ noDebug $fileNames(noDebug) noRetail $fileNames(noRetail) {
#
- # NOTE: If the current file is platform-neutral, then only one platform will
- # be processed for it, namely "neutral"; otherwise, each supported
- # platform will be processed for it individually.
+ # NOTE: If the current file is build-neutral, then only one build will
+ # be processed for it, namely "CommonConfiguration"; otherwise, each
+ # supported build will be processed for it individually.
#
- foreach platformName [expr {$isNeutral ? [list neutral] : $platformNames}] {
+ foreach buildName \
+ [expr {$buildNeutral ? [list CommonConfiguration] : $buildNames}] {
#
- # NOTE: Use the actual platform name in the destination file name.
+ # NOTE: Should the current file be skipped for this build?
#
- set newDestinationFileName [replacePlatform $destinationFileName \
- $platformName]
+ if {[info exists no${buildName}] && [set no${buildName}]} then {
+ continue
+ }
#
- # NOTE: Does the source file need to be copied to the destination file?
+ # NOTE: If the current file is platform-neutral, then only one platform
+ # will be processed for it, namely "neutral"; otherwise, each
+ # supported platform will be processed for it individually.
#
- if {[string length $sourceFileName] > 0} then {
+ foreach platformName \
+ [expr {$platformNeutral ? [list neutral] : $platformNames}] {
#
- # NOTE: First, make sure the destination directory exists.
+ # NOTE: Use the actual platform name in the destination file name.
#
- file mkdir [file dirname $newDestinationFileName]
+ set newDestinationFileName [replaceBuildAndPlatform \
+ $destinationFileName $buildName $platformName]
#
- # NOTE: Then, copy the source file to the destination file verbatim.
+ # NOTE: Does the source file need to be copied to the destination file?
#
- file copy [replacePlatform $sourceFileName $platformName] \
- $newDestinationFileName
- }
+ if {[string length $sourceFileName] > 0} then {
+ #
+ # NOTE: First, make sure the destination directory exists.
+ #
+ file mkdir [file dirname $newDestinationFileName]
+
+ #
+ # NOTE: Then, copy the source file to the destination file verbatim.
+ #
+ file copy [replaceBuildAndPlatform $sourceFileName $buildName \
+ $platformName] $newDestinationFileName
+ }
- #
- # NOTE: Does the destination file contain dynamic replacements that must
- # be processed now?
- #
- if {$useSubst} then {
#
- # NOTE: Perform any dynamic replacements contained in the destination
- # file and then re-write it in-place.
+ # NOTE: Does the destination file contain dynamic replacements that must
+ # be processed now?
#
- substFile $newDestinationFileName
+ if {$useSubst} then {
+ #
+ # NOTE: Perform any dynamic replacements contained in the destination
+ # file and then re-write it in-place.
+ #
+ substFile $newDestinationFileName
+ }
}
}
}