/ Check-in [1f6d7926]
Login

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

Overview
Comment:Automatically compute the sqlite3.def and tclsqlite3.def files when building windows DLLs. This will (hopefully) keep the .def files in perfect synchronization with the DLLs. Ticket #1951. (CVS 3381)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:1f6d79266a7f8d0e909e47d9858557e3f95407db
User & Date: drh 2006-09-01 17:06:20
Context
2006-09-02
00:23
Miscellaneous restructuring and cleanup based on suggestions from shess. (CVS 3382) check-in: e98b0cf2 user: adamd tags: trunk
2006-09-01
17:06
Automatically compute the sqlite3.def and tclsqlite3.def files when building windows DLLs. This will (hopefully) keep the .def files in perfect synchronization with the DLLs. Ticket #1951. (CVS 3381) check-in: 1f6d7926 user: drh tags: trunk
15:49
Remove use of the "clock" command in the test suite so that the tests will run in Tcl8.5. Ticket #1445. (CVS 3380) check-in: bedbac54 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.in.

   278    278   #
   279    279   target_source:	$(SRC) parse.c opcodes.c keywordhash.h $(VDBEHDR) 
   280    280   	rm -rf tsrc
   281    281   	mkdir -p tsrc
   282    282   	cp $(SRC) $(VDBEHDR) tsrc
   283    283   	rm tsrc/sqlite.h.in tsrc/parse.y
   284    284   	cp parse.c opcodes.c keywordhash.h tsrc
   285         -	cp $(TOP)/sqlite3.def tsrc
   286    285   
   287    286   # Rules to build the LEMON compiler generator
   288    287   #
   289    288   lemon$(BEXE):	$(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
   290    289   	$(BCC) -o lemon $(TOP)/tool/lemon.c
   291    290   	cp $(TOP)/tool/lempar.c .
   292    291   
................................................................................
   664    663   	rm -f $(PUBLISH)
   665    664   	rm -f *.da *.bb *.bbg gmon.out
   666    665   	rm -f testfixture$(TEXE) test.db
   667    666   	rm -rf doc
   668    667   	rm -f common.tcl
   669    668   	rm -f sqlite3.dll sqlite3.lib
   670    669   
   671         -#
   672         -# Windows section; all this funky .dll stuff ;-)
   673         -#
   674         -dll: sqlite3.dll
   675         -
   676         -REAL_LIBOBJ = $(LIBOBJ:%.lo=.libs/%.o)
   677         -
   678         -sqlite3.dll: $(LIBOBJ) $(TOP)/sqlite3.def
   679         -	dllwrap --dllname sqlite3.dll --def $(TOP)/sqlite3.def $(REAL_LIBOBJ)
   680         -	strip sqlite3.dll
   681         -
   682         -#target for dll import libraries
   683         -implib: sqlite3.lib 
   684         -
   685         -#make Borland C++ and/or Microsoft VC import library for the dll
   686         -#   ignore any errors (usually due to missing programs)
   687         -sqlite3.lib: sqlite3.dll
   688         -	-impdef -a sqlite3.def sqlite3.dll
   689         -	-implib sqlite3.lib sqlite3.def
   690         -	-lib /machine:i386 /def:$(TOP)/sqlite3.def 
   691         -
   692    670   distclean:	clean
   693    671   	rm -f config.log config.status libtool Makefile config.h

Changes to main.mk.

   203    203   #
   204    204   target_source:	$(SRC) $(VDBEHDR) opcodes.c keywordhash.h
   205    205   	rm -rf tsrc
   206    206   	mkdir tsrc
   207    207   	cp $(SRC) $(VDBEHDR) tsrc
   208    208   	rm tsrc/sqlite.h.in tsrc/parse.y
   209    209   	cp parse.c opcodes.c keywordhash.h tsrc
   210         -	cp $(TOP)/sqlite3.def tsrc
   211    210   
   212    211   # Rules to build the LEMON compiler generator
   213    212   #
   214    213   lemon:	$(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
   215    214   	$(BCC) -o lemon $(TOP)/tool/lemon.c
   216    215   	cp $(TOP)/tool/lempar.c .
   217    216   

Changes to mkdll.sh.

     9      9   make target_source
    10     10   cd tsrc
    11     11   PATH=$PATH:/opt/mingw/bin
    12     12   TCLDIR=/home/drh/tcltk/846/win/846win
    13     13   TCLSTUBLIB=$TCLDIR/libtcl84stub.a
    14     14   OPTS='-DUSE_TCL_STUBS=1 -DNDEBUG=1 -DTHREADSAFE=1 -DBUILD_sqlite=1'
    15     15   CC="i386-mingw32msvc-gcc -O2 $OPTS -I. -I$TCLDIR"
           16  +NM="i386-mingw32msvc-nm"
    16     17   rm shell.c
    17     18   for i in *.c; do
    18     19     CMD="$CC -c $i"
    19     20     echo $CMD
    20     21     $CMD
    21     22   done
    22     23   echo 'EXPORTS' >tclsqlite3.def
    23         -echo 'Tclsqlite3_Init' >>tclsqlite3.def
    24         -echo 'Tclsqlite_Init' >>tclsqlite3.def
    25         -echo 'Sqlite3_Init' >>tclsqlite3.def
    26         -echo 'Sqlite_Init' >>tclsqlite3.def
    27     24   i386-mingw32msvc-dllwrap \
    28     25        --def tclsqlite3.def -v --export-all \
    29     26        --driver-name i386-mingw32msvc-gcc \
    30     27        --dlltool-name i386-mingw32msvc-dlltool \
    31     28        --as i386-mingw32msvc-as \
    32     29        --target i386-mingw32 \
    33     30        -dllname tclsqlite3.dll -lmsvcrt *.o $TCLSTUBLIB
    34     31   #i386-mingw32msvc-strip tclsqlite3.dll
           32  +$NM tclsqlite3.dll | grep ' T ' >temp1
           33  +grep '_Init$' temp1 >temp2
           34  +grep '_SafeInit$' temp1 >>temp2
           35  +grep ' T _sqlite3_' temp1 >>temp2
           36  +echo 'EXPORTS' >tclsqlite3.def
           37  +sed 's/^.* T _//' temp2 | sort | uniq >>tclsqlite3.def
    35     38   rm tclsqlite.o
    36     39   i386-mingw32msvc-dllwrap \
    37     40        --def sqlite3.def -v --export-all \
    38     41        --driver-name i386-mingw32msvc-gcc \
    39     42        --dlltool-name i386-mingw32msvc-dlltool \
    40     43        --as i386-mingw32msvc-as \
    41     44        --target i386-mingw32 \
    42     45        -dllname sqlite3.dll -lmsvcrt *.o
    43     46   #i386-mingw32msvc-strip sqlite3.dll
           47  +$NM sqlite3.dll | grep ' T ' >temp1
           48  +echo 'EXPORTS' >sqlite3.def
           49  +grep ' _sqlite3_' temp1 | sed 's/^.* _//' >>sqlite3.def
    44     50   cd ..