/ Check-in [908c4c89]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Support building the Tcl bindings DLL using MSVC.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | msvcTcl
Files: files | file ages | folders
SHA3-256: 908c4c891fa7472b43d232bde7d3789105c5f5b2cfaf6652bf6d5829236933cf
User & Date: mistachkin 2019-03-22 01:25:16
Context
2019-03-22
01:26
Sync up the autoconf makefile for MSVC. check-in: ecbae90a user: mistachkin tags: msvcTcl
01:25
Support building the Tcl bindings DLL using MSVC. check-in: 908c4c89 user: mistachkin tags: msvcTcl
2019-03-21
21:18
Add an extra test for database corruption to defragmentPage(). check-in: 80e951fc user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.msc.

   315    315   !IFNDEF SQLITETCLH
   316    316   SQLITETCLH = sqlite_tcl.h
   317    317   !ENDIF
   318    318   
   319    319   !IFNDEF SQLITETCLDECLSH
   320    320   SQLITETCLDECLSH = sqlite_tclDecls.h
   321    321   !ENDIF
          322  +
          323  +# This is the name to use for the dynamic link library (DLL) containing the
          324  +# Tcl bindings for SQLite.
          325  +#
          326  +!IFNDEF SQLITE3TCLDLL
          327  +SQLITE3TCLDLL = tclsqlite3.dll
          328  +!ENDIF
   322    329   
   323    330   # These are the additional targets that the targets that integrate with the
   324    331   # Tcl library should depend on when compiling, etc.
   325    332   #
   326    333   !IFNDEF SQLITE_TCL_DEP
   327    334   !IF $(USE_STDCALL)!=0 || $(FOR_WIN10)!=0
   328    335   SQLITE_TCL_DEP = $(SQLITETCLDECLSH) $(SQLITETCLH)
................................................................................
   491    498   
   492    499   UCRTLIBPATH = $(UCRTLIBPATH:\\=\)
   493    500   
   494    501   # C compiler and options for use in building executables that
   495    502   # will run on the platform that is doing the build.
   496    503   #
   497    504   !IF $(USE_FULLWARN)!=0
   498         -BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS)
          505  +BCC = $(NCC) -nologo -W4 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
   499    506   !ELSE
   500         -BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS)
          507  +BCC = $(NCC) -nologo -W3 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
   501    508   !ENDIF
   502    509   
   503    510   # Check if assembly code listings should be generated for the source
   504    511   # code files to be compiled.
   505    512   #
   506    513   !IF $(USE_LISTINGS)!=0
   507    514   BCC = $(BCC) -FAcs
................................................................................
  1059   1066   RCC = $(RCC) -I$(ICUINCDIR)
  1060   1067   !ENDIF
  1061   1068   # <</mark>>
  1062   1069   
  1063   1070   # Command line prefixes for compiling code, compiling resources,
  1064   1071   # linking, etc.
  1065   1072   #
  1066         -LTCOMPILE = $(TCC) -Fo$@
         1073  +LTCOMPILE = $(TCC) -Fo$@ -Fd$*.pdb
  1067   1074   LTRCOMPILE = $(RCC) -r
  1068   1075   LTLIB = lib.exe
  1069   1076   LTLINK = $(TCC) -Fe$@
  1070   1077   
  1071   1078   # If requested, link to the RPCRT4 library.
  1072   1079   #
  1073   1080   !IF $(USE_RPCRT4_LIB)!=0
................................................................................
  1661   1668   # Standard options to testfixture.
  1662   1669   #
  1663   1670   TESTOPTS = --verbose=file --output=test-out.txt
  1664   1671   
  1665   1672   # Extra targets for the "all" target that require Tcl.
  1666   1673   #
  1667   1674   !IF $(NO_TCL)==0
  1668         -ALL_TCL_TARGETS = libtclsqlite3.lib
         1675  +ALL_TCL_TARGETS = $(SQLITE3TCLDLL)
  1669   1676   !ELSE
  1670   1677   ALL_TCL_TARGETS =
  1671   1678   !ENDIF
  1672   1679   # <</mark>>
  1673   1680   
  1674   1681   # This is the default Makefile target.  The objects listed here
  1675   1682   # are what get build when you type just "make" with no arguments.
................................................................................
  1693   1700   shell:	$(SQLITE3EXE)
  1694   1701   
  1695   1702   # <<mark>>
  1696   1703   libsqlite3.lib:	$(LIBOBJ)
  1697   1704   	$(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
  1698   1705   
  1699   1706   libtclsqlite3.lib:	tclsqlite.lo libsqlite3.lib
  1700         -	$(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
         1707  +	$(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
         1708  +
         1709  +tclsqlite3.def:	tclsqlite.lo
         1710  +	echo EXPORTS > tclsqlite3.def
         1711  +	dumpbin /all tclsqlite.lo \
         1712  +		| $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+/EXPORT:_?((?:Sqlite3|Tclsqlite3)_[^@]*)(?:@\d+)?$$" \1 \
         1713  +		| sort >> tclsqlite3.def
         1714  +
         1715  +pkgIndex.tcl:	$(TOP)\VERSION
         1716  +	for /F %%V in ('type "$(TOP)\VERSION"') do ( \
         1717  +		echo package ifneeded sqlite3 @version@ [list load [file join $$dir $(SQLITE3TCLDLL)] sqlite3] \
         1718  +			| $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact @version@ %%V > pkgIndex.tcl \
         1719  +	)
         1720  +
         1721  +$(SQLITE3TCLDLL):	libtclsqlite3.lib $(LIBRESOBJS) tclsqlite3.def pkgIndex.tcl
         1722  +	$(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:tclsqlite3.def /OUT:$@ libtclsqlite3.lib $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
  1701   1723   # <</mark>>
  1702   1724   
  1703   1725   $(SQLITE3DLL):	$(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
  1704   1726   	$(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
  1705   1727   
  1706   1728   # <<block2>>
  1707   1729   sqlite3.def:	libsqlite3.lib
................................................................................
  1833   1855   	$(LTCOMPILE) $(CORE_COMPILE_OPTS) -c opcodes.c
  1834   1856   # <</mark>>
  1835   1857   
  1836   1858   # Rule to build the Win32 resources object file.
  1837   1859   #
  1838   1860   !IF $(USE_RC)!=0
  1839   1861   # <<block1>>
  1840         -$(LIBRESOBJS):	$(TOP)\src\sqlite3.rc $(SQLITE3H)
         1862  +$(LIBRESOBJS):	$(TOP)\src\sqlite3.rc $(SQLITE3H) $(TOP)\VERSION
  1841   1863   	echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
  1842   1864   	for /F %%V in ('type "$(TOP)\VERSION"') do ( \
  1843   1865   		echo #define SQLITE_RESOURCE_VERSION %%V \
  1844   1866   			| $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
  1845   1867   	)
  1846   1868   	echo #endif >> sqlite3rc.h
  1847   1869   	$(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
................................................................................
  2510   2532   # <</mark>>
  2511   2533   
  2512   2534   clean:
  2513   2535   	del /Q *.exp *.lo *.ilk *.lib *.obj *.ncb *.pdb *.sdf *.suo 2>NUL
  2514   2536   	del /Q *.bsc *.def *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL
  2515   2537   	del /Q $(SQLITE3EXE) $(SQLITE3DLL) Replace.exe 2>NUL
  2516   2538   # <<mark>>
         2539  +	del /Q $(SQLITE3TCLDLL) pkgIndex.tcl 2>NUL
  2517   2540   	del /Q opcodes.c opcodes.h 2>NUL
  2518   2541   	del /Q lemon.* lempar.c parse.* 2>NUL
  2519   2542   	del /Q mksourceid.* mkkeywordhash.* keywordhash.h 2>NUL
  2520   2543   	del /Q notasharedlib.* 2>NUL
  2521   2544   	-rmdir /Q/S .deps 2>NUL
  2522   2545   	-rmdir /Q/S .libs 2>NUL
  2523   2546   	-rmdir /Q/S tsrc 2>NUL