Modify the MSVC batch build tool to support the MSVC autoconf Makefile.
FossilOrigin-Name: 72b10e5e7d2db436c7b03cc3735a2e9d0e53ab5d
This commit is contained in:
parent
b9076ba4c9
commit
b0c99afeda
27
Makefile.msc
27
Makefile.msc
@ -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>>
|
||||
|
@ -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)
|
||||
|
18
manifest
18
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
|
||||
|
@ -1 +1 @@
|
||||
90dd6eb1fec22460473d670519d0e730bb37067d
|
||||
72b10e5e7d2db436c7b03cc3735a2e9d0e53ab5d
|
@ -22,7 +22,7 @@ REM
|
||||
REM Example:
|
||||
REM
|
||||
REM CD /D C:\dev\sqlite\core
|
||||
REM tool\build-all-msvc.bat C:\Temp
|
||||
REM CALL tool\build-all-msvc.bat C:\Temp
|
||||
REM
|
||||
REM In the example above, "C:\dev\sqlite\core" represents the root of the
|
||||
REM source tree for SQLite and "C:\Temp" represents the final destination
|
||||
@ -54,6 +54,11 @@ REM
|
||||
REM There are a few other environment variables that impact the build process
|
||||
REM when set ^(to anything^), they are:
|
||||
REM
|
||||
REM USE_AUTOCONF_MAKEFILE
|
||||
REM
|
||||
REM When set, the "autoconf" Makefile for MSVC will be used instead of the main
|
||||
REM Makefile for MSVC. It must exist at "%ROOT%\autoconf\Makefile.msc".
|
||||
REM
|
||||
REM NOCLEAN
|
||||
REM
|
||||
REM When set, the "clean" target will not be used during each build iteration.
|
||||
@ -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.
|
||||
REM
|
||||
REM NMAKE_ARGS
|
||||
REM NMAKE_ARGS_DEBUG
|
||||
REM NMAKE_ARGS_RETAIL
|
||||
REM
|
||||
REM When set, the value is expanded and passed to the NMAKE command line, after
|
||||
REM its other arguments. This is used to specify additional NMAKE options, for
|
||||
REM example:
|
||||
REM When set, these values are expanded and passed to the NMAKE command line,
|
||||
REM after its other arguments. These may be used to specify additional NMAKE
|
||||
REM options, for example:
|
||||
REM
|
||||
REM SET NMAKE_ARGS=FOR_WINRT=1
|
||||
REM SET NMAKE_ARGS_DEBUG=MEMDEBUG=1
|
||||
REM SET NMAKE_ARGS_RETAIL=WIN32HEAP=1
|
||||
REM
|
||||
REM Using the above command before running this tool will cause the compiled
|
||||
REM binaries to target the WinRT environment, which provides a subset of the
|
||||
@ -218,11 +227,17 @@ REM NOTE: If the command used to invoke NMAKE is not already set, use the
|
||||
REM default.
|
||||
REM
|
||||
IF NOT DEFINED NMAKE_CMD (
|
||||
IF DEFINED USE_AUTOCONF_MAKEFILE (
|
||||
SET NMAKE_CMD=nmake -B -f autoconf\Makefile.msc
|
||||
) ELSE (
|
||||
SET NMAKE_CMD=nmake -B -f Makefile.msc
|
||||
)
|
||||
)
|
||||
|
||||
%_VECHO% NmakeCmd = '%NMAKE_CMD%'
|
||||
%_VECHO% NmakeArgs = '%NMAKE_ARGS%'
|
||||
%_VECHO% NmakeArgsDebug = '%NMAKE_ARGS_DEBUG%'
|
||||
%_VECHO% NmakeArgsRetail = '%NMAKE_ARGS_RETAIL%'
|
||||
|
||||
REM
|
||||
REM NOTE: Setup environment variables to translate between the MSVC platform
|
||||
@ -480,6 +495,12 @@ FOR %%P IN (%PLATFORMS%) DO (
|
||||
CALL :fn_UnsetVariable MEMDEBUG
|
||||
)
|
||||
|
||||
REM
|
||||
REM NOTE: Copy the extra NMAKE arguments for this configuration into the
|
||||
REM common variable used by the actual commands.
|
||||
REM
|
||||
CALL :fn_CopyVariable NMAKE_ARGS_%%B NMAKE_ARGS_CFG
|
||||
|
||||
REM
|
||||
REM NOTE: Launch a nested command shell to perform the following steps:
|
||||
REM
|
||||
@ -586,7 +607,7 @@ FOR %%P IN (%PLATFORMS%) DO (
|
||||
REM file, etc.
|
||||
REM
|
||||
IF NOT DEFINED NOCLEAN (
|
||||
%__ECHO% %NMAKE_CMD% clean
|
||||
CALL :fn_MakeClean %%D
|
||||
|
||||
IF ERRORLEVEL 1 (
|
||||
ECHO Failed to clean for platform %%P.
|
||||
@ -609,7 +630,7 @@ FOR %%P IN (%PLATFORMS%) DO (
|
||||
REM Also, disable looking for and/or linking to the native Tcl
|
||||
REM runtime library.
|
||||
REM
|
||||
%__ECHO% %NMAKE_CMD% "%DLL_FILE_NAME%" "PLATFORM=%%D" XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%
|
||||
CALL :fn_MakeDll %%D
|
||||
|
||||
IF ERRORLEVEL 1 (
|
||||
ECHO Failed to build %%B "%DLL_FILE_NAME%" for platform %%P.
|
||||
@ -677,7 +698,7 @@ FOR %%P IN (%PLATFORMS%) DO (
|
||||
REM Also, disable looking for and/or linking to the native Tcl
|
||||
REM runtime library.
|
||||
REM
|
||||
%__ECHO% %NMAKE_CMD% "%EXE_FILE_NAME%" "PLATFORM=%%D" XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%
|
||||
CALL :fn_MakeExe %%D
|
||||
|
||||
IF ERRORLEVEL 1 (
|
||||
ECHO Failed to build %%B "%EXE_FILE_NAME%" for platform %%P.
|
||||
@ -736,6 +757,18 @@ REM NOTE: If we get to this point, we have succeeded.
|
||||
REM
|
||||
GOTO no_errors
|
||||
|
||||
:fn_MakeClean
|
||||
%__ECHO% %NMAKE_CMD% clean "PLATFORM=%1" %NMAKE_ARGS% %NMAKE_ARGS_CFG%
|
||||
GOTO :EOF
|
||||
|
||||
:fn_MakeDll
|
||||
%__ECHO% %NMAKE_CMD% "%DLL_FILE_NAME%" "PLATFORM=%1" XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS% %NMAKE_ARGS_CFG%
|
||||
GOTO :EOF
|
||||
|
||||
:fn_MakeExe
|
||||
%__ECHO% %NMAKE_CMD% "%EXE_FILE_NAME%" "PLATFORM=%1" XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS% %NMAKE_ARGS_CFG%
|
||||
GOTO :EOF
|
||||
|
||||
:fn_ShowVariable
|
||||
SETLOCAL
|
||||
SET __ECHO_CMD=ECHO %%%2%%
|
||||
|
@ -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]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user