]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Automatically compute the sqlite3.def and tclsqlite3.def files when
authordrh <drh@noemail.net>
Fri, 1 Sep 2006 17:06:20 +0000 (17:06 +0000)
committerdrh <drh@noemail.net>
Fri, 1 Sep 2006 17:06:20 +0000 (17:06 +0000)
building windows DLLs.  This will (hopefully) keep the .def files in
perfect synchronization with the DLLs.  Ticket #1951. (CVS 3381)

FossilOrigin-Name: 1f6d79266a7f8d0e909e47d9858557e3f95407db

Makefile.in
main.mk
manifest
manifest.uuid
mkdll.sh

index 6e4a7b797da32a877d6e5550690dd786704cd025..f13555a6795ffcd8c19975f6f79c4411ab6f6ff3 100644 (file)
@@ -282,7 +282,6 @@ target_source:      $(SRC) parse.c opcodes.c keywordhash.h $(VDBEHDR)
        cp $(SRC) $(VDBEHDR) tsrc
        rm tsrc/sqlite.h.in tsrc/parse.y
        cp parse.c opcodes.c keywordhash.h tsrc
-       cp $(TOP)/sqlite3.def tsrc
 
 # Rules to build the LEMON compiler generator
 #
@@ -668,26 +667,5 @@ clean:
        rm -f common.tcl
        rm -f sqlite3.dll sqlite3.lib
 
-#
-# Windows section; all this funky .dll stuff ;-)
-#
-dll: sqlite3.dll
-
-REAL_LIBOBJ = $(LIBOBJ:%.lo=.libs/%.o)
-
-sqlite3.dll: $(LIBOBJ) $(TOP)/sqlite3.def
-       dllwrap --dllname sqlite3.dll --def $(TOP)/sqlite3.def $(REAL_LIBOBJ)
-       strip sqlite3.dll
-
-#target for dll import libraries
-implib: sqlite3.lib 
-
-#make Borland C++ and/or Microsoft VC import library for the dll
-#   ignore any errors (usually due to missing programs)
-sqlite3.lib: sqlite3.dll
-       -impdef -a sqlite3.def sqlite3.dll
-       -implib sqlite3.lib sqlite3.def
-       -lib /machine:i386 /def:$(TOP)/sqlite3.def 
-
 distclean:     clean
        rm -f config.log config.status libtool Makefile config.h
diff --git a/main.mk b/main.mk
index 291f5a5acd17792fd62c9085e9feddcedd5a722f..341bd4685ac4e7c1863e2f8dba9703b163eb7330 100644 (file)
--- a/main.mk
+++ b/main.mk
@@ -207,7 +207,6 @@ target_source:      $(SRC) $(VDBEHDR) opcodes.c keywordhash.h
        cp $(SRC) $(VDBEHDR) tsrc
        rm tsrc/sqlite.h.in tsrc/parse.y
        cp parse.c opcodes.c keywordhash.h tsrc
-       cp $(TOP)/sqlite3.def tsrc
 
 # Rules to build the LEMON compiler generator
 #
index 45d2d835d4ebdddd9b657b99ae040b829af70df4..ee9ed8cbb5099e5384d05f5de66836742d527491 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,6 +1,6 @@
-C Remove\suse\sof\sthe\s"clock"\scommand\sin\sthe\stest\ssuite\sso\sthat\sthe\stests\nwill\srun\sin\sTcl8.5.\s\sTicket\s#1445.\s(CVS\s3380)
-D 2006-09-01T15:49:06
-F Makefile.in 8e7f9ecebab2c6e0f3db20ff129a8f9405ab64f8
+C Automatically\scompute\sthe\ssqlite3.def\sand\stclsqlite3.def\sfiles\swhen\nbuilding\swindows\sDLLs.\s\sThis\swill\s(hopefully)\skeep\sthe\s.def\sfiles\sin\nperfect\ssynchronization\swith\sthe\sDLLs.\s\sTicket\s#1951.\s(CVS\s3381)
+D 2006-09-01T17:06:20
+F Makefile.in 659b63368cfbb95a224c9d2f2a9897802d96a4ea
 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
 F VERSION ef6abd4b2095b0f378b428ed251e16f0213fcf3f
@@ -33,8 +33,8 @@ F ext/fts1/simple_tokenizer.c 1844d72f7194c3fd3d7e4173053911bf0661b70d
 F ext/fts1/tokenizer.h 0c53421b832366d20d720d21ea3e1f6e66a36ef9
 F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895
 F ltmain.sh f6b283068efa69f06eb8aa1fe4bddfdbdeb35826
-F main.mk 22a0c92f24ffc377c41ac9d7d63ae3cbb813e532
-F mkdll.sh 919df5efde876194e3102c6ebc60657d38949909
+F main.mk d37d13489426c7a5277cd5944e7487120f9b4ece
+F mkdll.sh 7e2324f53504fa89121f10da79cbc709fdd7c596
 F mkopcodec.awk bd46ad001c98dfbab07b1713cb8e692fa0e5415d
 F mkopcodeh.awk cde995d269aa06c94adbf6455bea0acedb913fa5
 F mkso.sh 125868def279650a07d3f0f5e8476fecf99613fd
@@ -395,7 +395,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 5844db1aa9c23a005c88104b084f68afb21891c7
-R 765da857e431aa5621e7d9277521435a
+P bedbac54db173ceb74bd78acd021209f28aa30a8
+R 95867c71124f856bb75de299ad025124
 U drh
-Z 7b02ae26a0272b8886b39369de36f0d1
+Z 2f626a5cf47e2b61edd21d8619c7423b
index 0d74b23c8d26a6981c0d1ed1fdd58c9f931b2222..3fafed8749a58e724d5e379c4731d7c5682a491f 100644 (file)
@@ -1 +1 @@
-bedbac54db173ceb74bd78acd021209f28aa30a8
\ No newline at end of file
+1f6d79266a7f8d0e909e47d9858557e3f95407db
\ No newline at end of file
index 50dd60b711873d24b8a5ac6cd4398dfa0851607f..16299c2b72dedc33f49fccff9b72e3fd2bdfe3d0 100644 (file)
--- a/mkdll.sh
+++ b/mkdll.sh
@@ -13,6 +13,7 @@ TCLDIR=/home/drh/tcltk/846/win/846win
 TCLSTUBLIB=$TCLDIR/libtcl84stub.a
 OPTS='-DUSE_TCL_STUBS=1 -DNDEBUG=1 -DTHREADSAFE=1 -DBUILD_sqlite=1'
 CC="i386-mingw32msvc-gcc -O2 $OPTS -I. -I$TCLDIR"
+NM="i386-mingw32msvc-nm"
 rm shell.c
 for i in *.c; do
   CMD="$CC -c $i"
@@ -20,10 +21,6 @@ for i in *.c; do
   $CMD
 done
 echo 'EXPORTS' >tclsqlite3.def
-echo 'Tclsqlite3_Init' >>tclsqlite3.def
-echo 'Tclsqlite_Init' >>tclsqlite3.def
-echo 'Sqlite3_Init' >>tclsqlite3.def
-echo 'Sqlite_Init' >>tclsqlite3.def
 i386-mingw32msvc-dllwrap \
      --def tclsqlite3.def -v --export-all \
      --driver-name i386-mingw32msvc-gcc \
@@ -32,6 +29,12 @@ i386-mingw32msvc-dllwrap \
      --target i386-mingw32 \
      -dllname tclsqlite3.dll -lmsvcrt *.o $TCLSTUBLIB
 #i386-mingw32msvc-strip tclsqlite3.dll
+$NM tclsqlite3.dll | grep ' T ' >temp1
+grep '_Init$' temp1 >temp2
+grep '_SafeInit$' temp1 >>temp2
+grep ' T _sqlite3_' temp1 >>temp2
+echo 'EXPORTS' >tclsqlite3.def
+sed 's/^.* T _//' temp2 | sort | uniq >>tclsqlite3.def
 rm tclsqlite.o
 i386-mingw32msvc-dllwrap \
      --def sqlite3.def -v --export-all \
@@ -41,4 +44,7 @@ i386-mingw32msvc-dllwrap \
      --target i386-mingw32 \
      -dllname sqlite3.dll -lmsvcrt *.o
 #i386-mingw32msvc-strip sqlite3.dll
+$NM sqlite3.dll | grep ' T ' >temp1
+echo 'EXPORTS' >sqlite3.def
+grep ' _sqlite3_' temp1 | sed 's/^.* _//' >>sqlite3.def
 cd ..