]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/win32/patches/sqlite_msc.patch
Restore win32 dir from Branch-5.2 and update it
[bacula/bacula] / bacula / src / win32 / patches / sqlite_msc.patch
1 --- /dev/null   1969-12-31 16:00:00.000000000 -0800
2 +++ Makefile.msvc       2006-11-23 12:38:22.724805900 -0800
3 @@ -0,0 +1,136 @@
4 +#!/usr/make
5 +#
6 +# Makefile for SQLITE
7 +#
8 +# This is a template makefile for SQLite.  Most people prefer to
9 +# use the autoconf generated "configure" script to generate the
10 +# makefile automatically.  But that does not work for everybody
11 +# and in every situation.  If you are having problems with the
12 +# "configure" script, you might want to try this makefile as an
13 +# alternative.  Create a copy of this file, edit the parameters
14 +# below and type "make".
15 +#
16 +
17 +#### The toplevel directory of the source tree.  This is the directory
18 +#    that contains this "Makefile.in" and the "configure.in" script.
19 +#
20 +TOP = ..
21 +
22 +#### C Compiler and options for use in building executables that
23 +#    will run on the platform that is doing the build.
24 +#
25 +BCC = cl /Zi /Ox /Gy /MD
26 +#BCC = /opt/ancic/bin/c89 -0
27 +
28 +#### If the target operating system supports the "usleep()" system
29 +#    call, then define the HAVE_USLEEP macro for all C modules.
30 +#
31 +USLEEP = 
32 +#USLEEP = -DHAVE_USLEEP=1
33 +
34 +#### If you want the SQLite library to be safe for use within a 
35 +#    multi-threaded program, then define the following macro
36 +#    appropriately:
37 +#
38 +THREADSAFE = -DTHREADSAFE=1
39 +#THREADSAFE = -DTHREADSAFE=0
40 +
41 +#### Specify any extra linker options needed to make the library
42 +#    thread safe
43 +#
44 +#THREADLIB = -lpthread
45 +THREADLIB = 
46 +
47 +#### Specify any extra libraries needed to access required functions.
48 +#
49 +#TLIBS = -lrt    # fdatasync on Solaris 8
50 +TLIBS = 
51 +
52 +#### Leave SQLITE_DEBUG undefined for maximum speed.  Use SQLITE_DEBUG=1
53 +#    to check for memory leaks.  Use SQLITE_DEBUG=2 to print a log of all
54 +#    malloc()s and free()s in order to track down memory leaks.
55 +#    
56 +#    SQLite uses some expensive assert() statements in the inner loop.
57 +#    You can make the library go almost twice as fast if you compile
58 +#    with -DNDEBUG=1
59 +#
60 +#OPTS = -DSQLITE_DEBUG=2
61 +#OPTS = -DSQLITE_DEBUG=1
62 +#OPTS = 
63 +OPTS = -DNDEBUG=1 -D_CRT_SECURE_NO_DEPRECATE
64 +#OPTS += -DHAVE_FDATASYNC=1
65 +
66 +#### The suffix to add to executable files.  ".exe" for windows.
67 +#    Nothing for unix.
68 +#
69 +EXE = .exe
70 +#EXE =
71 +
72 +#### C Compile and options for use in building executables that 
73 +#    will run on the target platform.  This is usually the same
74 +#    as BCC, unless you are cross-compiling.
75 +#
76 +#TCC = gcc -O6
77 +#TCC = gcc -g -O0 -Wall
78 +#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
79 +#TCC = /opt/mingw/bin/i386-mingw32-gcc -O6
80 +#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive
81 +TCC = cl /Zi /Ox /Gy /MD
82 +
83 +#### Tools used to build a static library.
84 +#
85 +AR = lib
86 +#AR = /opt/mingw/bin/i386-mingw32-ar cr
87 +#RANLIB = ranlib
88 +#RANLIB = /opt/mingw/bin/i386-mingw32-ranlib
89 +
90 +#MKSHLIB = gcc -shared
91 +#SO = so
92 +#SHPREFIX = lib
93 +SO = dll
94 +SHPREFIX =
95 +
96 +#### Extra compiler options needed for programs that use the TCL library.
97 +#
98 +#TCL_FLAGS =
99 +#TCL_FLAGS = -DSTATIC_BUILD=1
100 +#TCL_FLAGS = -I/home/drh/tcltk/8.4linux
101 +#TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1
102 +#TCL_FLAGS = -I/home/drh/tcltk/8.3hpux
103 +
104 +#### Linker options needed to link against the TCL library.
105 +#
106 +#LIBTCL = -ltcl -lm -ldl
107 +#LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl
108 +#LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt
109 +#LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc
110 +
111 +#### Compiler options needed for programs that use the readline() library.
112 +#
113 +READLINE_FLAGS =
114 +#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline
115 +
116 +#### Linker options needed by programs using readline() must link against.
117 +#
118 +LIBREADLINE =
119 +#LIBREADLINE = -static -lreadline -ltermcap
120 +
121 +#### Should the database engine assume text is coded as UTF-8 or iso8859?
122 +#
123 +ENCODING  = UTF8
124 +#ENCODING = ISO8859
125 +
126 +
127 +#### Which "awk" program provides nawk compatibilty
128 +#
129 +NAWK = nawk
130 +# NAWK = awk
131 +
132 +#### Where to install
133 +BINDIR = /usr/bin
134 +LIBDIR = /usr/lib
135 +INCDIR = /usr/include
136 +
137 +# You should not have to change anything below this line
138 +###############################################################################
139 +include ../main.mk.msvc
140 --- /dev/null   1969-12-31 16:00:00.000000000 -0800
141 +++ main.mk.msvc        2006-11-23 12:38:22.709180800 -0800
142 @@ -0,0 +1,619 @@
143 +###############################################################################
144 +# The following macros should be defined before this script is
145 +# invoked:
146 +#
147 +# TOP              The toplevel directory of the source tree.  This is the
148 +#                  directory that contains this "Makefile.in" and the
149 +#                  "configure.in" script.
150 +#
151 +# BCC              C Compiler and options for use in building executables that
152 +#                  will run on the platform that is doing the build.
153 +#
154 +# USLEEP           If the target operating system supports the "usleep()" system
155 +#                  call, then define the HAVE_USLEEP macro for all C modules.
156 +#
157 +# THREADSAFE       If you want the SQLite library to be safe for use within a 
158 +#                  multi-threaded program, then define the following macro
159 +#                  appropriately:
160 +#
161 +# THREADLIB        Specify any extra linker options needed to make the library
162 +#                  thread safe
163 +#
164 +# OPTS             Extra compiler command-line options.
165 +#
166 +# EXE              The suffix to add to executable files.  ".exe" for windows
167 +#                  and "" for Unix.
168 +#
169 +# TCC              C Compiler and options for use in building executables that 
170 +#                  will run on the target platform.  This is usually the same
171 +#                  as BCC, unless you are cross-compiling.
172 +#
173 +# AR               Tools used to build a static library.
174 +# RANLIB
175 +#
176 +# TCL_FLAGS        Extra compiler options needed for programs that use the
177 +#                  TCL library.
178 +#
179 +# LIBTCL           Linker options needed to link against the TCL library.
180 +#
181 +# READLINE_FLAGS   Compiler options needed for programs that use the
182 +#                  readline() library.
183 +#
184 +# LIBREADLINE      Linker options needed by programs using readline() must
185 +#                  link against.
186 +#
187 +# NAWK             Nawk compatible awk program.  Older (obsolete?) solaris
188 +#                  systems need this to avoid using the original AT&T AWK.
189 +#
190 +# Once the macros above are defined, the rest of this make script will
191 +# build the SQLite library and testing tools.
192 +################################################################################
193 +
194 +# This is how we compile
195 +#
196 +TCCX = $(TCC) $(OPTS) $(THREADSAFE) $(USLEEP) -I. -I$(TOP)/src
197 +
198 +# Object files for the SQLite library.
199 +#
200 +LIBOBJ = alter.obj analyze.obj attach.obj auth.obj btree.obj build.obj \
201 +         callback.obj complete.obj date.obj delete.obj \
202 +         expr.obj func.obj hash.obj insert.obj loadext.obj \
203 +         main.obj opcodes.obj os.obj os_os2.obj os_unix.obj os_win.obj \
204 +         pager.obj parse.obj pragma.obj prepare.obj printf.obj random.obj \
205 +         select.obj table.obj tokenize.obj trigger.obj \
206 +         update.obj util.obj vacuum.obj \
207 +         vdbe.obj vdbeapi.obj vdbeaux.obj vdbefifo.obj vdbemem.obj \
208 +         where.obj utf.obj legacy.obj vtab.obj
209 +#        tclsqlite.obj 
210 +
211 +#
212 +# All of the source code files.
213 +#
214 +SRC = \
215 +  $(TOP)/src/alter.c \
216 +  $(TOP)/src/analyze.c \
217 +  $(TOP)/src/attach.c \
218 +  $(TOP)/src/auth.c \
219 +  $(TOP)/src/btree.c \
220 +  $(TOP)/src/btree.h \
221 +  $(TOP)/src/build.c \
222 +  $(TOP)/src/callback.c \
223 +  $(TOP)/src/complete.c \
224 +  $(TOP)/src/date.c \
225 +  $(TOP)/src/delete.c \
226 +  $(TOP)/src/expr.c \
227 +  $(TOP)/src/func.c \
228 +  $(TOP)/src/hash.c \
229 +  $(TOP)/src/hash.h \
230 +  $(TOP)/src/insert.c \
231 +  $(TOP)/src/legacy.c \
232 +  $(TOP)/src/loadext.c \
233 +  $(TOP)/src/main.c \
234 +  $(TOP)/src/os.c \
235 +  $(TOP)/src/os_os2.c \
236 +  $(TOP)/src/os_unix.c \
237 +  $(TOP)/src/os_win.c \
238 +  $(TOP)/src/pager.c \
239 +  $(TOP)/src/pager.h \
240 +  $(TOP)/src/parse.y \
241 +  $(TOP)/src/pragma.c \
242 +  $(TOP)/src/prepare.c \
243 +  $(TOP)/src/printf.c \
244 +  $(TOP)/src/random.c \
245 +  $(TOP)/src/select.c \
246 +  $(TOP)/src/shell.c \
247 +  $(TOP)/src/sqlite.h.in \
248 +  $(TOP)/src/sqliteInt.h \
249 +  $(TOP)/src/table.c \
250 +  $(TOP)/src/tclsqlite.c \
251 +  $(TOP)/src/tokenize.c \
252 +  $(TOP)/src/trigger.c \
253 +  $(TOP)/src/utf.c \
254 +  $(TOP)/src/update.c \
255 +  $(TOP)/src/util.c \
256 +  $(TOP)/src/vacuum.c \
257 +  $(TOP)/src/vdbe.c \
258 +  $(TOP)/src/vdbe.h \
259 +  $(TOP)/src/vdbeapi.c \
260 +  $(TOP)/src/vdbeaux.c \
261 +  $(TOP)/src/vdbefifo.c \
262 +  $(TOP)/src/vdbemem.c \
263 +  $(TOP)/src/vdbeInt.h \
264 +  $(TOP)/src/vtab.c \
265 +  $(TOP)/src/where.c
266 +
267 +# Source code for extensions
268 +#
269 +SRC = \
270 +  $(TOP)/ext/fts1/fts1.c \
271 +  $(TOP)/ext/fts1/fts1.h \
272 +  $(TOP)/ext/fts1/fts1_hash.c \
273 +  $(TOP)/ext/fts1/fts1_hash.h \
274 +  $(TOP)/ext/fts1/fts1_porter.c \
275 +  $(TOP)/ext/fts1/fts1_tokenizer.h \
276 +  $(TOP)/ext/fts1/fts1_tokenizer1.c
277 +
278 +
279 +# Source code to the test files.
280 +#
281 +TESTSRC = \
282 +  $(TOP)/src/btree.c \
283 +  $(TOP)/src/date.c \
284 +  $(TOP)/src/func.c \
285 +  $(TOP)/src/main.c \
286 +  $(TOP)/src/os.c \
287 +  $(TOP)/src/os_os2.c \
288 +  $(TOP)/src/os_unix.c \
289 +  $(TOP)/src/os_win.c \
290 +  $(TOP)/src/pager.c \
291 +  $(TOP)/src/pragma.c \
292 +  $(TOP)/src/printf.c \
293 +  $(TOP)/src/test1.c \
294 +  $(TOP)/src/test2.c \
295 +  $(TOP)/src/test3.c \
296 +  $(TOP)/src/test4.c \
297 +  $(TOP)/src/test5.c \
298 +  $(TOP)/src/test6.c \
299 +  $(TOP)/src/test7.c \
300 +  $(TOP)/src/test8.c \
301 +  $(TOP)/src/test_autoext.c \
302 +  $(TOP)/src/test_async.c \
303 +  $(TOP)/src/test_md5.c \
304 +  $(TOP)/src/test_schema.c \
305 +  $(TOP)/src/test_server.c \
306 +  $(TOP)/src/test_tclvar.c \
307 +  $(TOP)/src/utf.c \
308 +  $(TOP)/src/util.c \
309 +  $(TOP)/src/vdbe.c \
310 +  $(TOP)/src/vdbeaux.c \
311 +  $(TOP)/src/where.c
312 +
313 +# Header files used by all library source files.
314 +#
315 +HDR = \
316 +   sqlite3.h  \
317 +   $(TOP)/src/btree.h \
318 +   $(TOP)/src/hash.h \
319 +   opcodes.h \
320 +   $(TOP)/src/os.h \
321 +   $(TOP)/src/os_common.h \
322 +   $(TOP)/src/sqlite3ext.h \
323 +   $(TOP)/src/sqliteInt.h  \
324 +   $(TOP)/src/vdbe.h \
325 +   parse.h
326 +
327 +# Header files used by extensions
328 +#
329 +HDR = \
330 +  $(TOP)/ext/fts1/fts1.h \
331 +  $(TOP)/ext/fts1/fts1_hash.h \
332 +  $(TOP)/ext/fts1/fts1_tokenizer.h
333 +
334 +
335 +# Header files used by the VDBE submodule
336 +#
337 +VDBEHDR = \
338 +   $(HDR) \
339 +   $(TOP)/src/vdbeInt.h
340 +
341 +# This is the default Makefile target.  The objects listed here
342 +# are what get build when you type just "make" with no arguments.
343 +#
344 +all:   sqlite3.h parse.h opcodes.h sqlite3.lib sqlite3$(EXE)
345 +
346 +# Generate the file "last_change" which contains the date of change
347 +# of the most recently modified source code file
348 +#
349 +last_change:   $(SRC)
350 +       cat $(SRC) | grep '$Id: ' | sort -k 5 | tail -1 \
351 +          | $(NAWK) '{print $5,$6}' >last_change
352 +
353 +sqlite3.lib:   $(LIBOBJ)
354 +       $(AR) /out:sqlite3.lib $(LIBOBJ)
355 +
356 +sqlite3$(EXE): $(TOP)/src/shell.c sqlite3.lib sqlite3.h
357 +       $(TCCX) $(READLINE_FLAGS) /Fesqlite3$(EXE) $(TOP)/src/shell.c \
358 +               sqlite3.lib $(LIBREADLINE) $(TLIBS) $(THREADLIB)
359 +
360 +objects: $(LIBOBJ_ORIG)
361 +
362 +# This target creates a directory named "tsrc" and fills it with
363 +# copies of all of the C source code and header files needed to
364 +# build on the target system.  Some of the C source code and header
365 +# files are automatically generated.  This target takes care of
366 +# all that automatic generation.
367 +#
368 +target_source: $(SRC) $(VDBEHDR) opcodes.c keywordhash.h
369 +       rd /s /q tsrc
370 +       mkdir tsrc
371 +       copy $(SRC) $(VDBEHDR) tsrc
372 +       del tsrc\sqlite.h.in tsrc\parse.y
373 +       copy parse.c opcodes.c keywordhash.h tsrc
374 +
375 +# Rules to build the LEMON compiler generator
376 +#
377 +lemon: $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
378 +       $(BCC) /Felemon $(OPTS) $(TOP)/tool/lemon.c
379 +       copy $(TOP)\tool\lempar.c .
380 +
381 +# Rules to build individual files
382 +#
383 +alter.obj:     $(TOP)/src/alter.c $(HDR)
384 +       $(TCCX) -c $(TOP)/src/alter.c
385 +
386 +analyze.obj:   $(TOP)/src/analyze.c $(HDR)
387 +       $(TCCX) -c $(TOP)/src/analyze.c
388 +
389 +attach.obj:    $(TOP)/src/attach.c $(HDR)
390 +       $(TCCX) -c $(TOP)/src/attach.c
391 +
392 +auth.obj:      $(TOP)/src/auth.c $(HDR)
393 +       $(TCCX) -c $(TOP)/src/auth.c
394 +
395 +btree.obj:     $(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h
396 +       $(TCCX) -c $(TOP)/src/btree.c
397 +
398 +build.obj:     $(TOP)/src/build.c $(HDR)
399 +       $(TCCX) -c $(TOP)/src/build.c
400 +
401 +callback.obj:  $(TOP)/src/callback.c $(HDR)
402 +       $(TCCX) -c $(TOP)/src/callback.c
403 +
404 +complete.obj:  $(TOP)/src/complete.c $(HDR)
405 +       $(TCCX) -c $(TOP)/src/complete.c
406 +
407 +date.obj:      $(TOP)/src/date.c $(HDR)
408 +       $(TCCX) -c $(TOP)/src/date.c
409 +
410 +delete.obj:    $(TOP)/src/delete.c $(HDR)
411 +       $(TCCX) -c $(TOP)/src/delete.c
412 +
413 +expr.obj:      $(TOP)/src/expr.c $(HDR)
414 +       $(TCCX) -c $(TOP)/src/expr.c
415 +
416 +func.obj:      $(TOP)/src/func.c $(HDR)
417 +       $(TCCX) -c $(TOP)/src/func.c
418 +
419 +hash.obj:      $(TOP)/src/hash.c $(HDR)
420 +       $(TCCX) -c $(TOP)/src/hash.c
421 +
422 +insert.obj:    $(TOP)/src/insert.c $(HDR)
423 +       $(TCCX) -c $(TOP)/src/insert.c
424 +
425 +legacy.obj:    $(TOP)/src/legacy.c $(HDR)
426 +       $(TCCX) -c $(TOP)/src/legacy.c
427 +
428 +loadext.obj:   $(TOP)/src/loadext.c $(HDR)
429 +       $(TCCX) -c $(TOP)/src/loadext.c
430 +
431 +main.obj:      $(TOP)/src/main.c $(HDR)
432 +       $(TCCX) -c $(TOP)/src/main.c
433 +
434 +pager.obj:     $(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h
435 +       $(TCCX) -c $(TOP)/src/pager.c
436 +
437 +opcodes.obj:   opcodes.c
438 +       $(TCCX) -c opcodes.c
439 +
440 +opcodes.c:     opcodes.h $(TOP)/mkopcodec.awk
441 +       sort -n -b -k 3 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c
442 +
443 +opcodes.h:     parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
444 +       copy parse.h+$(TOP)\src\vdbe.c input.tmp
445 +       $(NAWK) -f $(TOP)/mkopcodeh.awk <input.tmp >opcodes.h
446 +       del input.tmp
447 +
448 +os.obj:        $(TOP)/src/os.c $(HDR)
449 +       $(TCCX) -c $(TOP)/src/os.c
450 +
451 +os_os2.obj:    $(TOP)/src/os_os2.c $(HDR)
452 +       $(TCCX) -c $(TOP)/src/os_os2.c
453 +
454 +os_unix.obj:   $(TOP)/src/os_unix.c $(HDR)
455 +       $(TCCX) -c $(TOP)/src/os_unix.c
456 +
457 +os_win.obj:    $(TOP)/src/os_win.c $(HDR)
458 +       $(TCCX) -c $(TOP)/src/os_win.c
459 +
460 +parse.obj:     parse.c $(HDR)
461 +       $(TCCX) -c parse.c
462 +
463 +#parse.h:      parse.c
464 +
465 +parse.c parse.h:       $(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk
466 +       copy $(TOP)\src\parse.y .
467 +       lemon $(OPTS) parse.y
468 +       ren parse.h parse.h.temp
469 +       nawk -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
470 +       del parse.h.temp
471 +
472 +pragma.obj:    $(TOP)/src/pragma.c $(HDR)
473 +       $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/pragma.c
474 +
475 +prepare.obj:   $(TOP)/src/prepare.c $(HDR)
476 +       $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/prepare.c
477 +
478 +printf.obj:    $(TOP)/src/printf.c $(HDR)
479 +       $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/printf.c
480 +
481 +random.obj:    $(TOP)/src/random.c $(HDR)
482 +       $(TCCX) -c $(TOP)/src/random.c
483 +
484 +select.obj:    $(TOP)/src/select.c $(HDR)
485 +       $(TCCX) -c $(TOP)/src/select.c
486 +
487 +sqlite3.h:     $(TOP)/src/sqlite.h.in 
488 +       ..\update_ver $(TOP)\src\sqlite.h.in >sqlite3.h
489 +
490 +table.obj:     $(TOP)/src/table.c $(HDR)
491 +       $(TCCX) -c $(TOP)/src/table.c
492 +
493 +tclsqlite.obj: $(TOP)/src/tclsqlite.c $(HDR)
494 +       $(TCCX) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
495 +
496 +tokenize.obj:  $(TOP)/src/tokenize.c keywordhash.h $(HDR)
497 +       $(TCCX) -c $(TOP)/src/tokenize.c
498 +
499 +keywordhash.h: $(TOP)/tool/mkkeywordhash.c
500 +       $(BCC) /Femkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c
501 +       mkkeywordhash >keywordhash.h
502 +
503 +trigger.obj:   $(TOP)/src/trigger.c $(HDR)
504 +       $(TCCX) -c $(TOP)/src/trigger.c
505 +
506 +update.obj:    $(TOP)/src/update.c $(HDR)
507 +       $(TCCX) -c $(TOP)/src/update.c
508 +
509 +utf.obj:       $(TOP)/src/utf.c $(HDR)
510 +       $(TCCX) -c $(TOP)/src/utf.c
511 +
512 +util.obj:      $(TOP)/src/util.c $(HDR)
513 +       $(TCCX) -c $(TOP)/src/util.c
514 +
515 +vacuum.obj:    $(TOP)/src/vacuum.c $(HDR)
516 +       $(TCCX) -c $(TOP)/src/vacuum.c
517 +
518 +vdbe.obj:      $(TOP)/src/vdbe.c $(VDBEHDR)
519 +       $(TCCX) -c $(TOP)/src/vdbe.c
520 +
521 +vdbeapi.obj:   $(TOP)/src/vdbeapi.c $(VDBEHDR)
522 +       $(TCCX) -c $(TOP)/src/vdbeapi.c
523 +
524 +vdbeaux.obj:   $(TOP)/src/vdbeaux.c $(VDBEHDR)
525 +       $(TCCX) -c $(TOP)/src/vdbeaux.c
526 +
527 +vdbefifo.obj:  $(TOP)/src/vdbefifo.c $(VDBEHDR)
528 +       $(TCCX) -c $(TOP)/src/vdbefifo.c
529 +
530 +vdbemem.obj:   $(TOP)/src/vdbemem.c $(VDBEHDR)
531 +       $(TCCX) -c $(TOP)/src/vdbemem.c
532 +
533 +vtab.obj:      $(TOP)/src/vtab.c $(VDBEHDR)
534 +       $(TCCX) -c $(TOP)/src/vtab.c
535 +
536 +where.obj:     $(TOP)/src/where.c $(HDR)
537 +       $(TCCX) -c $(TOP)/src/where.c
538 +
539 +# Rules for building test programs and for running tests
540 +#
541 +tclsqlite3:    $(TOP)/src/tclsqlite.c sqlite3.lib
542 +       $(TCCX) $(TCL_FLAGS) -DTCLSH=1 /Fetclsqlite3 \
543 +               $(TOP)/src/tclsqlite.c sqlite3.lib $(LIBTCL) $(THREADLIB)
544 +
545 +testfixture$(EXE):     $(TOP)/src/tclsqlite.c sqlite3.lib $(TESTSRC)
546 +       $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 \
547 +               -DSQLITE_SERVER=1 /Fetestfixture$(EXE) \
548 +               $(TESTSRC) $(TOP)/src/tclsqlite.c \
549 +               sqlite3.lib $(LIBTCL) $(THREADLIB)
550 +
551 +fulltest:      testfixture$(EXE) sqlite3$(EXE)
552 +       testfixture$(EXE) $(TOP)/test/all.test
553 +
554 +test:  testfixture$(EXE) sqlite3$(EXE)
555 +       testfixture$(EXE) $(TOP)/test/quick.test
556 +
557 +sqlite3_analyzer$(EXE):        $(TOP)/src/tclsqlite.c sqlite3.lib $(TESTSRC) \
558 +                       $(TOP)/tool/spaceanal.tcl
559 +       sed \
560 +         -e '/^#/d' \
561 +         -e 's,\\,\\\\,g' \
562 +         -e 's,",\\",g' \
563 +         -e 's,^,",' \
564 +         -e 's,$$,\\n",' \
565 +         $(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h
566 +       $(TCCX) $(TCL_FLAGS) -DTCLSH=2 -DSQLITE_TEST=1 -DSQLITE_DEBUG=1 \
567 +               /Fesqlite3_analyzer$(EXE) $(TESTSRC) $(TOP)/src/tclsqlite.c \
568 +               sqlite3.lib $(LIBTCL) $(THREADLIB)
569 +
570 +TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO)
571 +$(TEST_EXTENSION): $(TOP)/src/test_loadext.c
572 +       $(MKSHLIB) $(TOP)/src/test_loadext.c /Fe$(TEST_EXTENSION)
573 +
574 +extensiontest: testfixture$(EXE) $(TEST_EXTENSION)
575 +       testfixture$(EXE) $(TOP)/test/loadext.test
576 +
577 +# Rules used to build documentation
578 +#
579 +arch.html:     $(TOP)/www/arch.tcl
580 +       tclsh $(TOP)/www/arch.tcl >arch.html
581 +
582 +autoinc.html:  $(TOP)/www/autoinc.tcl
583 +       tclsh $(TOP)/www/autoinc.tcl >autoinc.html
584 +
585 +c_interface.html:      $(TOP)/www/c_interface.tcl
586 +       tclsh $(TOP)/www/c_interface.tcl >c_interface.html
587 +
588 +capi3.html:    $(TOP)/www/capi3.tcl
589 +       tclsh $(TOP)/www/capi3.tcl >capi3.html
590 +
591 +capi3ref.html: $(TOP)/www/capi3ref.tcl
592 +       tclsh $(TOP)/www/capi3ref.tcl >capi3ref.html
593 +
594 +changes.html:  $(TOP)/www/changes.tcl
595 +       tclsh $(TOP)/www/changes.tcl >changes.html
596 +
597 +compile.html:  $(TOP)/www/compile.tcl
598 +       tclsh $(TOP)/www/compile.tcl >compile.html
599 +
600 +copyright.html:        $(TOP)/www/copyright.tcl
601 +       tclsh $(TOP)/www/copyright.tcl >copyright.html
602 +
603 +copyright-release.html:        $(TOP)/www/copyright-release.html
604 +       copy $(TOP)/www/copyright-release.html .
605 +
606 +copyright-release.pdf: $(TOP)/www/copyright-release.pdf
607 +       copy $(TOP)/www/copyright-release.pdf .
608 +
609 +common.tcl:    $(TOP)/www/common.tcl
610 +       copy $(TOP)/www/common.tcl .
611 +
612 +conflict.html: $(TOP)/www/conflict.tcl
613 +       tclsh $(TOP)/www/conflict.tcl >conflict.html
614 +
615 +datatypes.html:        $(TOP)/www/datatypes.tcl
616 +       tclsh $(TOP)/www/datatypes.tcl >datatypes.html
617 +
618 +datatype3.html:        $(TOP)/www/datatype3.tcl
619 +       tclsh $(TOP)/www/datatype3.tcl >datatype3.html
620 +
621 +different.html:        $(TOP)/www/different.tcl
622 +       tclsh $(TOP)/www/different.tcl >different.html
623 +
624 +docs.html:     $(TOP)/www/docs.tcl
625 +       tclsh $(TOP)/www/docs.tcl >docs.html
626 +
627 +download.html: $(TOP)/www/download.tcl
628 +       mkdir -p doc
629 +       tclsh $(TOP)/www/download.tcl >download.html
630 +
631 +faq.html:      $(TOP)/www/faq.tcl
632 +       tclsh $(TOP)/www/faq.tcl >faq.html
633 +
634 +fileformat.html:       $(TOP)/www/fileformat.tcl
635 +       tclsh $(TOP)/www/fileformat.tcl >fileformat.html
636 +
637 +formatchng.html:       $(TOP)/www/formatchng.tcl
638 +       tclsh $(TOP)/www/formatchng.tcl >formatchng.html
639 +
640 +index.html:    $(TOP)/www/index.tcl last_change
641 +       tclsh $(TOP)/www/index.tcl >index.html
642 +
643 +lang.html:     $(TOP)/www/lang.tcl
644 +       tclsh $(TOP)/www/lang.tcl doc >lang.html
645 +
646 +pragma.html:   $(TOP)/www/pragma.tcl
647 +       tclsh $(TOP)/www/pragma.tcl >pragma.html
648 +
649 +lockingv3.html:        $(TOP)/www/lockingv3.tcl
650 +       tclsh $(TOP)/www/lockingv3.tcl >lockingv3.html
651 +
652 +sharedcache.html: $(TOP)/www/sharedcache.tcl
653 +       tclsh $(TOP)/www/sharedcache.tcl >sharedcache.html
654 +
655 +mingw.html:    $(TOP)/www/mingw.tcl
656 +       tclsh $(TOP)/www/mingw.tcl >mingw.html
657 +
658 +nulls.html:    $(TOP)/www/nulls.tcl
659 +       tclsh $(TOP)/www/nulls.tcl >nulls.html
660 +
661 +oldnews.html:  $(TOP)/www/oldnews.tcl
662 +       tclsh $(TOP)/www/oldnews.tcl >oldnews.html
663 +
664 +omitted.html:  $(TOP)/www/omitted.tcl
665 +       tclsh $(TOP)/www/omitted.tcl >omitted.html
666 +
667 +opcode.html:   $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c
668 +       tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html
669 +
670 +optimizer.html:        $(TOP)/www/optimizer.tcl
671 +       tclsh $(TOP)/www/optimizer.tcl >optimizer.html
672 +
673 +optoverview.html:      $(TOP)/www/optoverview.tcl
674 +       tclsh $(TOP)/www/optoverview.tcl >optoverview.html
675 +
676 +quickstart.html:       $(TOP)/www/quickstart.tcl
677 +       tclsh $(TOP)/www/quickstart.tcl >quickstart.html
678 +
679 +speed.html:    $(TOP)/www/speed.tcl
680 +       tclsh $(TOP)/www/speed.tcl >speed.html
681 +
682 +sqlite.html:   $(TOP)/www/sqlite.tcl
683 +       tclsh $(TOP)/www/sqlite.tcl >sqlite.html
684 +
685 +support.html:  $(TOP)/www/support.tcl
686 +       tclsh $(TOP)/www/support.tcl >support.html
687 +
688 +tclsqlite.html:        $(TOP)/www/tclsqlite.tcl
689 +       tclsh $(TOP)/www/tclsqlite.tcl >tclsqlite.html
690 +
691 +vdbe.html:     $(TOP)/www/vdbe.tcl
692 +       tclsh $(TOP)/www/vdbe.tcl >vdbe.html
693 +
694 +version3.html: $(TOP)/www/version3.tcl
695 +       tclsh $(TOP)/www/version3.tcl >version3.html
696 +
697 +whentouse.html:        $(TOP)/www/whentouse.tcl
698 +       tclsh $(TOP)/www/whentouse.tcl >whentouse.html
699 +
700 +
701 +# Files to be published on the website.
702 +#
703 +DOC = \
704 +  arch.html \
705 +  autoinc.html \
706 +  c_interface.html \
707 +  capi3.html \
708 +  capi3ref.html \
709 +  changes.html \
710 +  compile.html \
711 +  copyright.html \
712 +  copyright-release.html \
713 +  copyright-release.pdf \
714 +  conflict.html \
715 +  datatypes.html \
716 +  datatype3.html \
717 +  different.html \
718 +  docs.html \
719 +  download.html \
720 +  faq.html \
721 +  fileformat.html \
722 +  formatchng.html \
723 +  index.html \
724 +  lang.html \
725 +  lockingv3.html \
726 +  mingw.html \
727 +  nulls.html \
728 +  oldnews.html \
729 +  omitted.html \
730 +  opcode.html \
731 +  optimizer.html \
732 +  optoverview.html \
733 +  pragma.html \
734 +  quickstart.html \
735 +  sharedcache.html \
736 +  speed.html \
737 +  sqlite.html \
738 +  support.html \
739 +  tclsqlite.html \
740 +  vdbe.html \
741 +  version3.html \
742 +  whentouse.html
743 +
744 +doc:   common.tcl $(DOC)
745 +       mkdir -p doc
746 +       ren $(DOC) doc
747 +       copy $(TOP)/www/*.gif $(TOP)/art/*.gif doc
748 +
749 +# Standard install and cleanup targets
750 +#
751 +install:       sqlite3 sqlite3.lib sqlite3.h
752 +       copy sqlite3 $(BINDIR)
753 +       copy sqlite3.lib $(LIBDIR)
754 +       copy sqlite3.h $(INCDIR)
755 +
756 +clean: 
757 +       -del *~ *.obj *.ilk *.pdb sqlite3.exe sqlite3.lib sqlite3.h opcodes.* 2>nul
758 +       -del lemon.exe lempar.c parse.* sqlite*.tar.gz mkkeywordhash.exe keywordhash.h 2>nul
759 +       -del *.da *.bb *.bbg gmon.out 2>nul
760 +       -rd /s /q tsrc 2>nul
761 +       -del testloadext.dll 2>nul
762 --- /dev/null   1969-12-31 16:00:00.000000000 -0800
763 +++ update_ver.cmd      2006-11-23 07:09:03.334906700 -0800
764 @@ -0,0 +1,4 @@
765 +@echo off
766 +for /f %%i in ( ..\VERSION ) do set VERSION=%%i
767 +for /f "usebackq" %%i in ( `cmd /c sed "s/[^0-9]/ /g" ^< ..\VERSION ^| nawk "{printf \"%%d%%03d%%03d\",$1,$2,$3}"` ) do set VERS_NUM=%%i
768 +sed -e s/--VERS--/%VERSION%/ -e s/--VERSION-NUMBER--/%VERS_NUM%/ %1