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

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

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 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
11 REM and configurations using MSVC. The built SQLite DLLs, their associated 11 REM and configurations using MSVC. The built SQLite DLLs, their associated
12 REM import libraries, and optionally their symbols files, are placed within 12 REM import libraries, and optionally their symbols files, are placed within
13 REM the directory specified on the command line, in sub-directories named for 13 REM the directory specified on the command line, in sub-directories named for
14 REM their respective platforms and configurations. This batch script must be 14 REM their respective platforms and configurations. This batch script must be
15 REM run from inside a Visual Studio Command Prompt for the desired version of 15 REM run from inside a Visual Studio Command Prompt for the desired version of
16 REM Visual Studio ^(the initial platform configured for the command prompt does 16 REM Visual Studio ^(the initial platform configured for the command prompt does
17 REM not really matter^). Exactly one command line argument is required, the 17 REM not really matter^). Exactly one command line argument is required, the
18 REM name of an existing directory to be used as the final destination directory 18 REM name of an existing directory to be used as the final destination directory
19 REM for the generated output files, which will be placed in sub-directories 19 REM for the generated output files, which will be placed in sub-directories
20 REM created therein. Ideally, the directory specified should be empty. 20 REM created therein. Ideally, the directory specified should be empty.
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 CALL 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 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 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 33 REM in a directory contained in the PATH environment variable unless a
34 REM pre-existing amalgamation file is used. 34 REM pre-existing amalgamation file is used.
35 REM 35 REM
(...skipping 11 matching lines...) Expand all
47 REM variables may be set to specify the location of the CRT, Universal CRT, and 47 REM variables may be set to specify the location of the CRT, Universal CRT, and
48 REM Windows SDK, respectively, that may be needed to compile executables native 48 REM Windows SDK, respectively, that may be needed to compile executables native
49 REM to the architecture of the build machine during any cross-compilation that 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 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 51 REM these three variables should be surrounded by double quotes if they contain
52 REM spaces. 52 REM spaces.
53 REM 53 REM
54 REM There are a few other environment variables that impact the build process 54 REM There are a few other environment variables that impact the build process
55 REM when set ^(to anything^), they are: 55 REM when set ^(to anything^), they are:
56 REM 56 REM
57 REM USE_AUTOCONF_MAKEFILE
58 REM
59 REM When set, the "autoconf" Makefile for MSVC will be used instead of the main
60 REM Makefile for MSVC. It must exist at "%ROOT%\autoconf\Makefile.msc".
61 REM
57 REM NOCLEAN 62 REM NOCLEAN
58 REM 63 REM
59 REM When set, the "clean" target will not be used during each build iteration. 64 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 65 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 66 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 67 REM and could cause issues in some circumstances; therefore, setting it is not
63 REM recommended. 68 REM recommended.
64 REM 69 REM
65 REM NOSYMBOLS 70 REM NOSYMBOLS
66 REM 71 REM
67 REM When set, copying of symbol files ^(*.pdb^) created during the build will 72 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. 73 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 74 REM Setting this environment variable is never strictly needed and could cause
70 REM issues in some circumstances; therefore, setting it is not recommended. 75 REM issues in some circumstances; therefore, setting it is not recommended.
71 REM 76 REM
77 REM NOMEMDEBUG
78 REM
79 REM When set, disables use of MEMDEBUG when building binaries for the "Debug"
80 REM configuration.
81 REM
72 REM BUILD_ALL_SHELL 82 REM BUILD_ALL_SHELL
73 REM 83 REM
74 REM When set, the command line shell will be built for each selected platform 84 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 85 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. 86 REM will be copied, with their symbols, to the final destination directory.
77 REM 87 REM
78 REM USE_WINV63_NSDKLIBPATH 88 REM USE_WINV63_NSDKLIBPATH
79 REM 89 REM
80 REM When set, modifies how the NSDKLIBPATH environment variable is built, based 90 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 91 REM on the WindowsSdkDir environment variable. It forces this batch script to
82 REM assume the Windows 8.1 SDK location should be used. 92 REM assume the Windows 8.1 SDK location should be used.
83 REM 93 REM
84 REM USE_WINV100_NSDKLIBPATH 94 REM USE_WINV100_NSDKLIBPATH
85 REM 95 REM
86 REM When set, modifies how the NSDKLIBPATH environment variable is built, based 96 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 97 REM on the WindowsSdkDir environment variable. It causes this batch script to
88 REM assume the Windows 10.0 SDK location should be used. 98 REM assume the Windows 10.0 SDK location should be used.
89 REM 99 REM
90 REM NMAKE_ARGS 100 REM NMAKE_ARGS
101 REM NMAKE_ARGS_DEBUG
102 REM NMAKE_ARGS_RETAIL
91 REM 103 REM
92 REM When set, the value is expanded and passed to the NMAKE command line, after 104 REM When set, these values are expanded and passed to the NMAKE command line,
93 REM its other arguments. This is used to specify additional NMAKE options, for 105 REM after its other arguments. These may be used to specify additional NMAKE
94 REM example: 106 REM options, for example:
95 REM 107 REM
96 REM SET NMAKE_ARGS=FOR_WINRT=1 108 REM SET NMAKE_ARGS=FOR_WINRT=1
109 REM SET NMAKE_ARGS_DEBUG=MEMDEBUG=1
110 REM SET NMAKE_ARGS_RETAIL=WIN32HEAP=1
97 REM 111 REM
98 REM Using the above command before running this tool will cause the compiled 112 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 113 REM binaries to target the WinRT environment, which provides a subset of the
100 REM Win32 API. 114 REM Win32 API.
101 REM 115 REM
116 REM DLL_FILE_NAME
117 REM DLL_PDB_FILE_NAME
118 REM LIB_FILE_NAME
119 REM EXE_FILE_NAME
120 REM EXE_PDB_FILE_NAME
121 REM
122 REM When set, these values will override the associated target file name used
123 REM for the build.
124 REM
102 SETLOCAL 125 SETLOCAL
103 126
104 REM SET __ECHO=ECHO 127 REM SET __ECHO=ECHO
105 REM SET __ECHO2=ECHO 128 REM SET __ECHO2=ECHO
106 REM SET __ECHO3=ECHO 129 REM SET __ECHO3=ECHO
107 IF NOT DEFINED _AECHO (SET _AECHO=REM) 130 IF NOT DEFINED _AECHO (SET _AECHO=REM)
108 IF NOT DEFINED _CECHO (SET _CECHO=REM) 131 IF NOT DEFINED _CECHO (SET _CECHO=REM)
109 IF NOT DEFINED _VECHO (SET _VECHO=REM) 132 IF NOT DEFINED _VECHO (SET _VECHO=REM)
110 133
111 SET REDIRECT=^> 134 SET REDIRECT=^>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 SET CONFIGURATIONS=Debug Retail 220 SET CONFIGURATIONS=Debug Retail
198 ) 221 )
199 222
200 %_VECHO% Configurations = '%CONFIGURATIONS%' 223 %_VECHO% Configurations = '%CONFIGURATIONS%'
201 224
202 REM 225 REM
203 REM NOTE: If the command used to invoke NMAKE is not already set, use the 226 REM NOTE: If the command used to invoke NMAKE is not already set, use the
204 REM default. 227 REM default.
205 REM 228 REM
206 IF NOT DEFINED NMAKE_CMD ( 229 IF NOT DEFINED NMAKE_CMD (
207 SET NMAKE_CMD=nmake -B -f Makefile.msc 230 IF DEFINED USE_AUTOCONF_MAKEFILE (
231 SET NMAKE_CMD=nmake -B -f autoconf\Makefile.msc
232 ) ELSE (
233 SET NMAKE_CMD=nmake -B -f Makefile.msc
234 )
208 ) 235 )
209 236
210 %_VECHO% NmakeCmd = '%NMAKE_CMD%' 237 %_VECHO% NmakeCmd = '%NMAKE_CMD%'
211 %_VECHO% NmakeArgs = '%NMAKE_ARGS%' 238 %_VECHO% NmakeArgs = '%NMAKE_ARGS%'
239 %_VECHO% NmakeArgsDebug = '%NMAKE_ARGS_DEBUG%'
240 %_VECHO% NmakeArgsRetail = '%NMAKE_ARGS_RETAIL%'
212 241
213 REM 242 REM
214 REM NOTE: Setup environment variables to translate between the MSVC platform 243 REM NOTE: Setup environment variables to translate between the MSVC platform
215 REM names and the names to be used for the platform-specific binary 244 REM names and the names to be used for the platform-specific binary
216 REM directories. 245 REM directories.
217 REM 246 REM
218 SET amd64_NAME=x64 247 SET amd64_NAME=x64
219 SET arm_NAME=ARM 248 SET arm_NAME=ARM
220 SET x64_NAME=x64 249 SET x64_NAME=x64
221 SET x86_NAME=x86 250 SET x86_NAME=x86
(...skipping 10 matching lines...) Expand all
232 %_VECHO% x86_x64_Name = '%x86_x64_NAME%' 261 %_VECHO% x86_x64_Name = '%x86_x64_NAME%'
233 262
234 REM 263 REM
235 REM NOTE: Check for the external tools needed during the build process ^(i.e. 264 REM NOTE: Check for the external tools needed during the build process ^(i.e.
236 REM those that do not get compiled as part of the build process itself^) 265 REM those that do not get compiled as part of the build process itself^)
237 REM along the PATH. 266 REM along the PATH.
238 REM 267 REM
239 IF DEFINED TCLSH_CMD ( 268 IF DEFINED TCLSH_CMD (
240 SET TCLSH_FILE=%TCLSH_CMD% 269 SET TCLSH_FILE=%TCLSH_CMD%
241 ) ELSE ( 270 ) ELSE (
242 SET TCLSH_FILE=tclsh85.exe 271 SET TCLSH_FILE=tclsh.exe
243 ) 272 )
244 273
245 FOR %%T IN (%TCLSH_FILE%) DO ( 274 FOR %%T IN (%TCLSH_FILE%) DO (
246 SET %%T_PATH=%%~dp$PATH:T 275 SET %%T_PATH=%%~dp$PATH:T
247 ) 276 )
248 277
249 REM 278 REM
250 REM NOTE: A Tcl shell executable is required during the SQLite build process 279 REM NOTE: A Tcl shell executable is required during the SQLite build process
251 REM unless a pre-existing amalgamation file is used. 280 REM unless a pre-existing amalgamation file is used.
252 REM 281 REM
253 IF NOT DEFINED %TCLSH_FILE%_PATH ( 282 IF NOT DEFINED %TCLSH_FILE%_PATH (
254 ECHO The Tcl shell executable "%TCLSH_FILE%" is required to be in the PATH. 283 ECHO The Tcl shell executable "%TCLSH_FILE%" is required to be in the PATH.
255 GOTO errors 284 GOTO errors
256 ) 285 )
257 286
258 REM 287 REM
288 REM NOTE: Setup the default names for the build targets we are creating. Any
289 REM ^(or all^) of these may end up being overridden.
290 REM
291 IF NOT DEFINED DLL_FILE_NAME (
292 SET DLL_FILE_NAME=sqlite3.dll
293 )
294
295 IF NOT DEFINED DLL_PDB_FILE_NAME (
296 SET DLL_PDB_FILE_NAME=sqlite3.pdb
297 )
298
299 IF NOT DEFINED LIB_FILE_NAME (
300 SET LIB_FILE_NAME=sqlite3.lib
301 )
302
303 IF NOT DEFINED EXE_FILE_NAME (
304 SET EXE_FILE_NAME=sqlite3.exe
305 )
306
307 IF NOT DEFINED EXE_PDB_FILE_NAME (
308 SET EXE_PDB_FILE_NAME=sqlite3sh.pdb
309 )
310
311 REM
259 REM NOTE: Set the TOOLPATH variable to contain all the directories where the 312 REM NOTE: Set the TOOLPATH variable to contain all the directories where the
260 REM external tools were found in the search above. 313 REM external tools were found in the search above.
261 REM 314 REM
262 CALL :fn_CopyVariable %TCLSH_FILE%_PATH TOOLPATH 315 CALL :fn_CopyVariable %TCLSH_FILE%_PATH TOOLPATH
263 316
264 %_VECHO% ToolPath = '%TOOLPATH%' 317 %_VECHO% ToolPath = '%TOOLPATH%'
265 318
266 REM 319 REM
267 REM NOTE: Setting the Windows SDK library path is only required for MSVC 320 REM NOTE: Setting the Windows SDK library path is only required for MSVC
268 REM 2012, 2013, and 2015. 321 REM 2012, 2013, and 2015.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 REM disable all compiler optimizations and prevent use of the 480 REM disable all compiler optimizations and prevent use of the
428 REM NDEBUG define. Additionally, both SQLITE_ENABLE_API_ARMOR 481 REM NDEBUG define. Additionally, both SQLITE_ENABLE_API_ARMOR
429 REM and SQLITE_DEBUG defines should be enabled. 482 REM and SQLITE_DEBUG defines should be enabled.
430 REM 483 REM
431 SET DEBUG=3 484 SET DEBUG=3
432 485
433 REM 486 REM
434 REM NOTE: Setting this to non-zero should enable the SQLITE_MEMDEBUG 487 REM NOTE: Setting this to non-zero should enable the SQLITE_MEMDEBUG
435 REM define. 488 REM define.
436 REM 489 REM
437 SET MEMDEBUG=1 490 IF NOT DEFINED NOMEMDEBUG (
491 SET MEMDEBUG=1
492 )
438 ) ELSE ( 493 ) ELSE (
439 CALL :fn_UnsetVariable DEBUG 494 CALL :fn_UnsetVariable DEBUG
440 CALL :fn_UnsetVariable MEMDEBUG 495 CALL :fn_UnsetVariable MEMDEBUG
441 ) 496 )
442 497
443 REM 498 REM
499 REM NOTE: Copy the extra NMAKE arguments for this configuration into the
500 REM common variable used by the actual commands.
501 REM
502 CALL :fn_CopyVariable NMAKE_ARGS_%%B NMAKE_ARGS_CFG
503
504 REM
444 REM NOTE: Launch a nested command shell to perform the following steps: 505 REM NOTE: Launch a nested command shell to perform the following steps:
445 REM 506 REM
446 REM 1. Setup the MSVC environment for this platform using the 507 REM 1. Setup the MSVC environment for this platform using the
447 REM official batch file. 508 REM official batch file.
448 REM 509 REM
449 REM 2. Make sure that no stale build output files are present. 510 REM 2. Make sure that no stale build output files are present.
450 REM 511 REM
451 REM 3. Build the "sqlite3.dll" and "sqlite3.lib" binaries for this 512 REM 3. Build the "sqlite3.dll" and "sqlite3.lib" binaries for this
452 REM platform. 513 REM platform.
453 REM 514 REM
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 ) 600 )
540 ) 601 )
541 602
542 REM 603 REM
543 REM NOTE: Unless prevented from doing so, invoke NMAKE with the MSVC 604 REM NOTE: Unless prevented from doing so, invoke NMAKE with the MSVC
544 REM makefile to clean any stale build output from previous 605 REM makefile to clean any stale build output from previous
545 REM iterations of this loop and/or previous runs of this batch 606 REM iterations of this loop and/or previous runs of this batch
546 REM file, etc. 607 REM file, etc.
547 REM 608 REM
548 IF NOT DEFINED NOCLEAN ( 609 IF NOT DEFINED NOCLEAN (
549 %__ECHO% %NMAKE_CMD% clean 610 CALL :fn_MakeClean %%D
550 611
551 IF ERRORLEVEL 1 ( 612 IF ERRORLEVEL 1 (
552 ECHO Failed to clean for platform %%P. 613 ECHO Failed to clean for platform %%P.
553 GOTO errors 614 GOTO errors
554 ) 615 )
555 ) ELSE ( 616 ) ELSE (
556 REM 617 REM
557 REM NOTE: Even when the cleaning step has been disabled, we still 618 REM NOTE: Even when the cleaning step has been disabled, we still
558 REM need to remove the build output for all the files we are 619 REM need to remove the build output for all the files we are
559 REM specifically wanting to build for each platform. 620 REM specifically wanting to build for each platform.
560 REM 621 REM
561 %_AECHO% Cleaning final core library output files only... 622 %_AECHO% Cleaning final core library output files only...
562 %__ECHO% DEL /Q *.lo sqlite3.dll sqlite3.lib sqlite3.pdb 2%REDIRECT% N UL 623 %__ECHO% DEL /Q *.lo "%DLL_FILE_NAME%" "%LIB_FILE_NAME%" "%DLL_PDB_FIL E_NAME%" 2%REDIRECT% NUL
563 ) 624 )
564 625
565 REM 626 REM
566 REM NOTE: Call NMAKE with the MSVC makefile to build the "sqlite3.dll" 627 REM NOTE: Call NMAKE with the MSVC makefile to build the "sqlite3.dll"
567 REM binary. The x86 compiler will be used to compile the native 628 REM binary. The x86 compiler will be used to compile the native
568 REM command line tools needed during the build process itself. 629 REM command line tools needed during the build process itself.
569 REM Also, disable looking for and/or linking to the native Tcl 630 REM Also, disable looking for and/or linking to the native Tcl
570 REM runtime library. 631 REM runtime library.
571 REM 632 REM
572 %__ECHO% %NMAKE_CMD% sqlite3.dll XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL =1 %NMAKE_ARGS% 633 CALL :fn_MakeDll %%D
573 634
574 IF ERRORLEVEL 1 ( 635 IF ERRORLEVEL 1 (
575 ECHO Failed to build %%B "sqlite3.dll" for platform %%P. 636 ECHO Failed to build %%B "%DLL_FILE_NAME%" for platform %%P.
576 GOTO errors 637 GOTO errors
577 ) 638 )
578 639
579 REM 640 REM
580 REM NOTE: Copy the "sqlite3.dll" file to the appropriate directory for 641 REM NOTE: Copy the "sqlite3.dll" file to the appropriate directory for
581 REM the build and platform beneath the binary directory. 642 REM the build and platform beneath the binary directory.
582 REM 643 REM
583 %__ECHO% XCOPY sqlite3.dll "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS % 644 %__ECHO% XCOPY "%DLL_FILE_NAME%" "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% % DFLAGS%
584 645
585 IF ERRORLEVEL 1 ( 646 IF ERRORLEVEL 1 (
586 ECHO Failed to copy "sqlite3.dll" to "%BINARYDIRECTORY%\%%B\%%D\". 647 ECHO Failed to copy "%DLL_FILE_NAME%" to "%BINARYDIRECTORY%\%%B\%%D\".
587 GOTO errors 648 GOTO errors
588 ) 649 )
589 650
590 REM 651 REM
591 REM NOTE: Copy the "sqlite3.lib" file to the appropriate directory for 652 REM NOTE: Copy the "sqlite3.lib" file to the appropriate directory for
592 REM the build and platform beneath the binary directory. 653 REM the build and platform beneath the binary directory.
593 REM 654 REM
594 %__ECHO% XCOPY sqlite3.lib "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS % 655 %__ECHO% XCOPY "%LIB_FILE_NAME%" "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% % DFLAGS%
595 656
596 IF ERRORLEVEL 1 ( 657 IF ERRORLEVEL 1 (
597 ECHO Failed to copy "sqlite3.lib" to "%BINARYDIRECTORY%\%%B\%%D\". 658 ECHO Failed to copy "%LIB_FILE_NAME%" to "%BINARYDIRECTORY%\%%B\%%D\".
598 GOTO errors 659 GOTO errors
599 ) 660 )
600 661
601 REM 662 REM
602 REM NOTE: Copy the "sqlite3.pdb" file to the appropriate directory for 663 REM NOTE: Copy the "sqlite3.pdb" file to the appropriate directory for
603 REM the build and platform beneath the binary directory unless we 664 REM the build and platform beneath the binary directory unless we
604 REM are prevented from doing so. 665 REM are prevented from doing so.
605 REM 666 REM
606 IF NOT DEFINED NOSYMBOLS ( 667 IF NOT DEFINED NOSYMBOLS (
607 %__ECHO% XCOPY sqlite3.pdb "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLA GS% 668 IF EXIST "%DLL_PDB_FILE_NAME%" (
669 %__ECHO% XCOPY "%DLL_PDB_FILE_NAME%" "%BINARYDIRECTORY%\%%B\%%D\" %F FLAGS% %DFLAGS%
608 670
609 IF ERRORLEVEL 1 ( 671 IF ERRORLEVEL 1 (
610 ECHO Failed to copy "sqlite3.pdb" to "%BINARYDIRECTORY%\%%B\%%D\". 672 ECHO Failed to copy "%DLL_PDB_FILE_NAME%" to "%BINARYDIRECTORY%\%% B\%%D\".
611 GOTO errors 673 GOTO errors
674 )
612 ) 675 )
613 ) 676 )
614 677
615 REM 678 REM
616 REM NOTE: If requested, also build the shell executable. 679 REM NOTE: If requested, also build the shell executable.
617 REM 680 REM
618 IF DEFINED BUILD_ALL_SHELL ( 681 IF DEFINED BUILD_ALL_SHELL (
619 REM 682 REM
620 REM NOTE: If necessary, make sure any previous build output for the 683 REM NOTE: If necessary, make sure any previous build output for the
621 REM shell executable is deleted. 684 REM shell executable is deleted.
622 REM 685 REM
623 IF DEFINED NOCLEAN ( 686 IF DEFINED NOCLEAN (
624 REM 687 REM
625 REM NOTE: Even when the cleaning step has been disabled, we still 688 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 689 REM need to remove the build output for all the files we are
627 REM specifically wanting to build for each platform. 690 REM specifically wanting to build for each platform.
628 REM 691 REM
629 %_AECHO% Cleaning final shell executable output files only... 692 %_AECHO% Cleaning final shell executable output files only...
630 %__ECHO% DEL /Q sqlite3.exe sqlite3sh.pdb 2%REDIRECT% NUL 693 %__ECHO% DEL /Q "%EXE_FILE_NAME%" "%EXE_PDB_FILE_NAME%" 2%REDIRECT% NUL
631 ) 694 )
632 695
633 REM 696 REM
634 REM NOTE: Call NMAKE with the MSVC makefile to build the "sqlite3.exe" 697 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 698 REM binary. The x86 compiler will be used to compile the native
636 REM command line tools needed during the build process itself. 699 REM command line tools needed during the build process itself.
637 REM Also, disable looking for and/or linking to the native Tcl 700 REM Also, disable looking for and/or linking to the native Tcl
638 REM runtime library. 701 REM runtime library.
639 REM 702 REM
640 %__ECHO% %NMAKE_CMD% sqlite3.exe XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_T CL=1 %NMAKE_ARGS% 703 CALL :fn_MakeExe %%D
641 704
642 IF ERRORLEVEL 1 ( 705 IF ERRORLEVEL 1 (
643 ECHO Failed to build %%B "sqlite3.exe" for platform %%P. 706 ECHO Failed to build %%B "%EXE_FILE_NAME%" for platform %%P.
644 GOTO errors 707 GOTO errors
645 ) 708 )
646 709
647 REM 710 REM
648 REM NOTE: Copy the "sqlite3.exe" file to the appropriate directory 711 REM NOTE: Copy the "sqlite3.exe" file to the appropriate directory
649 REM for the build and platform beneath the binary directory. 712 REM for the build and platform beneath the binary directory.
650 REM 713 REM
651 %__ECHO% XCOPY sqlite3.exe "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLA GS% 714 %__ECHO% XCOPY "%EXE_FILE_NAME%" "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
652 715
653 IF ERRORLEVEL 1 ( 716 IF ERRORLEVEL 1 (
654 ECHO Failed to copy "sqlite3.exe" to "%BINARYDIRECTORY%\%%B\%%D\". 717 ECHO Failed to copy "%EXE_FILE_NAME%" to "%BINARYDIRECTORY%\%%B\%%D\ ".
655 GOTO errors 718 GOTO errors
656 ) 719 )
657 720
658 REM 721 REM
659 REM NOTE: Copy the "sqlite3sh.pdb" file to the appropriate directory 722 REM NOTE: Copy the "sqlite3sh.pdb" file to the appropriate directory
660 REM for the build and platform beneath the binary directory 723 REM for the build and platform beneath the binary directory
661 REM unless we are prevented from doing so. 724 REM unless we are prevented from doing so.
662 REM 725 REM
663 IF NOT DEFINED NOSYMBOLS ( 726 IF NOT DEFINED NOSYMBOLS (
664 %__ECHO% XCOPY sqlite3sh.pdb "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% % DFLAGS% 727 IF EXIST "%EXE_PDB_FILE_NAME%" (
728 %__ECHO% XCOPY "%EXE_PDB_FILE_NAME%" "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
665 729
666 IF ERRORLEVEL 1 ( 730 IF ERRORLEVEL 1 (
667 ECHO Failed to copy "sqlite3sh.pdb" to "%BINARYDIRECTORY%\%%B\%%D\ ". 731 ECHO Failed to copy "%EXE_PDB_FILE_NAME%" to "%BINARYDIRECTORY%\ %%B\%%D\".
668 GOTO errors 732 GOTO errors
733 )
669 ) 734 )
670 ) 735 )
671 ) 736 )
672 ) 737 )
673 ) 738 )
674 ) 739 )
675 740
676 REM 741 REM
677 REM NOTE: Handle any errors generated during the nested command shell. 742 REM NOTE: Handle any errors generated during the nested command shell.
678 REM 743 REM
(...skipping 10 matching lines...) Expand all
689 IF ERRORLEVEL 1 ( 754 IF ERRORLEVEL 1 (
690 ECHO Could not restore directory. 755 ECHO Could not restore directory.
691 GOTO errors 756 GOTO errors
692 ) 757 )
693 758
694 REM 759 REM
695 REM NOTE: If we get to this point, we have succeeded. 760 REM NOTE: If we get to this point, we have succeeded.
696 REM 761 REM
697 GOTO no_errors 762 GOTO no_errors
698 763
764 :fn_MakeClean
765 %__ECHO% %NMAKE_CMD% clean "PLATFORM=%1" XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_T CL=1 %NMAKE_ARGS% %NMAKE_ARGS_CFG%
766 GOTO :EOF
767
768 :fn_MakeDll
769 %__ECHO% %NMAKE_CMD% "%DLL_FILE_NAME%" "PLATFORM=%1" XCOMPILE=1 USE_NATIVE_LIB PATHS=1 NO_TCL=1 %NMAKE_ARGS% %NMAKE_ARGS_CFG%
770 GOTO :EOF
771
772 :fn_MakeExe
773 %__ECHO% %NMAKE_CMD% "%EXE_FILE_NAME%" "PLATFORM=%1" XCOMPILE=1 USE_NATIVE_LIB PATHS=1 NO_TCL=1 %NMAKE_ARGS% %NMAKE_ARGS_CFG%
774 GOTO :EOF
775
699 :fn_ShowVariable 776 :fn_ShowVariable
700 SETLOCAL 777 SETLOCAL
701 SET __ECHO_CMD=ECHO %%%2%% 778 SET __ECHO_CMD=ECHO %%%2%%
702 FOR /F "delims=" %%V IN ('%__ECHO_CMD%') DO ( 779 FOR /F "delims=" %%V IN ('%__ECHO_CMD%') DO (
703 IF NOT "%%V" == "" ( 780 IF NOT "%%V" == "" (
704 IF NOT "%%V" == "%%%2%%" ( 781 IF NOT "%%V" == "%%%2%%" (
705 %_VECHO% %1 = '%%V' 782 %_VECHO% %1 = '%%V'
706 ) 783 )
707 ) 784 )
708 ) 785 )
(...skipping 13 matching lines...) Expand all
722 IF "%2" == "" GOTO :EOF 799 IF "%2" == "" GOTO :EOF
723 SETLOCAL 800 SETLOCAL
724 SET __ECHO_CMD=ECHO %%%1%% 801 SET __ECHO_CMD=ECHO %%%1%%
725 FOR /F "delims=" %%V IN ('%__ECHO_CMD%') DO ( 802 FOR /F "delims=" %%V IN ('%__ECHO_CMD%') DO (
726 SET VALUE=%%V 803 SET VALUE=%%V
727 ) 804 )
728 ENDLOCAL && SET %2=%VALUE% 805 ENDLOCAL && SET %2=%VALUE%
729 GOTO :EOF 806 GOTO :EOF
730 807
731 :fn_UnsetVariable 808 :fn_UnsetVariable
732 IF NOT "%1" == "" ( 809 SETLOCAL
733 SET %1= 810 SET VALUE=%1
734 CALL :fn_ResetErrorLevel 811 IF DEFINED VALUE (
812 SET VALUE=
813 ENDLOCAL
814 SET %VALUE%=
815 ) ELSE (
816 ENDLOCAL
735 ) 817 )
818 CALL :fn_ResetErrorLevel
736 GOTO :EOF 819 GOTO :EOF
737 820
738 :fn_AppendVariable 821 :fn_AppendVariable
739 SET __ECHO_CMD=ECHO %%%1%% 822 SET __ECHO_CMD=ECHO %%%1%%
740 IF DEFINED %1 ( 823 IF DEFINED %1 (
741 FOR /F "delims=" %%V IN ('%__ECHO_CMD%') DO ( 824 FOR /F "delims=" %%V IN ('%__ECHO_CMD%') DO (
742 SET %1=%%V%~2 825 SET %1=%%V%~2
743 ) 826 )
744 ) ELSE ( 827 ) ELSE (
745 SET %1=%~2 828 SET %1=%~2
(...skipping 17 matching lines...) Expand all
763 846
764 :no_errors 847 :no_errors
765 CALL :fn_ResetErrorLevel 848 CALL :fn_ResetErrorLevel
766 ENDLOCAL 849 ENDLOCAL
767 ECHO. 850 ECHO.
768 ECHO Success, no errors were encountered. 851 ECHO Success, no errors were encountered.
769 GOTO end_of_file 852 GOTO end_of_file
770 853
771 :end_of_file 854 :end_of_file
772 %__ECHO% EXIT /B %ERRORLEVEL% 855 %__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