source: main/trunk/greenstone2/common-src/indexers/mg/src/text/Makefile.in@ 22058

Last change on this file since 22058 was 22058, checked in by ak19, 14 years ago

Changes to makefiles to 1. incorporate USE_GDBM and USE_JDBM flags (and USE_SQLITE) in most places so that the DEFINES variable is set at all times. This is necessary to ensure that all classes that contain objects with gdbm and jdbm members are of a consistent size. Else we've had experience with Greenstone crashing with memory errors (to do with the similar ENABLE_indexer flags). 2. ENABLE_JDBM is now USE_JDBM. 3. Not everything works now. It still compiles the default way, but the disable-gdbm flag is causing trouble when compiling argdb in recpt since it uses that.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 12.5 KB
Line 
1###########################################################################
2#
3# Makefile.in -- Makefile for the MG system
4# Copyright (C) 1994 Neil Sharman; 1995 Tim Shimmin
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19#
20# @(#)Makefile.in 1.10 22 Mar 1994
21#
22###########################################################################
23
24PACKAGE = @PACKAGE@
25VERSION = @VERSION@
26
27SHELL = /bin/sh
28VPATH = @srcdir@
29exec_prefix = @exec_prefix@
30prefix = @prefix@
31bindir = @bindir@
32srcdir = @srcdir@
33subdir = src/text
34top_srcdir = @top_srcdir@
35transform = @program_transform_name@
36
37USE_GDBM = @USE_GDBM@
38ifeq ($(USE_GDBM), 1)
39GDBM_DEFINES = -DUSE_GDBM
40else
41GDBM_DEFINES =
42endif
43
44USE_JDBM = @USE_JDBM@
45ifeq ($(USE_JDBM), 1)
46JDBM_DEFINES = -DUSE_JDBM
47else
48JDBM_DEFINES =
49endif
50
51USE_SQLITE = @USE_SQLITE@
52ifeq ($(USE_SQLITE), 1)
53SQLITE_DEFINES = -DUSE_SQLITE
54else
55SQLITE_DEFINES =
56endif
57
58AR = ar
59CC = @CC@
60CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@ -fpic
61DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
62RANLIB = @RANLIB@
63INSTALL = @INSTALL@
64INSTALL_DATA = @INSTALL_DATA@
65INSTALL_PROGRAM = @INSTALL_PROGRAM@
66LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
67LIBS = ../../lib/libmglib.a @LIBS@
68TOUCH = echo timestamp >
69AWK = @AWK@
70YACC = @YACC@
71
72##########################################
73# Uncomment for compiling for the nzdl project
74#
75CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@ -fpic -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM
76##########################################
77
78datadir = $(prefix)/share
79libexecdir = $(exec_prefix)/libexec
80localedir = $(datadir)/locale
81mandir = $(prefix)/man/man1
82
83COMPILE = $(CC) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(CFLAGS)
84LINK = $(CC) $(LDFLAGS) -o $@
85
86.SUFFIXES:
87.SUFFIXES: .c .o
88.c.o:
89 $(COMPILE) $<
90
91
92ANSI2KNR = @ANSI2KNR@
93o = .@U@o
94
95.SUFFIXES: ._c ._o
96.c._c:
97 ./ansi2knr $< > $*.tmp && mv $*.tmp $@
98._c._o:
99 @echo $(COMPILE) $<
100 @rm -f _$*.c
101 @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
102.c._o:
103 ./ansi2knr $< > $*.tmp && mv $*.tmp $*._c
104 @echo $(COMPILE) $*._c
105 @rm -f _$*.c
106 @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
107
108INCLUDES = -I../../../.. -I../.. -I../../lib -I.
109
110#############################################################################
111#
112# Uncomment (and possibly edit) the following lines if you wish
113# to use the GNU readline library for the input in mgquery
114#
115#READLINE = -DGNU_READLINE -I/opt/gnu/include/readline -L/opt/gnu/lib
116#READLINE_LIBS = -lreadline -ltermcap
117#
118#
119#############################################################################
120
121#############################################################################
122#
123# When working with the trec collection this should be uncommented.
124#
125# TREC_MODE = -DTREC_MODE
126#
127#
128#############################################################################
129
130SOURCES = \
131 backend.c locallib.c mg_weights_build.c \
132 bool_optimiser.c mg.special.c mgdictlist.c \
133 bool_parser.c mg_compression_dict.c mgquery.c \
134 bool_query.c mg_errors.c mgstat.c \
135 bool_tester.c mg_fast_comp_dict.c mg_decompress_text.c \
136 bool_tree.c mg_files.c query.docnums.c \
137 commands.c mg_hilite_words.c query.ranked.c \
138 comp_dict.c mg_invf_dict.c read_line.c \
139 environment.c mg_invf_dump.c stem_search.c \
140 mg_invf_merge.c stemmer.c mg_stem_idx.c \
141 mg_invf_rebuild.c term_lists.c mgstemidxlist.c \
142 invf_get.c mg_passes.c text.pass1.c \
143 ivf.pass1.c mg_perf_hash_build.c text.pass2.c \
144 ivf.pass2.c mg_text_estimate.c text_get.c \
145 lists.c mg_text_merge.c weights.c \
146 query_term_list.c words.c mg_passes_4jni.c
147
148HEADERS = \
149 backend.h conditions.h locallib.h term_lists.h \
150 bool_optimiser.h environment.h mg.h text.h \
151 bool_parser.h globals.h mg_errors.h text_get.h \
152 bool_query.h hash.h mg_files.h warranty.h \
153 bool_tree.h help.mg.h mg_merge.h weights.h \
154 build.h invf.h read_line.h words.h \
155 commands.h invf_get.h stem_search.h \
156 comp_dict.h lists.h stemmer.h \
157 query_term_list.h
158
159
160MISC = Makefile.in help.mg.src bool_parser.y warranty.src conditions.src
161
162ALLFILES = $(SOURCES) $(HEADERS) $(MISC) $(MAN)
163
164DISTFILES = $(ALLFILES)
165
166EXEC = mgquery mg_weights_build mgstat mg_invf_dump mg_invf_dict \
167 mg_invf_rebuild mgdictlist mg_passes mg_perf_hash_build \
168 mg_compression_dict mg_text_estimate mg_fast_comp_dict \
169 mg_hilite_words mg_invf_merge mg_text_merge bool_tester \
170 mg_stem_idx mgstemidxlist mg_decompress_text
171
172MAN = mgquery.1 mg_weights_build.1 mgstat.1 mg_invf_dump.1 mg_invf_dict.1 \
173 mg_invf_rebuild.1 mgdictlist.1 mg_passes.1 mg_perf_hash_build.1 \
174 mg_compression_dict.1 mg_text_estimate.1 mg_fast_comp_dict.1 \
175 mg_hilite_words.1 mg_invf_merge.1 mg_text_merge.1 \
176 mg_stem_idx.1 mgstemidxlist.1 mg_decompress_text.1
177
178# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
179
180
181all: $(EXEC) libmgtext.a libmgpass.a
182
183
184# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
185
186help.mg.h : help.mg.src
187 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
188
189warranty.h : warranty.src
190 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
191
192conditions.h : conditions.src
193 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
194
195
196# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
197
198HILITE_OBJS = mg_hilite_words$o stemmer$o locallib$o words$o environment$o
199
200mg_hilite_words: $(HILITE_OBJS)
201 $(LINK) $(HILITE_OBJS) $(LIBS)
202
203# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
204
205bool_parser.c: bool_parser.y
206 $(YACC) $?
207 mv y.tab.c $@
208
209BOOL_OBJS = bool_tester$o bool_tree$o bool_parser$o bool_optimiser$o \
210 term_lists$o stemmer$o stem_search$o mg_errors$o query_term_list$o \
211 words$o environment$o
212
213bool_tester: $(BOOL_OBJS)
214 $(LINK) $(BOOL_OBJS) $(LIBS)
215
216# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
217
218QUERY_OBJS = \
219 mgquery$o locallib$o lists$o \
220 query.ranked$o query.docnums$o stem_search$o \
221 environment$o commands$o weights$o text_get$o stemmer$o \
222 read_line$o mg_errors$o backend$o invf_get$o \
223 term_lists$o bool_tree$o bool_parser$o bool_optimiser$o bool_query$o \
224 query_term_list$o words$o
225
226mgquery: $(QUERY_OBJS)
227 $(LINK) $(READLINE) $(QUERY_OBJS) $(READLINE_LIBS) $(LIBS)
228
229commands$o : help.mg.h warranty.h conditions.h
230
231# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
232
233PASSES_OBJS = \
234 mg_passes$o text.pass1$o comp_dict$o stemmer$o \
235 text.pass2$o locallib$o \
236 ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o \
237 words$o environment$o
238
239mg_passes: $(PASSES_OBJS)
240 $(LINK) $(PASSES_OBJS) $(LIBS)
241
242# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
243
244WEIGHTS_BUILD_OBJS = mg_weights_build$o mg_files$o
245
246mg_weights_build: $(WEIGHTS_BUILD_OBJS)
247 $(LINK) $(WEIGHTS_BUILD_OBJS) $(LIBS)
248
249COMP_DICT_OBJS = mg_compression_dict$o mg_files$o locallib$o
250
251mg_compression_dict: $(COMP_DICT_OBJS)
252 $(LINK) $(COMP_DICT_OBJS) $(LIBS)
253
254FAST_COMP_OBJS = mg_fast_comp_dict$o mg_files$o locallib$o
255
256mg_fast_comp_dict: $(FAST_COMP_OBJS)
257 $(LINK) $(FAST_COMP_OBJS) $(LIBS)
258
259TEXT_EST_OBJS = mg_text_estimate$o locallib$o comp_dict$o mg_files$o
260
261mg_text_estimate: $(TEXT_EST_OBJS)
262 $(LINK) $(TEXT_EST_OBJS) $(LIBS)
263
264STAT_OBJS = mgstat$o mg_files$o locallib$o
265
266mgstat: $(STAT_OBJS)
267 $(LINK) $(STAT_OBJS) $(LIBS)
268
269INVF_DUMP_OBJS = mg_invf_dump$o locallib$o mg_files$o
270
271mg_invf_dump: $(INVF_DUMP_OBJS)
272 $(LINK) $(INVF_DUMP_OBJS) $(LIBS)
273
274INVF_DICT_OBJS = mg_invf_dict$o mg_files$o locallib$o
275
276mg_invf_dict: $(INVF_DICT_OBJS)
277 $(LINK) $(INVF_DICT_OBJS) $(LIBS)
278
279INVF_REB_OBJS = mg_invf_rebuild$o locallib$o
280
281mg_invf_rebuild: $(INVF_REB_OBJS)
282 $(LINK) $(INVF_REB_OBJS) $(LIBS)
283
284DICTLIST_OBJS = mgdictlist$o locallib$o
285
286mgdictlist: $(DICTLIST_OBJS)
287 $(LINK) $(DICTLIST_OBJS) $(LIBS)
288
289PERF_HASH_OBJS = mg_perf_hash_build$o mg_files$o
290
291mg_perf_hash_build: $(PERF_HASH_OBJS)
292 $(LINK) $(PERF_HASH_OBJS) $(LIBS)
293
294STEM_IDX_OBJS = \
295 mg_stem_idx$o mg_files$o stemmer$o locallib$o \
296 mg_errors$o term_lists$o
297
298mg_stem_idx: $(STEM_IDX_OBJS)
299 $(LINK) $(STEM_IDX_OBJS) $(LIBS)
300
301STEM_IDX_LIST_OBJS = mgstemidxlist$o mg_files$o
302
303mgstemidxlist: $(STEM_IDX_LIST_OBJS)
304 $(LINK) $(STEM_IDX_LIST_OBJS) $(LIBS)
305
306DECOMPRESS_TEXT_OBJS = \
307 mg_decompress_text.o query_term_list.o mg_files.o mg_errors.o \
308 text_get.o locallib.o backend.o stem_search.o \
309 term_lists.o stemmer.o weights.o invf_get.o lists.o
310
311mg_decompress_text: $(DECOMPRESS_TEXT_OBJS)
312 $(LINK) $(DECOMPRESS_TEXT_OBJS) $(LIBS)
313
314# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
315
316TEXT_MERGE_OBJS = mg_text_merge$o mg_files$o locallib$o
317
318mg_text_merge: $(TEXT_MERGE_OBJS)
319 $(LINK) $(TEXT_MERGE_OBJS) $(LIBS)
320
321INVF_MERGE_OBJS = mg_invf_merge$o mg_files$o locallib$o
322
323mg_invf_merge: $(INVF_MERGE_OBJS)
324 $(LINK) $(INVF_MERGE_OBJS) $(LIBS)
325
326# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
327
328ansi2knr: ansi2knr.o
329 $(LINK) ansi2knr.o $(LIBS)
330
331install: execinstall #maninstall
332uninstall: execuninstall manuninstall
333
334execinstall: $(EXEC)
335 $(top_srcdir)/mkinstalldirs $(bindir); \
336 for name in $(EXEC); do \
337 $(INSTALL_PROGRAM) $$name \
338 $(bindir)/`echo $$name | sed '$(transform)'`; \
339 done
340
341execuninstall:
342 for name in $(EXEC); do \
343 rm -f $(bindir)/`echo $$name | sed '$(transform)'`; \
344 done
345
346maninstall: $(MAN)
347 $(top_srcdir)/mkinstalldirs $(mandir); \
348 for f in $(MAN); do \
349 $(INSTALL_DATA) $$f $(mandir)/$$f ;\
350 done
351
352manuninstall: $(MAN)
353 for f in $(MAN); do \
354 rm -f $(mandir)/$$f ;\
355 done
356
357LIB_OBJS = \
358 query_term_list$o \
359 locallib$o lists$o \
360 query.ranked$o query.docnums$o stem_search$o \
361 environment$o commands$o weights$o text_get$o stemmer$o \
362 read_line$o mg_errors$o backend$o invf_get$o \
363 term_lists$o bool_tree$o bool_parser$o bool_optimiser$o \
364 bool_query$o words$o
365
366libmgtext.a: $(LIB_OBJS)
367 rm -f libmgtext.a
368 $(AR) cru libmgtext.a $(LIB_OBJS)
369 $(RANLIB) libmgtext.a
370
371JNI_LIB_OBJS = \
372 mg_passes_4jni$o text.pass1$o comp_dict$o stemmer$o \
373 text.pass2$o locallib$o words$o environment$o\
374 ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o
375
376libmgpass.a: $(JNI_LIB_OBJS)
377 rm -f libmgpass.a
378 $(AR) cru libmgpass.a $(JNI_LIB_OBJS)
379 $(RANLIB) libmgpass.a
380
381mostlyclean:
382 rm -f *$o _*.c _*.o *._c *._o core core.*
383
384clean: mostlyclean
385 rm -f $(EXEC) libmgtext.a libmgpass.a
386
387distclean: clean
388 rm -f ansi2knr
389 rm -f Makefile
390
391maintainer-clean: distclean
392 @echo "This command is intended only for maintainers to use;"
393 @echo "rebuilding the deleted files may require special tools."
394
395dist: $(DISTFILES)
396 for file in $(DISTFILES); do \
397 ln $(srcdir)/$$file $(distdir) 2> /dev/null \
398 || cp -p $(srcdir)/$$file $(distdir); \
399 done
400
401# Tell versions [3.59,3.63) of GNU make not to export all variables.
402# Otherwise a system limit (for SysV at least) may be exc
403
404
405
406
407
408
Note: See TracBrowser for help on using the repository browser.