From: drh Date: Fri, 1 Sep 2006 17:06:20 +0000 (+0000) Subject: Automatically compute the sqlite3.def and tclsqlite3.def files when X-Git-Tag: version-3.6.10~2786 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3957781b1f42897819ba9e87b7e227a7b4d5d7bb;p=thirdparty%2Fsqlite.git 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) FossilOrigin-Name: 1f6d79266a7f8d0e909e47d9858557e3f95407db --- diff --git a/Makefile.in b/Makefile.in index 6e4a7b797d..f13555a679 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 291f5a5acd..341bd4685a 100644 --- 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 # diff --git a/manifest b/manifest index 45d2d835d4..ee9ed8cbb5 100644 --- 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 diff --git a/manifest.uuid b/manifest.uuid index 0d74b23c8d..3fafed8749 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -bedbac54db173ceb74bd78acd021209f28aa30a8 \ No newline at end of file +1f6d79266a7f8d0e909e47d9858557e3f95407db \ No newline at end of file diff --git a/mkdll.sh b/mkdll.sh index 50dd60b711..16299c2b72 100644 --- 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 ..