Home | History | Annotate | Download | only in sqlite
      1 Index: Makefile.linux-gcc
      2 ===================================================================
      3 --- Makefile.linux-gcc	2009-09-03 13:32:06.000000000 -0700
      4 +++ Makefile.linux-gcc	2009-07-01 12:08:39.000000000 -0700
      5 @@ -14,7 +14,7 @@
      6  #### The toplevel directory of the source tree.  This is the directory
      7  #    that contains this "Makefile.in" and the "configure.in" script.
      8  #
      9 -TOP = ../sqlite
     10 +TOP = ..
     11  
     12  #### C Compiler and options for use in building executables that
     13  #    will run on the platform that is doing the build.
     14 @@ -33,13 +33,13 @@
     15  #    appropriately:
     16  #
     17  #THREADSAFE = -DTHREADSAFE=1
     18 -THREADSAFE = -DTHREADSAFE=0
     19 +THREADSAFE = -DTHREADSAFE=1
     20  
     21  #### Specify any extra linker options needed to make the library
     22  #    thread safe
     23  #
     24  #THREADLIB = -lpthread
     25 -THREADLIB = 
     26 +THREADLIB = -lpthread
     27  
     28  #### Specify any extra libraries needed to access required functions.
     29  #
     30 @@ -57,8 +57,28 @@
     31  #OPTS = -DSQLITE_DEBUG=2
     32  #OPTS = -DSQLITE_DEBUG=1
     33  #OPTS = 
     34 -OPTS = -DNDEBUG=1
     35 -OPTS += -DHAVE_FDATASYNC=1
     36 +
     37 +# These flags match those for SQLITE_CFLAGS in config.mk.  
     38 +
     39 +OPTS += -DNDEBUG
     40 +OPTS += -DSQLITE_CORE
     41 +OPTS += -DSQLITE_ENABLE_FTS2 -DSQLITE_ENABLE_BROKEN_FTS2
     42 +OPTS += -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600
     43 +OPTS += -DHAVE_USLEEP=1
     44 +
     45 +# Additional SQLite tests.
     46 +OPTS += -DSQLITE_MEMDEBUG=1
     47 +
     48 +# Don't include these ones, they break the SQLite tests.
     49 +#  -DSQLITE_OMIT_ATTACH=1 \
     50 +#  -DSQLITE_OMIT_LOAD_EXTENSION=1 \
     51 +#  -DSQLITE_OMIT_VACUUM=1 \
     52 +#  -DSQLITE_TRANSACTION_DEFAULT_IMMEDIATE=1 \
     53 +
     54 +SHELL_ICU = $(TOP)/src/shell_icu_linux.c -licuuc
     55 +
     56 +# TODO(shess) I can't see why I need this setting.
     57 +OPTS += -DOS_UNIX=1
     58  
     59  #### The suffix to add to executable files.  ".exe" for windows.
     60  #    Nothing for unix.
     61 @@ -91,16 +111,16 @@
     62  
     63  #### Extra compiler options needed for programs that use the TCL library.
     64  #
     65 -#TCL_FLAGS =
     66 +TCL_FLAGS = -I/usr/include/tcl8.5
     67  #TCL_FLAGS = -DSTATIC_BUILD=1
     68 -TCL_FLAGS = -I/home/drh/tcltk/8.5linux
     69 +#TCL_FLAGS = -I/home/drh/tcltk/8.5linux
     70  #TCL_FLAGS = -I/home/drh/tcltk/8.5win -DSTATIC_BUILD=1
     71  #TCL_FLAGS = -I/home/drh/tcltk/8.3hpux
     72  
     73  #### Linker options needed to link against the TCL library.
     74  #
     75 -#LIBTCL = -ltcl -lm -ldl
     76 -LIBTCL = /home/drh/tcltk/8.5linux/libtcl8.5g.a -lm -ldl
     77 +LIBTCL = -ltcl8.5 -lm -ldl
     78 +#LIBTCL = /home/drh/tcltk/8.5linux/libtcl8.5g.a -lm -ldl
     79  #LIBTCL = /home/drh/tcltk/8.5win/libtcl85s.a -lmsvcrt
     80  #LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc
     81  
     82 Index: main.mk
     83 ===================================================================
     84 --- main.mk	2009-09-10 12:18:17.000000000 -0700
     85 +++ main.mk	2009-09-15 11:45:21.000000000 -0700
     86 @@ -69,6 +69,12 @@
     87           walker.o where.o utf.o vtab.o
     88  
     89  
     90 +LIBOBJ += fts2.o \
     91 +	  fts2_hash.o \
     92 +	  fts2_icu.o \
     93 +	  fts2_porter.o \
     94 +          fts2_tokenizer.o \
     95 +	  fts2_tokenizer1.o
     96  
     97  # All of the source code files.
     98  #
     99 @@ -243,6 +253,17 @@
    100    $(TOP)/src/test_thread.c \
    101    $(TOP)/src/test_wsd.c
    102  
    103 +TESTSRC += \
    104 +  $(TOP)/ext/fts2/fts2.c \
    105 +  $(TOP)/ext/fts2/fts2.h \
    106 +  $(TOP)/ext/fts2/fts2_hash.c \
    107 +  $(TOP)/ext/fts2/fts2_hash.h \
    108 +  $(TOP)/ext/fts2/fts2_icu.c \
    109 +  $(TOP)/ext/fts2/fts2_porter.c \
    110 +  $(TOP)/ext/fts2/fts2_tokenizer.h \
    111 +  $(TOP)/ext/fts2/fts2_tokenizer.c \
    112 +  $(TOP)/ext/fts2/fts2_tokenizer1.c
    113 +
    114  #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
    115  #TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
    116  
    117 @@ -314,8 +343,8 @@
    118  
    119  sqlite3$(EXE):	$(TOP)/src/shell.c libsqlite3.a sqlite3.h
    120  	$(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE)                  \
    121 -		$(TOP)/src/shell.c                                  \
    122 -		libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB)
    123 +		$(TOP)/src/shell.c $(SHELL_ICU)                     \
    124 +		libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) -ldl
    125  
    126  objects: $(LIBOBJ_ORIG)
    127  
    128 @@ -484,6 +527,9 @@
    129  test:	testfixture$(EXE) sqlite3$(EXE)
    130  	./testfixture$(EXE) $(TOP)/test/veryquick.test
    131  
    132 +fts2test:	testfixture$(EXE) sqlite3$(EXE)
    133 +	./testfixture$(EXE) $(TOP)/test/fts2.test
    134 +
    135  sqlite3_analyzer$(EXE):	$(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \
    136  			$(TOP)/tool/spaceanal.tcl
    137  	sed \
    138 diff --git a/third_party/sqlite/src/test/permutations.test b/third_party/sqlite/
    139 index 9c48d9a..283cebf 100644
    140 --- test/permutations.test
    141 +++ test/permutations.test
    142 @@ -96,6 +96,7 @@ if {$::tcl_platform(platform)!="unix"} {
    143  set alltests [test_set $alltests -exclude {
    144    all.test        async.test         quick.test  veryquick.test
    145    memleak.test    permutations.test  soak.test   fts3.test
    146 +  fts2.test
    147    mallocAll.test  rtree.test
    148  }]
    149  
    150