]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Modify the MSVC batch build tool to support the MSVC autoconf Makefile.
authormistachkin <mistachkin@noemail.net>
Fri, 19 Feb 2016 05:07:56 +0000 (05:07 +0000)
committermistachkin <mistachkin@noemail.net>
Fri, 19 Feb 2016 05:07:56 +0000 (05:07 +0000)
FossilOrigin-Name: 72b10e5e7d2db436c7b03cc3735a2e9d0e53ab5d

Makefile.msc
autoconf/Makefile.msc
manifest
manifest.uuid
tool/build-all-msvc.bat
tool/mkmsvcmin.tcl

index 843f9a25379fd0e99b08c48c15a5bb889301f179..1782b7551a75241c5d19790d3008901cb03eb40c 100644 (file)
@@ -219,27 +219,43 @@ SQLITE3H = sqlite3.h
 # This is the name to use for the SQLite dynamic link library (DLL).
 #
 !IFNDEF SQLITE3DLL
+!IF $(FOR_WIN10)!=0
+SQLITE3DLL = winsqlite3.dll
+!ELSE
 SQLITE3DLL = sqlite3.dll
 !ENDIF
+!ENDIF
 
 # This is the name to use for the SQLite import library (LIB).
 #
 !IFNDEF SQLITE3LIB
+!IF $(FOR_WIN10)!=0
+SQLITE3LIB = winsqlite3.lib
+!ELSE
 SQLITE3LIB = sqlite3.lib
 !ENDIF
+!ENDIF
 
 # This is the name to use for the SQLite shell executable (EXE).
 #
 !IFNDEF SQLITE3EXE
+!IF $(FOR_WIN10)!=0
+SQLITE3EXE = winsqlite3shell.exe
+!ELSE
 SQLITE3EXE = sqlite3.exe
 !ENDIF
+!ENDIF
 
 # This is the argument used to set the program database (PDB) file for the
 # SQLite shell executable (EXE).
 #
 !IFNDEF SQLITE3EXEPDB
+!IF $(FOR_WIN10)!=0
+SQLITE3EXEPDB =
+!ELSE
 SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
 !ENDIF
+!ENDIF
 
 # These are the "standard" SQLite compilation options used when compiling for
 # the Windows platform.
@@ -417,15 +433,6 @@ TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
 TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src -fp:precise
 RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -I$(TOP)\src $(RCOPTS) $(RCCOPTS)
 
-# Adjust the names of the primary targets for use with Windows 10.
-#
-!IF $(FOR_WIN10)!=0
-SQLITE3DLL = winsqlite3.dll
-SQLITE3LIB = winsqlite3.lib
-SQLITE3EXE = winsqlite3shell.exe
-SQLITE3EXEPDB =
-!ENDIF
-
 # Check if we want to use the "stdcall" calling convention when compiling.
 # This is not supported by the compilers for non-x86 platforms.  It should
 # also be noted here that building any target with these "stdcall" options
@@ -1386,10 +1393,10 @@ dll: $(SQLITE3DLL)
 #
 shell: $(SQLITE3EXE)
 
+# <<mark>>
 libsqlite3.lib:        $(LIBOBJ)
        $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
 
-# <<mark>>
 libtclsqlite3.lib:     tclsqlite.lo libsqlite3.lib
        $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
 # <</mark>>
index 0be42b4e5fcedf5d106772e6467b4b73b6efd4e5..8bb7ac297365e86c6c26f8a840f9b6b0d03fec40 100644 (file)
@@ -204,27 +204,43 @@ SQLITE3H = sqlite3.h
 # This is the name to use for the SQLite dynamic link library (DLL).
 #
 !IFNDEF SQLITE3DLL
+!IF $(FOR_WIN10)!=0
+SQLITE3DLL = winsqlite3.dll
+!ELSE
 SQLITE3DLL = sqlite3.dll
 !ENDIF
+!ENDIF
 
 # This is the name to use for the SQLite import library (LIB).
 #
 !IFNDEF SQLITE3LIB
+!IF $(FOR_WIN10)!=0
+SQLITE3LIB = winsqlite3.lib
+!ELSE
 SQLITE3LIB = sqlite3.lib
 !ENDIF
+!ENDIF
 
 # This is the name to use for the SQLite shell executable (EXE).
 #
 !IFNDEF SQLITE3EXE
+!IF $(FOR_WIN10)!=0
+SQLITE3EXE = winsqlite3shell.exe
+!ELSE
 SQLITE3EXE = sqlite3.exe
 !ENDIF
+!ENDIF
 
 # This is the argument used to set the program database (PDB) file for the
 # SQLite shell executable (EXE).
 #
 !IFNDEF SQLITE3EXEPDB
+!IF $(FOR_WIN10)!=0
+SQLITE3EXEPDB =
+!ELSE
 SQLITE3EXEPDB = /pdb:sqlite3sh.pdb
 !ENDIF
+!ENDIF
 
 # These are the "standard" SQLite compilation options used when compiling for
 # the Windows platform.
@@ -402,15 +418,6 @@ TCC = $(CC) -nologo -W3 $(CCOPTS) $(TCCOPTS)
 TCC = $(TCC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) -fp:precise
 RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) $(RCOPTS) $(RCCOPTS)
 
-# Adjust the names of the primary targets for use with Windows 10.
-#
-!IF $(FOR_WIN10)!=0
-SQLITE3DLL = winsqlite3.dll
-SQLITE3LIB = winsqlite3.lib
-SQLITE3EXE = winsqlite3shell.exe
-SQLITE3EXEPDB =
-!ENDIF
-
 # Check if we want to use the "stdcall" calling convention when compiling.
 # This is not supported by the compilers for non-x86 platforms.  It should
 # also be noted here that building any target with these "stdcall" options
@@ -863,7 +870,7 @@ SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_SHELL_JSON1 -DSQLITE_ENABLE_
 # This is the default Makefile target.  The objects listed here
 # are what get build when you type just "make" with no arguments.
 #
-all:   dll libsqlite3.lib shell
+all:   dll shell
 
 # Dynamic link library section.
 #
@@ -873,9 +880,6 @@ dll: $(SQLITE3DLL)
 #
 shell: $(SQLITE3EXE)
 
-libsqlite3.lib:        $(LIBOBJ)
-       $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
-
 
 $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
        $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
index 66116a44c0ae66933e5958f0cc2357c68c84ab1c..27f4a99e1c81b0b3a09584f03fa5568dab2bfde4 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
-C Further\simprovements\sto\sthe\sMSVC\sbatch\sbuild\stool.
-D 2016-02-19T00:47:18.626
+C Modify\sthe\sMSVC\sbatch\sbuild\stool\sto\ssupport\sthe\sMSVC\sautoconf\sMakefile.
+D 2016-02-19T05:07:56.206
 F Makefile.in 4e90dc1521879022aa9479268a4cd141d1771142
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
-F Makefile.msc 30f075dc4f27a07abb76088946b2944178d85347
+F Makefile.msc d3a190d93235a9aa142e4ade7b473435a5d376f9
 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7
 F VERSION 866588d1edf0ccb5b0d33896974338f97564f719
 F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
@@ -11,7 +11,7 @@ F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
 F autoconf/Makefile.am 29e2a6e8d0c5e32723a48b4faf6b168854dde5f4
-F autoconf/Makefile.msc b865d2c72cf43cbf39913336415556af8ff2e819
+F autoconf/Makefile.msc fe04b5870a3e4b98c73e8a82e04e98f330da7ea7
 F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7
 F autoconf/README.txt 7c31da66232f7590bb987cfcd4e2381744b25d24
 F autoconf/configure.ac 72a5e42beb090b32bca580285dc0ab3c4670adb8
@@ -1367,7 +1367,7 @@ F test/zerodamage.test cf6748bad89553cc1632be51a6f54e487e4039ac
 F tool/GetFile.cs a15e08acb5dd7539b75ba23501581d7c2b462cb5
 F tool/GetTclKit.bat 629d87562e0487c386db630033931d12d62e6372
 F tool/addopcodes.tcl 4ca9c3ef196f08da30add5d07ce0c9458dc8c633
-F tool/build-all-msvc.bat ab27285398404cdf99c56430fda7a98f5b1121c2 x
+F tool/build-all-msvc.bat fba6e16e6bad4600b6ab278ca90b1fcf74de63de x
 F tool/build-shell.sh 950f47c6174f1eea171319438b93ba67ff5bf367
 F tool/cg_anno.tcl 692ce4b8693d59e3a3de77ca97f4139ecfa641b0 x
 F tool/checkSpacing.c 810e51703529a204fc4e1eb060e9ab663e3c06d2
@@ -1384,7 +1384,7 @@ F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
 F tool/logest.c eef612f8adf4d0993dafed0416064cf50d5d33c6
 F tool/mkautoconfamal.sh c78caa3214f25dc28ea157b5a82abb311f209906
 F tool/mkkeywordhash.c f7f3b342211ac6a14258b9726d5b97cf4f548f22
-F tool/mkmsvcmin.tcl d57e6efc9428605f5418d0b235721ddf7b5d9c0b
+F tool/mkmsvcmin.tcl f9fc6f6a373084c0e0feef972485212bd0869c06
 F tool/mkopcodec.tcl d1b6362bd3aa80d5520d4d6f3765badf01f6c43c
 F tool/mkopcodeh.tcl 385c62d78c38b2d92146dcb5abd319dbbc33506d
 F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e
@@ -1427,7 +1427,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh ef6ebc6fd8d2dc35db3b622015c16a023d4fef4f
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P b47d03027e973e3c8d77246a2d2100881f6a9bd2
-R 52407255ef725bc9c494bd471eda3f67
+P 90dd6eb1fec22460473d670519d0e730bb37067d
+R c6d10791b59e57f5d1181c2f31399663
 U mistachkin
-Z 739640b3c8a946907b4aabf37d1a947b
+Z 5c3b7d3d4a467152f425917bb5dd9dae
index a1149e2673f6282f37a208aacdc51d102e611863..92cc237f4bbfe092da605c608f5e2404c983c9f3 100644 (file)
@@ -1 +1 @@
-90dd6eb1fec22460473d670519d0e730bb37067d
\ No newline at end of file
+72b10e5e7d2db436c7b03cc3735a2e9d0e53ab5d
\ No newline at end of file
index c64a4e289ca663ffb8161984587baf2599433dbe..c09ab1cd1c464a5489e5a152981fd6f596ed9285 100755 (executable)
@@ -22,7 +22,7 @@ REM
 REM Example:\r
 REM\r
 REM                        CD /D C:\dev\sqlite\core\r
-REM                        tool\build-all-msvc.bat C:\Temp\r
+REM                        CALL tool\build-all-msvc.bat C:\Temp\r
 REM\r
 REM In the example above, "C:\dev\sqlite\core" represents the root of the\r
 REM source tree for SQLite and "C:\Temp" represents the final destination\r
@@ -54,6 +54,11 @@ REM
 REM There are a few other environment variables that impact the build process\r
 REM when set ^(to anything^), they are:\r
 REM\r
+REM                        USE_AUTOCONF_MAKEFILE\r
+REM\r
+REM When set, the "autoconf" Makefile for MSVC will be used instead of the main\r
+REM Makefile for MSVC.  It must exist at "%ROOT%\autoconf\Makefile.msc".\r
+REM\r
 REM                        NOCLEAN\r
 REM\r
 REM When set, the "clean" target will not be used during each build iteration.\r
@@ -93,12 +98,16 @@ REM on the WindowsSdkDir environment variable.  It causes this batch script to
 REM assume the Windows 10.0 SDK location should be used.\r
 REM\r
 REM                        NMAKE_ARGS\r
+REM                        NMAKE_ARGS_DEBUG\r
+REM                        NMAKE_ARGS_RETAIL\r
 REM\r
-REM When set, the value is expanded and passed to the NMAKE command line, after\r
-REM its other arguments.  This is used to specify additional NMAKE options, for\r
-REM example:\r
+REM When set, these values are expanded and passed to the NMAKE command line,\r
+REM after its other arguments.  These may be used to specify additional NMAKE\r
+REM options, for example:\r
 REM\r
 REM                        SET NMAKE_ARGS=FOR_WINRT=1\r
+REM                        SET NMAKE_ARGS_DEBUG=MEMDEBUG=1\r
+REM                        SET NMAKE_ARGS_RETAIL=WIN32HEAP=1\r
 REM\r
 REM Using the above command before running this tool will cause the compiled\r
 REM binaries to target the WinRT environment, which provides a subset of the\r
@@ -218,11 +227,17 @@ REM NOTE: If the command used to invoke NMAKE is not already set, use the
 REM       default.\r
 REM\r
 IF NOT DEFINED NMAKE_CMD (\r
-  SET NMAKE_CMD=nmake -B -f Makefile.msc\r
+  IF DEFINED USE_AUTOCONF_MAKEFILE (\r
+    SET NMAKE_CMD=nmake -B -f autoconf\Makefile.msc\r
+  ) ELSE (\r
+    SET NMAKE_CMD=nmake -B -f Makefile.msc\r
+  )\r
 )\r
 \r
 %_VECHO% NmakeCmd = '%NMAKE_CMD%'\r
 %_VECHO% NmakeArgs = '%NMAKE_ARGS%'\r
+%_VECHO% NmakeArgsDebug = '%NMAKE_ARGS_DEBUG%'\r
+%_VECHO% NmakeArgsRetail = '%NMAKE_ARGS_RETAIL%'\r
 \r
 REM\r
 REM NOTE: Setup environment variables to translate between the MSVC platform\r
@@ -480,6 +495,12 @@ FOR %%P IN (%PLATFORMS%) DO (
         CALL :fn_UnsetVariable MEMDEBUG\r
       )\r
 \r
+      REM\r
+      REM NOTE: Copy the extra NMAKE arguments for this configuration into the\r
+      REM       common variable used by the actual commands.\r
+      REM\r
+      CALL :fn_CopyVariable NMAKE_ARGS_%%B NMAKE_ARGS_CFG\r
+\r
       REM\r
       REM NOTE: Launch a nested command shell to perform the following steps:\r
       REM\r
@@ -586,7 +607,7 @@ FOR %%P IN (%PLATFORMS%) DO (
         REM       file, etc.\r
         REM\r
         IF NOT DEFINED NOCLEAN (\r
-          %__ECHO% %NMAKE_CMD% clean\r
+          CALL :fn_MakeClean %%D\r
 \r
           IF ERRORLEVEL 1 (\r
             ECHO Failed to clean for platform %%P.\r
@@ -609,7 +630,7 @@ FOR %%P IN (%PLATFORMS%) DO (
         REM       Also, disable looking for and/or linking to the native Tcl\r
         REM       runtime library.\r
         REM\r
-        %__ECHO% %NMAKE_CMD% "%DLL_FILE_NAME%" "PLATFORM=%%D" XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%\r
+        CALL :fn_MakeDll %%D\r
 \r
         IF ERRORLEVEL 1 (\r
           ECHO Failed to build %%B "%DLL_FILE_NAME%" for platform %%P.\r
@@ -677,7 +698,7 @@ FOR %%P IN (%PLATFORMS%) DO (
           REM       Also, disable looking for and/or linking to the native Tcl\r
           REM       runtime library.\r
           REM\r
-          %__ECHO% %NMAKE_CMD% "%EXE_FILE_NAME%" "PLATFORM=%%D" XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%\r
+          CALL :fn_MakeExe %%D\r
 \r
           IF ERRORLEVEL 1 (\r
             ECHO Failed to build %%B "%EXE_FILE_NAME%" for platform %%P.\r
@@ -736,6 +757,18 @@ REM NOTE: If we get to this point, we have succeeded.
 REM\r
 GOTO no_errors\r
 \r
+:fn_MakeClean\r
+  %__ECHO% %NMAKE_CMD% clean "PLATFORM=%1" %NMAKE_ARGS% %NMAKE_ARGS_CFG%\r
+  GOTO :EOF\r
+\r
+:fn_MakeDll\r
+  %__ECHO% %NMAKE_CMD% "%DLL_FILE_NAME%" "PLATFORM=%1" XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS% %NMAKE_ARGS_CFG%\r
+  GOTO :EOF\r
+\r
+:fn_MakeExe\r
+  %__ECHO% %NMAKE_CMD% "%EXE_FILE_NAME%" "PLATFORM=%1" XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS% %NMAKE_ARGS_CFG%\r
+  GOTO :EOF\r
+\r
 :fn_ShowVariable\r
   SETLOCAL\r
   SET __ECHO_CMD=ECHO %%%2%%\r
index da0cd6283c1880af7fec982000b277e88dd09347..41754cd57685345c55eab9ecb4f450d56905274c 100644 (file)
@@ -92,6 +92,7 @@ foreach i [lsort -integer [array names blocks]] {
 set data [string map [list " -I\$(TOP)\\src" ""] $data]
 set data [string map [list " /DEF:sqlite3.def" ""] $data]
 set data [string map [list " sqlite3.def" ""] $data]
+set data [string map [list " libsqlite3.lib" ""] $data]
 set data [string map [list " \$(ALL_TCL_TARGETS)" ""] $data]
 set data [string map [list "\$(TOP)\\src\\" "\$(TOP)\\"] $data]