Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Side by Side Diff: third_party/sqlite/src/tool/build-all-msvc.bat

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/tool/addopcodes.tcl ('k') | third_party/sqlite/src/tool/cg_anno.tcl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 @ECHO OFF 1 @ECHO OFF
2 2
3 :: 3 ::
4 :: build-all-msvc.bat -- 4 :: build-all-msvc.bat --
5 :: 5 ::
6 :: Multi-Platform Build Tool for MSVC 6 :: Multi-Platform Build Tool for MSVC
7 :: 7 ::
8 8
9 REM 9 REM
10 REM This batch script is used to build the SQLite DLL for multiple platforms 10 REM This batch script is used to build the SQLite DLL for multiple platforms
(...skipping 10 matching lines...) Expand all
21 REM 21 REM
22 REM Example: 22 REM Example:
23 REM 23 REM
24 REM CD /D C:\dev\sqlite\core 24 REM CD /D C:\dev\sqlite\core
25 REM tool\build-all-msvc.bat C:\Temp 25 REM tool\build-all-msvc.bat C:\Temp
26 REM 26 REM
27 REM In the example above, "C:\dev\sqlite\core" represents the root of the 27 REM In the example above, "C:\dev\sqlite\core" represents the root of the
28 REM source tree for SQLite and "C:\Temp" represents the final destination 28 REM source tree for SQLite and "C:\Temp" represents the final destination
29 REM directory for the generated output files. 29 REM directory for the generated output files.
30 REM 30 REM
31 REM Please note that the SQLite build process performed by the Makefile
32 REM associated with this batch script requires a Tcl shell to be present
33 REM in a directory contained in the PATH environment variable unless a
34 REM pre-existing amalgamation file is used.
35 REM
31 REM There are several environment variables that may be set to modify the 36 REM There are several environment variables that may be set to modify the
32 REM behavior of this batch script and its associated Makefile. The list of 37 REM behavior of this batch script and its associated Makefile. The list of
33 REM platforms to build may be overriden by using the PLATFORMS environment 38 REM platforms to build may be overriden by using the PLATFORMS environment
34 REM variable, which should contain a list of platforms ^(e.g. x86 x86_amd64 39 REM variable, which should contain a list of platforms ^(e.g. x86 x86_amd64
35 REM x86_arm^). All platforms must be supported by the version of Visual Studio 40 REM x86_arm^). All platforms must be supported by the version of Visual Studio
36 REM being used. The list of configurations to build may be overridden by 41 REM being used. The list of configurations to build may be overridden by
37 REM setting the CONFIGURATIONS environment variable, which should contain a 42 REM setting the CONFIGURATIONS environment variable, which should contain a
38 REM list of configurations to build ^(e.g. Debug Retail^). Neither of these 43 REM list of configurations to build ^(e.g. Debug Retail^). Neither of these
39 REM variable values may contain any double quotes, surrounding or embedded. 44 REM variable values may contain any double quotes, surrounding or embedded.
40 REM Finally, the NCRTLIBPATH and NSDKLIBPATH environment variables may be set
41 REM to specify the location of the CRT and SDK, respectively, needed to compile
42 REM executables native to the architecture of the build machine during any
43 REM cross-compilation that may be necessary, depending on the platforms to be
44 REM built. These values in these two variables should be surrounded by double
45 REM quotes if they contain spaces.
46 REM 45 REM
47 REM Please note that the SQLite build process performed by the Makefile 46 REM Finally, the NCRTLIBPATH, NUCRTLIBPATH, and NSDKLIBPATH environment
48 REM associated with this batch script requires both Gawk ^(gawk.exe^) and Tcl 47 REM variables may be set to specify the location of the CRT, Universal CRT, and
49 REM 8.5 ^(tclsh85.exe^) to be present in a directory contained in the PATH 48 REM Windows SDK, respectively, that may be needed to compile executables native
50 REM environment variable unless a pre-existing amalgamation file is used. 49 REM to the architecture of the build machine during any cross-compilation that
50 REM may be necessary, depending on the platforms to be built. These values in
51 REM these three variables should be surrounded by double quotes if they contain
52 REM spaces.
53 REM
54 REM There are a few other environment variables that impact the build process
55 REM when set ^(to anything^), they are:
56 REM
57 REM NOCLEAN
58 REM
59 REM When set, the "clean" target will not be used during each build iteration.
60 REM However, the target binaries, if any, will still be deleted manually prior
61 REM to being rebuilt. Setting this environment variable is only rarely needed
62 REM and could cause issues in some circumstances; therefore, setting it is not
63 REM recommended.
64 REM
65 REM NOSYMBOLS
66 REM
67 REM When set, copying of symbol files ^(*.pdb^) created during the build will
68 REM be skipped and they will not appear in the final destination directory.
69 REM Setting this environment variable is never strictly needed and could cause
70 REM issues in some circumstances; therefore, setting it is not recommended.
71 REM
72 REM BUILD_ALL_SHELL
73 REM
74 REM When set, the command line shell will be built for each selected platform
75 REM and configuration as well. In addition, the command line shell binaries
76 REM will be copied, with their symbols, to the final destination directory.
77 REM
78 REM USE_WINV63_NSDKLIBPATH
79 REM
80 REM When set, modifies how the NSDKLIBPATH environment variable is built, based
81 REM on the WindowsSdkDir environment variable. It forces this batch script to
82 REM assume the Windows 8.1 SDK location should be used.
83 REM
84 REM USE_WINV100_NSDKLIBPATH
85 REM
86 REM When set, modifies how the NSDKLIBPATH environment variable is built, based
87 REM on the WindowsSdkDir environment variable. It causes this batch script to
88 REM assume the Windows 10.0 SDK location should be used.
89 REM
90 REM NMAKE_ARGS
91 REM
92 REM When set, the value is expanded and passed to the NMAKE command line, after
93 REM its other arguments. This is used to specify additional NMAKE options, for
94 REM example:
95 REM
96 REM SET NMAKE_ARGS=FOR_WINRT=1
97 REM
98 REM Using the above command before running this tool will cause the compiled
99 REM binaries to target the WinRT environment, which provides a subset of the
100 REM Win32 API.
51 REM 101 REM
52 SETLOCAL 102 SETLOCAL
53 103
54 REM SET __ECHO=ECHO 104 REM SET __ECHO=ECHO
55 REM SET __ECHO2=ECHO 105 REM SET __ECHO2=ECHO
56 REM SET __ECHO3=ECHO 106 REM SET __ECHO3=ECHO
57 IF NOT DEFINED _AECHO (SET _AECHO=REM) 107 IF NOT DEFINED _AECHO (SET _AECHO=REM)
58 IF NOT DEFINED _CECHO (SET _CECHO=REM) 108 IF NOT DEFINED _CECHO (SET _CECHO=REM)
59 IF NOT DEFINED _VECHO (SET _VECHO=REM) 109 IF NOT DEFINED _VECHO (SET _VECHO=REM)
60 110
111 SET REDIRECT=^>
112 IF DEFINED __ECHO SET REDIRECT=^^^>
113
61 %_AECHO% Running %0 %* 114 %_AECHO% Running %0 %*
62 115
63 REM SET DFLAGS=/L 116 REM SET DFLAGS=/L
64 117
65 %_VECHO% DFlags = '%DFLAGS%' 118 %_VECHO% DFlags = '%DFLAGS%'
66 119
67 SET FFLAGS=/V /F /G /H /I /R /Y /Z 120 SET FFLAGS=/V /F /G /H /I /R /Y /Z
68 121
69 %_VECHO% FFlags = '%FFLAGS%' 122 %_VECHO% FFlags = '%FFLAGS%'
70 123
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 %_VECHO% x86_Name = '%x86_NAME%' 229 %_VECHO% x86_Name = '%x86_NAME%'
177 %_VECHO% x86_amd64_Name = '%x86_amd64_NAME%' 230 %_VECHO% x86_amd64_Name = '%x86_amd64_NAME%'
178 %_VECHO% x86_arm_Name = '%x86_arm_NAME%' 231 %_VECHO% x86_arm_Name = '%x86_arm_NAME%'
179 %_VECHO% x86_x64_Name = '%x86_x64_NAME%' 232 %_VECHO% x86_x64_Name = '%x86_x64_NAME%'
180 233
181 REM 234 REM
182 REM NOTE: Check for the external tools needed during the build process ^(i.e. 235 REM NOTE: Check for the external tools needed during the build process ^(i.e.
183 REM those that do not get compiled as part of the build process itself^) 236 REM those that do not get compiled as part of the build process itself^)
184 REM along the PATH. 237 REM along the PATH.
185 REM 238 REM
186 FOR %%T IN (gawk.exe tclsh85.exe) DO ( 239 IF DEFINED TCLSH_CMD (
240 SET TCLSH_FILE=%TCLSH_CMD%
241 ) ELSE (
242 SET TCLSH_FILE=tclsh85.exe
243 )
244
245 FOR %%T IN (%TCLSH_FILE%) DO (
187 SET %%T_PATH=%%~dp$PATH:T 246 SET %%T_PATH=%%~dp$PATH:T
188 ) 247 )
189 248
190 REM 249 REM
191 REM NOTE: The Gawk executable "gawk.exe" is required during the SQLite build 250 REM NOTE: A Tcl shell executable is required during the SQLite build process
192 REM process unless a pre-existing amalgamation file is used. 251 REM unless a pre-existing amalgamation file is used.
193 REM 252 REM
194 IF NOT DEFINED gawk.exe_PATH ( 253 IF NOT DEFINED %TCLSH_FILE%_PATH (
195 ECHO The Gawk executable "gawk.exe" is required to be in the PATH. 254 ECHO The Tcl shell executable "%TCLSH_FILE%" is required to be in the PATH.
196 GOTO errors 255 GOTO errors
197 ) 256 )
198 257
199 REM
200 REM NOTE: The Tcl 8.5 executable "tclsh85.exe" is required during the SQLite
201 REM build process unless a pre-existing amalgamation file is used.
202 REM
203 IF NOT DEFINED tclsh85.exe_PATH (
204 ECHO The Tcl 8.5 executable "tclsh85.exe" is required to be in the PATH.
205 GOTO errors
206 )
207
208 REM 258 REM
209 REM NOTE: Set the TOOLPATH variable to contain all the directories where the 259 REM NOTE: Set the TOOLPATH variable to contain all the directories where the
210 REM external tools were found in the search above. 260 REM external tools were found in the search above.
211 REM 261 REM
212 SET TOOLPATH=%gawk.exe_PATH%;%tclsh85.exe_PATH% 262 CALL :fn_CopyVariable %TCLSH_FILE%_PATH TOOLPATH
213 263
214 %_VECHO% ToolPath = '%TOOLPATH%' 264 %_VECHO% ToolPath = '%TOOLPATH%'
215 265
216 REM 266 REM
217 REM NOTE: Check for MSVC 2012/2013 because the Windows SDK directory handling 267 REM NOTE: Setting the Windows SDK library path is only required for MSVC
218 REM is slightly different for those versions. 268 REM 2012, 2013, and 2015.
269 REM
270 CALL :fn_UnsetVariable SET_NSDKLIBPATH
271
272 REM
273 REM NOTE: Setting the Universal CRT library path is only required for MSVC
274 REM 2015.
275 REM
276 CALL :fn_UnsetVariable SET_NUCRTLIBPATH
277
278 REM
279 REM NOTE: Check for MSVC 2012, 2013, and 2015 specially because the Windows
280 REM SDK directory handling is slightly different for those versions.
219 REM 281 REM
220 IF "%VisualStudioVersion%" == "11.0" ( 282 IF "%VisualStudioVersion%" == "11.0" (
221 REM 283 REM
222 REM NOTE: If the Windows SDK library path has already been set, do not set 284 REM NOTE: If the Windows SDK library path has already been set, do not set
223 REM it to something else later on. 285 REM it to something else later on.
224 REM 286 REM
225 IF NOT DEFINED NSDKLIBPATH ( 287 IF NOT DEFINED NSDKLIBPATH (
226 SET SET_NSDKLIBPATH=1 288 SET SET_NSDKLIBPATH=1
227 ) 289 )
228 ) ELSE IF "%VisualStudioVersion%" == "12.0" ( 290 ) ELSE IF "%VisualStudioVersion%" == "12.0" (
229 REM 291 REM
230 REM NOTE: If the Windows SDK library path has already been set, do not set 292 REM NOTE: If the Windows SDK library path has already been set, do not set
231 REM it to something else later on. 293 REM it to something else later on.
232 REM 294 REM
233 IF NOT DEFINED NSDKLIBPATH ( 295 IF NOT DEFINED NSDKLIBPATH (
234 SET SET_NSDKLIBPATH=1 296 SET SET_NSDKLIBPATH=1
235 ) 297 )
236 ) ELSE ( 298 ) ELSE IF "%VisualStudioVersion%" == "14.0" (
237 CALL :fn_UnsetVariable SET_NSDKLIBPATH 299 REM
300 REM NOTE: If the Windows SDK library path has already been set, do not set
301 REM it to something else later on.
302 REM
303 IF NOT DEFINED NSDKLIBPATH (
304 SET SET_NSDKLIBPATH=1
305 )
306
307 REM
308 REM NOTE: If the Universal CRT library path has already been set, do not set
309 REM it to something else later on.
310 REM
311 IF NOT DEFINED NUCRTLIBPATH (
312 SET SET_NUCRTLIBPATH=1
313 )
238 ) 314 )
239 315
240 REM 316 REM
317 REM NOTE: This is the name of the sub-directory where the UCRT libraries may
318 REM be found. It is only used when compiling against the UCRT.
319 REM
320 IF DEFINED UCRTVersion (
321 SET NUCRTVER=%UCRTVersion%
322 ) ELSE (
323 SET NUCRTVER=10.0.10586.0
324 )
325
326 REM
327 REM NOTE: This is the name of the sub-directory where the Windows 10.0 SDK
328 REM libraries may be found. It is only used when compiling with the
329 REM Windows 10.0 SDK.
330 REM
331 IF DEFINED WindowsSDKLibVersion (
332 SET WIN10SDKVER=%WindowsSDKLibVersion:\=%
333 ) ELSE (
334 SET WIN10SDKVER=%NUCRTVER%
335 )
336
337 REM
241 REM NOTE: Check if this is the Windows Phone SDK. If so, a different batch 338 REM NOTE: Check if this is the Windows Phone SDK. If so, a different batch
242 REM file is necessary to setup the build environment. Since the variable 339 REM file is necessary to setup the build environment. Since the variable
243 REM values involved here may contain parenthesis, using GOTO instead of 340 REM values involved here may contain parenthesis, using GOTO instead of
244 REM an IF block is required. 341 REM an IF block is required.
245 REM 342 REM
246 IF DEFINED WindowsPhoneKitDir GOTO set_vcvarsall_phone 343 IF DEFINED WindowsPhoneKitDir GOTO set_vcvarsall_phone
247 SET VCVARSALL=%VCINSTALLDIR%\vcvarsall.bat 344 SET VCVARSALL=%VCINSTALLDIR%\vcvarsall.bat
248 GOTO set_vcvarsall_done 345 GOTO set_vcvarsall_done
249 :set_vcvarsall_phone 346 :set_vcvarsall_phone
250 SET VCVARSALL=%VCINSTALLDIR%\WPSDK\WP80\vcvarsphoneall.bat 347 SET VCVARSALL=%VCINSTALLDIR%\WPSDK\WP80\vcvarsphoneall.bat
(...skipping 21 matching lines...) Expand all
272 REM variable would be stuck with its initial empty value instead. 369 REM variable would be stuck with its initial empty value instead.
273 REM 370 REM
274 FOR /F "tokens=2* delims==" %%D IN ('SET PLATFORMNAME') DO ( 371 FOR /F "tokens=2* delims==" %%D IN ('SET PLATFORMNAME') DO (
275 REM 372 REM
276 REM NOTE: Attempt to clean the environment of all variables used by MSVC 373 REM NOTE: Attempt to clean the environment of all variables used by MSVC
277 REM and/or Visual Studio. This block may need to be updated in the 374 REM and/or Visual Studio. This block may need to be updated in the
278 REM future to account for additional environment variables. 375 REM future to account for additional environment variables.
279 REM 376 REM
280 CALL :fn_UnsetVariable CommandPromptType 377 CALL :fn_UnsetVariable CommandPromptType
281 CALL :fn_UnsetVariable DevEnvDir 378 CALL :fn_UnsetVariable DevEnvDir
379 CALL :fn_UnsetVariable DNX_HOME
282 CALL :fn_UnsetVariable ExtensionSdkDir 380 CALL :fn_UnsetVariable ExtensionSdkDir
283 CALL :fn_UnsetVariable Framework35Version 381 CALL :fn_UnsetVariable Framework35Version
284 CALL :fn_UnsetVariable Framework40Version 382 CALL :fn_UnsetVariable Framework40Version
285 CALL :fn_UnsetVariable FrameworkDir 383 CALL :fn_UnsetVariable FrameworkDir
286 CALL :fn_UnsetVariable FrameworkDir32 384 CALL :fn_UnsetVariable FrameworkDir32
287 CALL :fn_UnsetVariable FrameworkVersion 385 CALL :fn_UnsetVariable FrameworkVersion
288 CALL :fn_UnsetVariable FrameworkVersion32 386 CALL :fn_UnsetVariable FrameworkVersion32
289 CALL :fn_UnsetVariable FSHARPINSTALLDIR 387 CALL :fn_UnsetVariable FSHARPINSTALLDIR
290 CALL :fn_UnsetVariable INCLUDE 388 CALL :fn_UnsetVariable INCLUDE
291 CALL :fn_UnsetVariable LIB 389 CALL :fn_UnsetVariable LIB
292 CALL :fn_UnsetVariable LIBPATH 390 CALL :fn_UnsetVariable LIBPATH
391 CALL :fn_UnsetVariable NETFXSDKDir
293 CALL :fn_UnsetVariable Platform 392 CALL :fn_UnsetVariable Platform
393 CALL :fn_UnsetVariable UCRTVersion
394 CALL :fn_UnsetVariable UniversalCRTSdkDir
294 REM CALL :fn_UnsetVariable VCINSTALLDIR 395 REM CALL :fn_UnsetVariable VCINSTALLDIR
295 CALL :fn_UnsetVariable VSINSTALLDIR 396 CALL :fn_UnsetVariable VSINSTALLDIR
397 CALL :fn_UnsetVariable WindowsLibPath
296 CALL :fn_UnsetVariable WindowsPhoneKitDir 398 CALL :fn_UnsetVariable WindowsPhoneKitDir
297 CALL :fn_UnsetVariable WindowsSdkDir 399 CALL :fn_UnsetVariable WindowsSdkDir
298 CALL :fn_UnsetVariable WindowsSdkDir_35 400 CALL :fn_UnsetVariable WindowsSdkDir_35
299 CALL :fn_UnsetVariable WindowsSdkDir_old 401 CALL :fn_UnsetVariable WindowsSdkDir_old
402 CALL :fn_UnsetVariable WindowsSDKLibVersion
403 CALL :fn_UnsetVariable WindowsSDKVersion
300 CALL :fn_UnsetVariable WindowsSDK_ExecutablePath_x86 404 CALL :fn_UnsetVariable WindowsSDK_ExecutablePath_x86
301 CALL :fn_UnsetVariable WindowsSDK_ExecutablePath_x64 405 CALL :fn_UnsetVariable WindowsSDK_ExecutablePath_x64
302 406
303 REM 407 REM
304 REM NOTE: Reset the PATH here to the absolute bare minimum required. 408 REM NOTE: Reset the PATH here to the absolute bare minimum required.
305 REM 409 REM
306 SET PATH=%TOOLPATH%;%SystemRoot%\System32;%SystemRoot% 410 SET PATH=%TOOLPATH%;%SystemRoot%\System32;%SystemRoot%
307 411
308 REM 412 REM
309 REM NOTE: This is the inner loop. There are normally two iterations, one 413 REM NOTE: This is the inner loop. There are normally two iterations, one
310 REM for each supported build configuration, e.g. Debug or Retail. 414 REM for each supported build configuration, e.g. Debug or Retail.
311 REM 415 REM
312 FOR %%B IN (%CONFIGURATIONS%) DO ( 416 FOR %%B IN (%CONFIGURATIONS%) DO (
313 REM 417 REM
314 REM NOTE: When preparing the debug build, set the DEBUG and MEMDEBUG 418 REM NOTE: When preparing the debug build, set the DEBUG and MEMDEBUG
315 REM environment variables to be picked up by the MSVC makefile 419 REM environment variables to be picked up by the MSVC makefile
316 REM itself. 420 REM itself.
317 REM 421 REM
318 %_AECHO% Building the %%B configuration for platform %%P with name %%D... 422 %_AECHO% Building the %%B configuration for platform %%P with name %%D...
319 423
320 IF /I "%%B" == "Debug" ( 424 IF /I "%%B" == "Debug" (
321 SET DEBUG=2 425 REM
426 REM NOTE: Using this level for the DEBUG environment variable should
427 REM disable all compiler optimizations and prevent use of the
428 REM NDEBUG define. Additionally, both SQLITE_ENABLE_API_ARMOR
429 REM and SQLITE_DEBUG defines should be enabled.
430 REM
431 SET DEBUG=3
432
433 REM
434 REM NOTE: Setting this to non-zero should enable the SQLITE_MEMDEBUG
435 REM define.
436 REM
322 SET MEMDEBUG=1 437 SET MEMDEBUG=1
323 ) ELSE ( 438 ) ELSE (
324 CALL :fn_UnsetVariable DEBUG 439 CALL :fn_UnsetVariable DEBUG
325 CALL :fn_UnsetVariable MEMDEBUG 440 CALL :fn_UnsetVariable MEMDEBUG
326 ) 441 )
327 442
328 REM 443 REM
329 REM NOTE: Launch a nested command shell to perform the following steps: 444 REM NOTE: Launch a nested command shell to perform the following steps:
330 REM 445 REM
331 REM 1. Setup the MSVC environment for this platform using the 446 REM 1. Setup the MSVC environment for this platform using the
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 IF NOT DEFINED __ECHO3 ( 479 IF NOT DEFINED __ECHO3 (
365 IF NOT DEFINED WindowsPhoneKitDir ( 480 IF NOT DEFINED WindowsPhoneKitDir (
366 IF NOT DEFINED WindowsSdkDir ( 481 IF NOT DEFINED WindowsSdkDir (
367 ECHO Cannot build, Windows SDK not found for platform %%P. 482 ECHO Cannot build, Windows SDK not found for platform %%P.
368 GOTO errors 483 GOTO errors
369 ) 484 )
370 ) 485 )
371 ) 486 )
372 487
373 REM 488 REM
374 REM NOTE: When using MSVC 2012 and/or 2013, the native SDK path cannot 489 REM NOTE: When using MSVC 2012, 2013, or 2015, the native SDK path
375 REM simply use the "lib" sub-directory beneath the location 490 REM cannot simply be the "lib" sub-directory beneath the location
376 REM specified in the WindowsSdkDir environment variable because 491 REM specified in the WindowsSdkDir environment variable because
377 REM that location does not actually contain the necessary library 492 REM that location does not actually contain the necessary library
378 REM files for x86. This must be done for each iteration because 493 REM files for x86. This must be done for each iteration because
379 REM it relies upon the WindowsSdkDir environment variable being 494 REM it relies upon the WindowsSdkDir environment variable being
380 REM set by the batch file used to setup the MSVC environment. 495 REM set by the batch file used to setup the MSVC environment.
381 REM 496 REM
382 IF DEFINED SET_NSDKLIBPATH ( 497 IF DEFINED SET_NSDKLIBPATH (
383 REM 498 REM
384 REM NOTE: The Windows Phone SDK has a slightly different directory 499 REM NOTE: The Windows Phone SDK has a slightly different directory
385 REM structure and must be handled specially here. 500 REM structure and must be handled specially here.
386 REM 501 REM
387 IF DEFINED WindowsPhoneKitDir ( 502 IF DEFINED WindowsPhoneKitDir (
388 CALL :fn_CopyVariable WindowsPhoneKitDir NSDKLIBPATH 503 CALL :fn_CopyVariable WindowsPhoneKitDir NSDKLIBPATH
389 CALL :fn_AppendVariable NSDKLIBPATH \lib\x86 504 CALL :fn_AppendVariable NSDKLIBPATH \lib\x86
390 ) ELSE IF DEFINED WindowsSdkDir ( 505 ) ELSE IF DEFINED WindowsSdkDir (
391 CALL :fn_CopyVariable WindowsSdkDir NSDKLIBPATH 506 CALL :fn_CopyVariable WindowsSdkDir NSDKLIBPATH
392 507
393 REM 508 REM
394 REM NOTE: The Windows 8.1 SDK has a slightly different directory 509 REM NOTE: The Windows 8.x and Windows 10.0 SDKs have a slightly
395 REM naming convention. 510 REM different directory naming conventions.
396 REM 511 REM
397 IF DEFINED USE_WINV63_NSDKLIBPATH ( 512 IF DEFINED USE_WINV100_NSDKLIBPATH (
513 CALL :fn_AppendVariable NSDKLIBPATH \..\10\lib\%WIN10SDKVER%\um\x8 6
514 CALL :fn_CopyVariable WindowsSdkDir PSDKLIBPATH
515 CALL :fn_AppendVariable PSDKLIBPATH lib\%WIN10SDKVER%\um\%%D
516 ) ELSE IF DEFINED USE_WINV63_NSDKLIBPATH (
398 CALL :fn_AppendVariable NSDKLIBPATH \lib\winv6.3\um\x86 517 CALL :fn_AppendVariable NSDKLIBPATH \lib\winv6.3\um\x86
399 ) ELSE IF "%VisualStudioVersion%" == "12.0" ( 518 ) ELSE IF "%VisualStudioVersion%" == "12.0" (
400 CALL :fn_AppendVariable NSDKLIBPATH \..\8.0\lib\win8\um\x86 519 CALL :fn_AppendVariable NSDKLIBPATH \..\8.0\lib\win8\um\x86
520 ) ELSE IF "%VisualStudioVersion%" == "14.0" (
521 CALL :fn_AppendVariable NSDKLIBPATH \..\8.0\lib\win8\um\x86
401 ) ELSE ( 522 ) ELSE (
402 CALL :fn_AppendVariable NSDKLIBPATH \lib\win8\um\x86 523 CALL :fn_AppendVariable NSDKLIBPATH \lib\win8\um\x86
403 ) 524 )
404 ) 525 )
405 ) 526 )
406 527
407 REM 528 REM
529 REM NOTE: When using MSVC 2015, setting the Universal CRT library path
530 REM for x86 may be required as well. This must also be done for
531 REM each iteration because it relies upon the UniversalCRTSdkDir
532 REM environment variable being set by the batch file used to
533 REM setup the MSVC environment.
534 REM
535 IF DEFINED SET_NUCRTLIBPATH (
536 IF DEFINED UniversalCRTSdkDir (
537 CALL :fn_CopyVariable UniversalCRTSdkDir NUCRTLIBPATH
538 CALL :fn_AppendVariable NUCRTLIBPATH \lib\%NUCRTVER%\ucrt\x86
539 )
540 )
541
542 REM
408 REM NOTE: Unless prevented from doing so, invoke NMAKE with the MSVC 543 REM NOTE: Unless prevented from doing so, invoke NMAKE with the MSVC
409 REM makefile to clean any stale build output from previous 544 REM makefile to clean any stale build output from previous
410 REM iterations of this loop and/or previous runs of this batch 545 REM iterations of this loop and/or previous runs of this batch
411 REM file, etc. 546 REM file, etc.
412 REM 547 REM
413 IF NOT DEFINED NOCLEAN ( 548 IF NOT DEFINED NOCLEAN (
414 %__ECHO% %NMAKE_CMD% clean 549 %__ECHO% %NMAKE_CMD% clean
415 550
416 IF ERRORLEVEL 1 ( 551 IF ERRORLEVEL 1 (
417 ECHO Failed to clean for platform %%P. 552 ECHO Failed to clean for platform %%P.
418 GOTO errors 553 GOTO errors
419 ) 554 )
420 ) ELSE ( 555 ) ELSE (
421 REM 556 REM
422 REM NOTE: Even when the cleaning step has been disabled, we still 557 REM NOTE: Even when the cleaning step has been disabled, we still
423 REM need to remove the build output for the files we are 558 REM need to remove the build output for all the files we are
424 REM specifically wanting to build for each platform. 559 REM specifically wanting to build for each platform.
425 REM 560 REM
426 %_AECHO% Cleaning final output files only... 561 %_AECHO% Cleaning final core library output files only...
427 %__ECHO% DEL /Q *.lo sqlite3.dll sqlite3.lib sqlite3.pdb 562 %__ECHO% DEL /Q *.lo sqlite3.dll sqlite3.lib sqlite3.pdb 2%REDIRECT% N UL
428 ) 563 )
429 564
430 REM 565 REM
431 REM NOTE: Call NMAKE with the MSVC makefile to build the "sqlite3.dll" 566 REM NOTE: Call NMAKE with the MSVC makefile to build the "sqlite3.dll"
432 REM binary. The x86 compiler will be used to compile the native 567 REM binary. The x86 compiler will be used to compile the native
433 REM command line tools needed during the build process itself. 568 REM command line tools needed during the build process itself.
434 REM Also, disable looking for and/or linking to the native Tcl 569 REM Also, disable looking for and/or linking to the native Tcl
435 REM runtime library. 570 REM runtime library.
436 REM 571 REM
437 %__ECHO% %NMAKE_CMD% sqlite3.dll XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL =1 %NMAKE_ARGS% 572 %__ECHO% %NMAKE_CMD% sqlite3.dll XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL =1 %NMAKE_ARGS%
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 REM are prevented from doing so. 604 REM are prevented from doing so.
470 REM 605 REM
471 IF NOT DEFINED NOSYMBOLS ( 606 IF NOT DEFINED NOSYMBOLS (
472 %__ECHO% XCOPY sqlite3.pdb "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLA GS% 607 %__ECHO% XCOPY sqlite3.pdb "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLA GS%
473 608
474 IF ERRORLEVEL 1 ( 609 IF ERRORLEVEL 1 (
475 ECHO Failed to copy "sqlite3.pdb" to "%BINARYDIRECTORY%\%%B\%%D\". 610 ECHO Failed to copy "sqlite3.pdb" to "%BINARYDIRECTORY%\%%B\%%D\".
476 GOTO errors 611 GOTO errors
477 ) 612 )
478 ) 613 )
614
615 REM
616 REM NOTE: If requested, also build the shell executable.
617 REM
618 IF DEFINED BUILD_ALL_SHELL (
619 REM
620 REM NOTE: If necessary, make sure any previous build output for the
621 REM shell executable is deleted.
622 REM
623 IF DEFINED NOCLEAN (
624 REM
625 REM NOTE: Even when the cleaning step has been disabled, we still
626 REM need to remove the build output for all the files we are
627 REM specifically wanting to build for each platform.
628 REM
629 %_AECHO% Cleaning final shell executable output files only...
630 %__ECHO% DEL /Q sqlite3.exe sqlite3sh.pdb 2%REDIRECT% NUL
631 )
632
633 REM
634 REM NOTE: Call NMAKE with the MSVC makefile to build the "sqlite3.exe"
635 REM binary. The x86 compiler will be used to compile the native
636 REM command line tools needed during the build process itself.
637 REM Also, disable looking for and/or linking to the native Tcl
638 REM runtime library.
639 REM
640 %__ECHO% %NMAKE_CMD% sqlite3.exe XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_T CL=1 %NMAKE_ARGS%
641
642 IF ERRORLEVEL 1 (
643 ECHO Failed to build %%B "sqlite3.exe" for platform %%P.
644 GOTO errors
645 )
646
647 REM
648 REM NOTE: Copy the "sqlite3.exe" file to the appropriate directory
649 REM for the build and platform beneath the binary directory.
650 REM
651 %__ECHO% XCOPY sqlite3.exe "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLA GS%
652
653 IF ERRORLEVEL 1 (
654 ECHO Failed to copy "sqlite3.exe" to "%BINARYDIRECTORY%\%%B\%%D\".
655 GOTO errors
656 )
657
658 REM
659 REM NOTE: Copy the "sqlite3sh.pdb" file to the appropriate directory
660 REM for the build and platform beneath the binary directory
661 REM unless we are prevented from doing so.
662 REM
663 IF NOT DEFINED NOSYMBOLS (
664 %__ECHO% XCOPY sqlite3sh.pdb "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% % DFLAGS%
665
666 IF ERRORLEVEL 1 (
667 ECHO Failed to copy "sqlite3sh.pdb" to "%BINARYDIRECTORY%\%%B\%%D\ ".
668 GOTO errors
669 )
670 )
671 )
479 ) 672 )
480 ) 673 )
481 ) 674 )
482 675
483 REM 676 REM
484 REM NOTE: Handle any errors generated during the nested command shell. 677 REM NOTE: Handle any errors generated during the nested command shell.
485 REM 678 REM
486 IF ERRORLEVEL 1 ( 679 IF ERRORLEVEL 1 (
487 GOTO errors 680 GOTO errors
488 ) 681 )
489 ) 682 )
490 683
491 REM 684 REM
492 REM NOTE: Restore the saved current directory from the directory stack. 685 REM NOTE: Restore the saved current directory from the directory stack.
493 REM 686 REM
494 %__ECHO2% POPD 687 %__ECHO2% POPD
495 688
496 IF ERRORLEVEL 1 ( 689 IF ERRORLEVEL 1 (
497 ECHO Could not restore directory. 690 ECHO Could not restore directory.
498 GOTO errors 691 GOTO errors
499 ) 692 )
500 693
501 REM 694 REM
502 REM NOTE: If we get to this point, we have succeeded. 695 REM NOTE: If we get to this point, we have succeeded.
503 REM 696 REM
504 GOTO no_errors 697 GOTO no_errors
505 698
699 :fn_ShowVariable
700 SETLOCAL
701 SET __ECHO_CMD=ECHO %%%2%%
702 FOR /F "delims=" %%V IN ('%__ECHO_CMD%') DO (
703 IF NOT "%%V" == "" (
704 IF NOT "%%V" == "%%%2%%" (
705 %_VECHO% %1 = '%%V'
706 )
707 )
708 )
709 ENDLOCAL
710 GOTO :EOF
711
506 :fn_ResetErrorLevel 712 :fn_ResetErrorLevel
507 VERIFY > NUL 713 VERIFY > NUL
508 GOTO :EOF 714 GOTO :EOF
509 715
510 :fn_SetErrorLevel 716 :fn_SetErrorLevel
511 VERIFY MAYBE 2> NUL 717 VERIFY MAYBE 2> NUL
512 GOTO :EOF 718 GOTO :EOF
513 719
514 :fn_CopyVariable 720 :fn_CopyVariable
515 IF NOT DEFINED %1 GOTO :EOF 721 IF NOT DEFINED %1 GOTO :EOF
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 763
558 :no_errors 764 :no_errors
559 CALL :fn_ResetErrorLevel 765 CALL :fn_ResetErrorLevel
560 ENDLOCAL 766 ENDLOCAL
561 ECHO. 767 ECHO.
562 ECHO Success, no errors were encountered. 768 ECHO Success, no errors were encountered.
563 GOTO end_of_file 769 GOTO end_of_file
564 770
565 :end_of_file 771 :end_of_file
566 %__ECHO% EXIT /B %ERRORLEVEL% 772 %__ECHO% EXIT /B %ERRORLEVEL%
OLDNEW
« no previous file with comments | « third_party/sqlite/src/tool/addopcodes.tcl ('k') | third_party/sqlite/src/tool/cg_anno.tcl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698