From: mistachkin Date: Fri, 27 Jul 2012 08:21:45 +0000 (+0000) Subject: Modify the multi-platform build tool for MSVC to support the latest RC version. X-Git-Tag: version-3.7.14~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd0ba2aa22f3c78151c3be0f0841abf8a8e2b324;p=thirdparty%2Fsqlite.git Modify the multi-platform build tool for MSVC to support the latest RC version. FossilOrigin-Name: 95b65883bbf476a17f09ff978df4f51af615baab --- diff --git a/Makefile.msc b/Makefile.msc index 8e1a36cf8c..76f368f3e4 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -80,7 +80,9 @@ LD = link.exe # "NCC=""%VCINSTALLDIR%\bin\cl.exe""" # USE_NATIVE_LIBPATHS=1 # -!IFNDEF NCC +!IFDEF NCC +NCC = $(NCC:\\=\) +!ELSE NCC = $(CC) !ENDIF @@ -90,6 +92,7 @@ NCC = $(CC) # !IFNDEF NCRTLIBPATH NCRTLIBPATH = $(VCINSTALLDIR)\lib +NCRTLIBPATH = $(NCRTLIBPATH:\\=\) !ENDIF # Check for the Platform SDK library path macro. Othertise, this @@ -100,6 +103,7 @@ NCRTLIBPATH = $(VCINSTALLDIR)\lib # !IFNDEF NSDKLIBPATH NSDKLIBPATH = $(WINDOWSSDKDIR)\lib +NSDKLIBPATH = $(NSDKLIBPATH:\\=\) !ENDIF # C compiler and options for use in building executables that diff --git a/manifest b/manifest index 569844a12f..d2a58a13a1 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Add\stool\sto\sbuild\sthe\score\sDLL\sfor\smultiple\splatforms\susing\sMSVC. -D 2012-07-27T07:13:25.700 +C Modify\sthe\smulti-platform\sbuild\stool\sfor\sMSVC\sto\ssupport\sthe\slatest\sRC\sversion. +D 2012-07-27T08:21:45.506 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 8f6d858bf3df9978ba43df19985146a1173025e4 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc d598bf4a464d2e9ecbeeea809969c2ac3bf97359 +F Makefile.msc 21c3e04a68386c867a362f6332e8c3c15e4bb237 F Makefile.vxworks 879f034a64062a364b21000266bbd5bc6e0c19b9 F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6 F VERSION a71848df48082f1d6585d4b0819d530fc455485d @@ -966,7 +966,7 @@ F test/wherelimit.test 5e9fd41e79bb2b2d588ed999d641d9c965619b31 F test/win32lock.test b2a539e85ae6b2d78475e016a9636b4451dc7fb9 F test/zeroblob.test caaecfb4f908f7bc086ed238668049f96774d688 F test/zerodamage.test 0de750389990b1078bab203c712dc3fefd1d8b82 -F tool/build-all-msvc.bat fe0f031dce6881469b0949283a3cfa8a93032eca x +F tool/build-all-msvc.bat c739e5376cf8519ea7a9dce7e3f0c45f16a607f9 x F tool/build-shell.sh b64a481901fc9ffe5ca8812a2a9255b6cfb77381 F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b F tool/extract.c 054069d81b095fbdc189a6f5d4466e40380505e2 @@ -1008,7 +1008,7 @@ F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 84163b633f01f35cb47495c05dd2b640159677ff -P 8b90e0c4dbcedaf3e61c5d49452997705be1ef98 -R 352e3b46f2ff977e05b0828462f57f7b +P e42f5812f142522852f6dc72430bc7afdd6f2ed3 +R 68817282cd6637b6d21e0b351abec1b7 U mistachkin -Z 1ba4e6125d90314090d1c67374bcfabc +Z bf08b5aacb62102aa7b12a64799d345d diff --git a/manifest.uuid b/manifest.uuid index 73ae6a4e94..929a6482f4 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e42f5812f142522852f6dc72430bc7afdd6f2ed3 \ No newline at end of file +95b65883bbf476a17f09ff978df4f51af615baab \ No newline at end of file diff --git a/tool/build-all-msvc.bat b/tool/build-all-msvc.bat index c5c10d0905..e62f4c310a 100755 --- a/tool/build-all-msvc.bat +++ b/tool/build-all-msvc.bat @@ -122,6 +122,16 @@ SET TOOLPATH=%gawk.exe_PATH%;%tclsh85.exe_PATH% %_VECHO% ToolPath = '%TOOLPATH%' +REM +REM NOTE: Check for MSVC 2012 because the Windows SDK directory handling is +REM slightly different for that version. +REM +IF "%VisualStudioVersion%" == "11.0" ( + SET SET_NSDKLIBPATH=1 +) ELSE ( + CALL :fn_UnsetVariable SET_NSDKLIBPATH +) + REM REM NOTE: This is the outer loop. There should be exactly one iteration per REM platform. @@ -149,11 +159,13 @@ FOR %%P IN (%PLATFORMS%) DO ( REM future to account for additional environment variables. REM CALL :fn_UnsetVariable DevEnvDir + CALL :fn_UnsetVariable ExtensionSdkDir CALL :fn_UnsetVariable Framework35Version CALL :fn_UnsetVariable FrameworkDir CALL :fn_UnsetVariable FrameworkDir32 CALL :fn_UnsetVariable FrameworkVersion CALL :fn_UnsetVariable FrameworkVersion32 + CALL :fn_UnsetVariable FSHARPINSTALLDIR CALL :fn_UnsetVariable INCLUDE CALL :fn_UnsetVariable LIB CALL :fn_UnsetVariable LIBPATH @@ -161,6 +173,8 @@ FOR %%P IN (%PLATFORMS%) DO ( REM CALL :fn_UnsetVariable VCINSTALLDIR CALL :fn_UnsetVariable VSINSTALLDIR CALL :fn_UnsetVariable WindowsSdkDir + CALL :fn_UnsetVariable WindowsSdkDir_35 + CALL :fn_UnsetVariable WindowsSdkDir_old REM REM NOTE: Reset the PATH here to the absolute bare minimum required. @@ -208,6 +222,17 @@ FOR %%P IN (%PLATFORMS%) DO ( ) ) + REM + REM NOTE: When using MSVC 2012, the native SDK path cannot simply use + REM the "lib" sub-directory beneath the location specified in the + REM WindowsSdkDir environment variable because that location does + REM not actually contain the necessary library files for x86. + REM + IF DEFINED SET_NSDKLIBPATH ( + CALL :fn_SetVariable WindowsSdkDir NSDKLIBPATH + CALL :fn_AppendVariable NSDKLIBPATH lib\win8\um\x86 + ) + REM REM NOTE: Invoke NMAKE with the MSVC makefile to clean any stale build REM output from previous iterations of this loop and/or previous @@ -307,6 +332,19 @@ GOTO no_errors ) GOTO :EOF +:fn_AppendVariable + SET __ECHO_CMD=ECHO %%%1%% + IF DEFINED %1 ( + FOR /F "delims=" %%V IN ('%__ECHO_CMD%') DO ( + SET %1=%%V%~2 + ) + ) ELSE ( + SET %1=%~2 + ) + SET __ECHO_CMD= + CALL :fn_ResetErrorLevel + GOTO :EOF + :usage ECHO. ECHO Usage: %~nx0 ^