summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/sqlite3/build_fts_as_part_of_libsqlite.patch
blob: 54b04f0a803862b809dd4ce44ba09b72d9efb13d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
Index: Makefile.in
===================================================================
RCS file: /sqlite/sqlite/Makefile.in,v
retrieving revision 1.186
diff -u -3 -p -r1.186 Makefile.in
--- Makefile.in	23 Nov 2007 15:12:44 -0000	1.186
+++ Makefile.in	23 Nov 2007 19:27:56 -0000
@@ -114,6 +114,23 @@ LTINSTALL = $(LIBTOOL) --mode=install $(
 # nawk compatible awk.
 NAWK = @AWK@
 
+# Need these defined unconditionally, as non-fts builds with
+# fts object files without using -DSQLITE_ENABLE_FTS[123]
+# will not work without it.
+#
+TCC += -DSQLITE_CORE
+TCC += -DSQLITE_ENABLE_BROKEN_FTS1
+TCC += -DSQLITE_ENABLE_BROKEN_FTS2
+
+# uncomment to build fts1 as part of library
+# TCC += -DSQLITE_ENABLE_FTS1=1
+
+# uncomment to build fts2 as part of library
+# TCC += -DSQLITE_ENABLE_FTS2=1
+
+# uncomment to build fts3 as part of library
+# TCC += -DSQLITE_ENABLE_FTS3=1
+
 # You should not have to change anything below this line
 ###############################################################################
 TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1
@@ -132,6 +149,17 @@ LIBOBJ = alter.lo analyze.lo attach.lo a
          vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbefifo.lo vdbemem.lo \
          where.lo utf.lo legacy.lo vtab.lo
 
+# Object files for FTS
+#
+LIBOBJ += \
+  fts1.lo fts1_hash.lo fts1_porter.lo fts1_tokenizer1.lo
+
+LIBOBJ += \
+  fts2.lo fts2_hash.lo fts2_porter.lo fts2_tokenizer.lo fts2_tokenizer1.lo
+
+LIBOBJ += \
+  fts3.lo fts3_hash.lo fts3_porter.lo fts3_tokenizer.lo fts3_tokenizer1.lo
+
 # All of the source code files.
 #
 SRC = \
@@ -209,6 +237,23 @@ SRC += \
   $(TOP)/ext/fts1/fts1_tokenizer.h \
   $(TOP)/ext/fts1/fts1_tokenizer1.c
 
+SRC += \
+  $(TOP)/ext/fts2/fts2.c \
+  $(TOP)/ext/fts2/fts2.h \
+  $(TOP)/ext/fts2/fts2_hash.c \
+  $(TOP)/ext/fts2/fts2_hash.h \
+  $(TOP)/ext/fts2/fts2_porter.c \
+  $(TOP)/ext/fts2/fts2_tokenizer.h \
+  $(TOP)/ext/fts2/fts2_tokenizer1.c
+
+SRC += \
+  $(TOP)/ext/fts3/fts3.c \
+  $(TOP)/ext/fts3/fts3.h \
+  $(TOP)/ext/fts3/fts3_hash.c \
+  $(TOP)/ext/fts3/fts3_hash.h \
+  $(TOP)/ext/fts3/fts3_porter.c \
+  $(TOP)/ext/fts3/fts3_tokenizer.h \
+  $(TOP)/ext/fts3/fts3_tokenizer1.c
 
 # Source code to the test files.
 #
@@ -285,6 +330,16 @@ HDR += \
   $(TOP)/ext/fts1/fts1_hash.h \
   $(TOP)/ext/fts1/fts1_tokenizer.h
 
+HDR += \
+  $(TOP)/ext/fts2/fts2.h \
+  $(TOP)/ext/fts2/fts2_hash.h \
+  $(TOP)/ext/fts2/fts2_tokenizer.h
+
+HDR += \
+  $(TOP)/ext/fts3/fts3.h \
+  $(TOP)/ext/fts3/fts3_hash.h \
+  $(TOP)/ext/fts3/fts3_tokenizer.h
+
 # Header files used by the VDBE submodule
 #
 VDBEHDR = \
@@ -616,3 +671,48 @@ sqlite3.def: $(REAL_LIBOBJ)
 sqlite3.dll: $(REAL_LIBOBJ) sqlite3.def
 	$(TCC) -shared -o sqlite3.dll sqlite3.def \
 		-Wl,"--strip-all" $(REAL_LIBOBJ)
+
+#
+# FTS
+#
+fts1.lo: $(TOP)/ext/fts1/fts1.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts1/fts1.c
+
+fts1_hash.lo: $(TOP)/ext/fts1/fts1_hash.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts1/fts1_hash.c
+
+fts1_porter.lo: $(TOP)/ext/fts1/fts1_porter.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts1/fts1_porter.c
+
+fts1_tokenizer1.lo: $(TOP)/ext/fts1/fts1_tokenizer1.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts1/fts1_tokenizer1.c
+
+fts2.lo: $(TOP)/ext/fts2/fts2.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts2/fts2.c
+
+fts2_hash.lo: $(TOP)/ext/fts2/fts2_hash.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts2/fts2_hash.c
+
+fts2_porter.lo: $(TOP)/ext/fts2/fts2_porter.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts2/fts2_porter.c
+
+fts2_tokenizer.lo: $(TOP)/ext/fts2/fts2_tokenizer.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts2/fts2_tokenizer.c
+
+fts2_tokenizer1.lo: $(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts2/fts2_tokenizer1.c
+
+fts3.lo: $(TOP)/ext/fts3/fts3.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts3/fts3.c
+
+fts3_hash.lo: $(TOP)/ext/fts3/fts3_hash.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts3/fts3_hash.c
+
+fts3_porter.lo: $(TOP)/ext/fts3/fts3_porter.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts3/fts3_porter.c
+
+fts3_tokenizer.lo: $(TOP)/ext/fts3/fts3_tokenizer.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts3/fts3_tokenizer.c
+
+fts3_tokenizer1.lo: $(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR)
+	$(LTCOMPILE) -c $(TOP)/ext/fts3/fts3_tokenizer1.c