1 | #PACKAGE = mg
|
---|
2 | #VERSION = 1.2
|
---|
3 |
|
---|
4 | #SHELL = /bin/sh
|
---|
5 | #exec_prefix = ${prefix}
|
---|
6 | #prefix = /image/httpd/mg-1.2
|
---|
7 | #srcdir = .
|
---|
8 | #subdir = src/text
|
---|
9 | #top_srcdir = ../..
|
---|
10 | #transform = s,x,x,
|
---|
11 |
|
---|
12 | CC = cl
|
---|
13 | #CC = cl /Z7 this gives symbol and line number debugging (set /DEBUG on link)
|
---|
14 | #CFLAGS = -g -O
|
---|
15 | CPPFLAGS =
|
---|
16 | DEFS = -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DHAVE_CONFIG_H -D__WIN32__ -D_LITTLE_ENDIAN
|
---|
17 | #INSTALL = /usr/local/gnu/bin/install -c
|
---|
18 | #INSTALL_DATA = ${INSTALL} -m 644
|
---|
19 | #INSTALL_PROGRAM = ${INSTALL}
|
---|
20 | LDFLAGS =
|
---|
21 | LIBS = ..\..\lib\libmg.lib
|
---|
22 | #TOUCH = echo timestamp >
|
---|
23 | #AWK = gawk
|
---|
24 |
|
---|
25 | #bindir = $(exec_prefix)/bin
|
---|
26 | #datadir = $(prefix)/share
|
---|
27 | #libexecdir = $(exec_prefix)/libexec
|
---|
28 | #localedir = $(datadir)/locale
|
---|
29 | #mandir = $(prefix)/man/man1
|
---|
30 |
|
---|
31 | COMPILE = $(CC) -c $(DEFS) -I. -I..\.. -I..\..\lib
|
---|
32 | LINK = $(CC) $(LDFLAGS)
|
---|
33 |
|
---|
34 | .SUFFIXES:
|
---|
35 | .SUFFIXES: .c .obj .cpp
|
---|
36 | .c.obj:
|
---|
37 | $(COMPILE) $<
|
---|
38 | .cpp.obj:
|
---|
39 | $(COMPILE) $<
|
---|
40 |
|
---|
41 | o = .obj
|
---|
42 | e = .exe
|
---|
43 |
|
---|
44 | #############################################################################
|
---|
45 | #
|
---|
46 | # Uncomment (and possibly edit) the following lines if you wish
|
---|
47 | # to use the GNU readline library for the input in mgquery
|
---|
48 | #
|
---|
49 | #READLINE = -DGNU_READLINE -I/opt/gnu/include/readline -L/opt/gnu/lib
|
---|
50 | #READLINE_LIBS = -lreadline -ltermcap
|
---|
51 | #
|
---|
52 | #
|
---|
53 | #############################################################################
|
---|
54 |
|
---|
55 | #############################################################################
|
---|
56 | #
|
---|
57 | # When working with the trec collection this should be uncommented.
|
---|
58 | #
|
---|
59 | # TREC_MODE = -DTREC_MODE
|
---|
60 | #
|
---|
61 | #
|
---|
62 | #############################################################################
|
---|
63 |
|
---|
64 | SOURCES = \
|
---|
65 | backend.c locallib.c mg_weights_build.c \
|
---|
66 | bool_optimiser.c mg.special.c mgdictlist.c \
|
---|
67 | bool_parser.c mg_compression_dict.c mgquery.c \
|
---|
68 | bool_query.c mg_errors.c mgstat.c \
|
---|
69 | bool_tester.c mg_fast_comp_dict.c mg_decompress_text.c \
|
---|
70 | bool_tree.c mg_files.c query.docnums.c \
|
---|
71 | commands.c mg_hilite_words.c query.ranked.c \
|
---|
72 | comp_dict.c mg_invf_dict.c read_line.c \
|
---|
73 | environment.c mg_invf_dump.c stem_search.c \
|
---|
74 | mg_invf_merge.c stemmer.c mg_stem_idx.c \
|
---|
75 | mg_invf_rebuild.c term_lists.c mgstemidxlist.c \
|
---|
76 | invf_get.c mg_passes.c text.pass1.c \
|
---|
77 | ivf.pass1.c mg_perf_hash_build.c text.pass2.c \
|
---|
78 | ivf.pass2.c mg_text_estimate.c text_get.c \
|
---|
79 | lists.c mg_text_merge.c weights.c \
|
---|
80 | mgpass.c query_term_list.c
|
---|
81 |
|
---|
82 | HEADERS = \
|
---|
83 | backend.h conditions.h locallib.h term_lists.h \
|
---|
84 | bool_optimiser.h environment.h mg.h text.h \
|
---|
85 | bool_parser.h globals.h mg_errors.h text_get.h \
|
---|
86 | bool_query.h hash.h mg_files.h warranty.h \
|
---|
87 | bool_tree.h help.mg.h mg_merge.h weights.h \
|
---|
88 | build.h invf.h read_line.h words.h \
|
---|
89 | commands.h invf_get.h stem_search.h \
|
---|
90 | comp_dict.h lists.h stemmer.h query_term_list.h
|
---|
91 |
|
---|
92 |
|
---|
93 | #MISC = Makefile.in help.mg.src bool_parser.y warranty.src conditions.src
|
---|
94 |
|
---|
95 | ALLFILES = $(SOURCES) $(HEADERS) $(MISC) $(MAN)
|
---|
96 |
|
---|
97 | DISTFILES = $(ALLFILES)
|
---|
98 |
|
---|
99 | EXEC = mgquery$e mg_weights_build$e mgstat$e \
|
---|
100 | mg_invf_dump$e mg_invf_dict$e \
|
---|
101 | mg_invf_rebuild$e mgdictlist$e \
|
---|
102 | mg_passes$e mg_perf_hash_build$e \
|
---|
103 | mg_compression_dict$e mg_text_estimate$e \
|
---|
104 | mg_fast_comp_dict$e \
|
---|
105 | mg_hilite_words$e mg_invf_merge$e \
|
---|
106 | mg_text_merge$e bool_tester$e mgpass$e \
|
---|
107 | mg_stem_idx$e mgstemidxlist$e \
|
---|
108 | mg_decompress_text$e
|
---|
109 |
|
---|
110 | MAN = mgquery.1 mg_weights_build.1 mgstat.1 mg_invf_dump.1 mg_invf_dict.1 \
|
---|
111 | mg_invf_rebuild.1 mgdictlist.1 mg_passes.1 mg_perf_hash_build.1 \
|
---|
112 | mg_compression_dict.1 mg_text_estimate.1 mg_fast_comp_dict.1 \
|
---|
113 | mg_hilite_words.1 mg_invf_merge.1 mg_text_merge.1 \
|
---|
114 | mg_stem_idx.1 mgstemidxlist.1 mg_decompress_text.1
|
---|
115 |
|
---|
116 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
117 |
|
---|
118 |
|
---|
119 | all: $(EXEC) libtextin.lib
|
---|
120 |
|
---|
121 |
|
---|
122 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
123 |
|
---|
124 | #help.mg.h : help.mg.src
|
---|
125 | # sed -e 's/\\/\\\\/g' -e 's/\"/\\\"/g' help.mg.src | $(AWK) '/^#/ { next; };{ if (x == 0) printf("static char *help_str[] = {\n\"%s\\n\"", $$0); else printf(",\n\"%s\\n\"", $$0); x = 1; }; END { printf("};\n"); }' - >help.mg.h
|
---|
126 |
|
---|
127 | #warranty.h : warranty.src
|
---|
128 | # sed -e 's/\\/\\\\/g' -e 's/\"/\\\"/g' warranty.src | $(AWK) '/^#/ { next; };{ if (x == 0) printf("static char *warranty_str[] = {\n\"%s\\n\"", $$0); else printf(",\n\"%s\\n\"", $$0); x = 1; }; END { printf("};\n"); }' - >warranty.h
|
---|
129 |
|
---|
130 | #conditions.h : conditions.src
|
---|
131 | # sed -e 's/\\/\\\\/g' -e 's/\"/\\\"/g' conditions.src | $(AWK) '/^#/ { next; };{ if (x == 0) printf("static char *cond_str[] = {\n\"%s\\n\"", $$0); else printf(",\n\"%s\\n\"", $$0); x = 1; }; END { printf("};\n"); }' - >conditions.h
|
---|
132 |
|
---|
133 |
|
---|
134 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
135 |
|
---|
136 | HILITE_OBJS = mg_hilite_words$o stemmer$o locallib$o
|
---|
137 |
|
---|
138 | mg_hilite_words$e: $(HILITE_OBJS)
|
---|
139 | $(LINK) $(HILITE_OBJS) $(LIBS)
|
---|
140 |
|
---|
141 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
142 |
|
---|
143 | #bool_parser.c: bool_parser.y
|
---|
144 | # $(YACC) $?
|
---|
145 | # mv y.tab.c $@
|
---|
146 | #
|
---|
147 | BOOL_OBJS = bool_tree$o bool_parser$o bool_optimiser$o bool_tester$o \
|
---|
148 | term_lists$o stemmer$o stem_search$o mg_errors$o query_term_list$o
|
---|
149 |
|
---|
150 | bool_tester$e: $(BOOL_OBJS)
|
---|
151 | $(LINK) $(BOOL_OBJS) $(LIBS)
|
---|
152 |
|
---|
153 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
154 |
|
---|
155 | QUERY_OBJS = \
|
---|
156 | mgquery$o locallib$o lists$o \
|
---|
157 | query.ranked$o query.docnums$o stem_search$o \
|
---|
158 | environment$o commands$o weights$o text_get$o stemmer$o \
|
---|
159 | read_line$o mg_errors$o backend$o invf_get$o \
|
---|
160 | term_lists$o bool_tree$o bool_parser$o bool_optimiser$o bool_query$o \
|
---|
161 | query_term_list$o
|
---|
162 |
|
---|
163 | mgquery$e: $(QUERY_OBJS)
|
---|
164 | $(LINK) $(READLINE) $(QUERY_OBJS) $(READLINE_LIBS) $(LIBS)
|
---|
165 |
|
---|
166 | commands$o : help.mg.h warranty.h conditions.h
|
---|
167 |
|
---|
168 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
169 |
|
---|
170 | PASSES_OBJS = \
|
---|
171 | mg_passes$o text.pass1$o comp_dict$o stemmer$o \
|
---|
172 | text.pass2$o locallib$o \
|
---|
173 | ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o
|
---|
174 |
|
---|
175 | mg_passes$e: $(PASSES_OBJS)
|
---|
176 | $(LINK) $(PASSES_OBJS) $(LIBS)
|
---|
177 |
|
---|
178 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
179 |
|
---|
180 | PASS_OBJS = \
|
---|
181 | mgpass$o text.pass1$o comp_dict$o stemmer$o \
|
---|
182 | text.pass2$o locallib$o \
|
---|
183 | ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o
|
---|
184 |
|
---|
185 | #mgpass$o: mgpass.cpp
|
---|
186 | # $(COMPILE) mgpass.cpp
|
---|
187 |
|
---|
188 | mgpass$e: $(PASS_OBJS)
|
---|
189 | $(LINK) $(PASS_OBJS) $(LIBS)
|
---|
190 |
|
---|
191 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
192 |
|
---|
193 | LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
|
---|
194 | advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
|
---|
195 | odbccp32.lib
|
---|
196 |
|
---|
197 | BUILDER_OBJS = \
|
---|
198 | builder$o
|
---|
199 |
|
---|
200 | builder$e: $(BUILDER_OBJS)
|
---|
201 | $(LINK) $(BUILDER_OBJS) $(LIBS) $(LINK32_FLAGS)
|
---|
202 |
|
---|
203 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
204 |
|
---|
205 | WEIGHTS_BUILD_OBJS = mg_weights_build$o mg_files$o
|
---|
206 |
|
---|
207 | mg_weights_build$e: $(WEIGHTS_BUILD_OBJS)
|
---|
208 | $(LINK) $(WEIGHTS_BUILD_OBJS) $(LIBS)
|
---|
209 |
|
---|
210 | COMP_DICT_OBJS = mg_compression_dict$o mg_files$o locallib$o
|
---|
211 |
|
---|
212 | mg_compression_dict$e: $(COMP_DICT_OBJS)
|
---|
213 | $(LINK) $(COMP_DICT_OBJS) $(LIBS)
|
---|
214 |
|
---|
215 | FAST_COMP_OBJS = mg_fast_comp_dict$o mg_files$o locallib$o
|
---|
216 |
|
---|
217 | mg_fast_comp_dict$e: $(FAST_COMP_OBJS)
|
---|
218 | $(LINK) $(FAST_COMP_OBJS) $(LIBS)
|
---|
219 |
|
---|
220 | TEXT_EST_OBJS = mg_text_estimate$o locallib$o comp_dict$o mg_files$o
|
---|
221 |
|
---|
222 | mg_text_estimate$e: $(TEXT_EST_OBJS)
|
---|
223 | $(LINK) $(TEXT_EST_OBJS) $(LIBS)
|
---|
224 |
|
---|
225 | STAT_OBJS = mgstat$o mg_files$o locallib$o
|
---|
226 |
|
---|
227 | mgstat$e: $(STAT_OBJS)
|
---|
228 | $(LINK) $(STAT_OBJS) $(LIBS)
|
---|
229 |
|
---|
230 | INVF_DUMP_OBJS = mg_invf_dump$o locallib$o mg_files$o
|
---|
231 |
|
---|
232 | mg_invf_dump$e: $(INVF_DUMP_OBJS)
|
---|
233 | $(LINK) $(INVF_DUMP_OBJS) $(LIBS)
|
---|
234 |
|
---|
235 | INVF_DICT_OBJS = mg_invf_dict$o mg_files$o locallib$o
|
---|
236 |
|
---|
237 | mg_invf_dict$e: $(INVF_DICT_OBJS)
|
---|
238 | $(LINK) $(INVF_DICT_OBJS) $(LIBS)
|
---|
239 |
|
---|
240 | INVF_REB_OBJS = mg_invf_rebuild$o locallib$o
|
---|
241 |
|
---|
242 | mg_invf_rebuild$e: $(INVF_REB_OBJS)
|
---|
243 | $(LINK) $(INVF_REB_OBJS) $(LIBS)
|
---|
244 |
|
---|
245 | DICTLIST_OBJS = mgdictlist$o locallib$o
|
---|
246 |
|
---|
247 | mgdictlist$e: $(DICTLIST_OBJS)
|
---|
248 | $(LINK) $(DICTLIST_OBJS) $(LIBS)
|
---|
249 |
|
---|
250 | PERF_HASH_OBJS = mg_perf_hash_build$o mg_files$o
|
---|
251 |
|
---|
252 | mg_perf_hash_build$e: $(PERF_HASH_OBJS)
|
---|
253 | $(LINK) $(PERF_HASH_OBJS) $(LIBS)
|
---|
254 |
|
---|
255 | STEM_IDX_OBJS = mg_stem_idx$o mg_files$o stemmer$o locallib$o \
|
---|
256 | mg_errors$o term_lists$o
|
---|
257 |
|
---|
258 | mg_stem_idx$e: $(STEM_IDX_OBJS)
|
---|
259 | $(LINK) $(STEM_IDX_OBJS) $(LIBS)
|
---|
260 |
|
---|
261 | STEM_IDX_LIST_OBJS = mgstemidxlist$o mg_files$o
|
---|
262 |
|
---|
263 | mgstemidxlist$e: $(STEM_IDX_LIST_OBJS)
|
---|
264 | $(LINK) $(STEM_IDX_LIST_OBJS) $(LIBS)
|
---|
265 |
|
---|
266 | DECOMPRESS_TEXT_OBJS = mg_decompress_text$o query_term_list$o mg_files$o mg_errors$o \
|
---|
267 | text_get$o locallib$o backend$o stem_search$o \
|
---|
268 | term_lists$o stemmer$o weights$o invf_get$o lists$o
|
---|
269 |
|
---|
270 | mg_decompress_text$e: $(DECOMPRESS_TEXT_OBJS)
|
---|
271 | $(LINK) $(DECOMPRESS_TEXT_OBJS) $(LIBS)
|
---|
272 |
|
---|
273 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
274 |
|
---|
275 | TEXT_MERGE_OBJS = mg_text_merge$o mg_files$o locallib$o
|
---|
276 |
|
---|
277 | mg_text_merge$e: $(TEXT_MERGE_OBJS)
|
---|
278 | $(LINK) $(TEXT_MERGE_OBJS) $(LIBS)
|
---|
279 |
|
---|
280 | INVF_MERGE_OBJS = mg_invf_merge$o mg_files$o locallib$o
|
---|
281 |
|
---|
282 | mg_invf_merge$e: $(INVF_MERGE_OBJS)
|
---|
283 | $(LINK) $(INVF_MERGE_OBJS) $(LIBS)
|
---|
284 |
|
---|
285 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
286 |
|
---|
287 | #ansi2knr: ansi2knr.o
|
---|
288 | # $(LINK) ansi2knr.o $(LIBS)
|
---|
289 | #
|
---|
290 | install: execinstall maninstall
|
---|
291 | uninstall: execuninstall manuninstall
|
---|
292 |
|
---|
293 | #execinstall: $(EXEC)
|
---|
294 | # $(top_srcdir)/mkinstalldirs $(bindir); \
|
---|
295 | # for name in $(EXEC); do \
|
---|
296 | # $(INSTALL_PROGRAM) $$name \
|
---|
297 | # $(bindir)/`echo $$name | sed '$(transform)'`; \
|
---|
298 | # done
|
---|
299 |
|
---|
300 | #execuninstall:
|
---|
301 | # for name in $(EXEC); do \
|
---|
302 | # rm -f $(bindir)/`echo $$name | sed '$(transform)'`; \
|
---|
303 | # done
|
---|
304 |
|
---|
305 | maninstall: $(MAN)
|
---|
306 | $(top_srcdir)/mkinstalldirs $(mandir); \
|
---|
307 | for f in $(MAN); do \
|
---|
308 | $(INSTALL_DATA) $$f $(mandir)/$$f ;\
|
---|
309 | done
|
---|
310 |
|
---|
311 | manuninstall: $(MAN)
|
---|
312 | for f in $(MAN); do \
|
---|
313 | rm -f $(mandir)/$$f ;\
|
---|
314 | done
|
---|
315 |
|
---|
316 |
|
---|
317 | LIB_OBJS = \
|
---|
318 | query_term_list$o \
|
---|
319 | locallib$o lists$o \
|
---|
320 | query.ranked$o query.docnums$o stem_search$o \
|
---|
321 | environment$o commands$o weights$o text_get$o stemmer$o \
|
---|
322 | read_line$o mg_errors$o backend$o invf_get$o \
|
---|
323 | term_lists$o bool_tree$o bool_parser$o bool_optimiser$o bool_query$o
|
---|
324 |
|
---|
325 | libtextin.lib: $(LIB_OBJS)
|
---|
326 | del libtextin.lib
|
---|
327 | lib /out:libtextin.lib $(LIB_OBJS)
|
---|
328 |
|
---|
329 |
|
---|
330 | mostlyclean:
|
---|
331 | rm -f *$o _*.c _*.o *._c *._o core core.*
|
---|
332 |
|
---|
333 | clean: mostlyclean
|
---|
334 | rm -f $(EXEC)
|
---|
335 |
|
---|
336 | distclean: clean
|
---|
337 | rm -f ansi2knr
|
---|
338 | rm -f Makefile
|
---|
339 |
|
---|
340 | maintainer-clean: distclean
|
---|
341 | @echo "This command is intended only for maintainers to use;"
|
---|
342 | @echo "rebuilding the deleted files may require special tools."
|
---|
343 |
|
---|
344 | #dist: $(DISTFILES)
|
---|
345 | # for file in $(DISTFILES); do \
|
---|
346 | # ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
---|
347 | # || cp -p $(srcdir)/$$file $(distdir); \
|
---|
348 | # done
|
---|
349 |
|
---|
350 | #Makefile: Makefile.in ../../config.status
|
---|
351 | # cd ../.. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
|
---|
352 |
|
---|
353 | # Tell versions [3.59,3.63) of GNU make not to export all variables.
|
---|
354 | # Otherwise a system limit (for SysV at least) may be exceeded.
|
---|
355 | #.NOEXPORT:
|
---|