source: main/trunk/greenstone2/common-src/indexers/mgpp/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:keywords set to Author Date Id Revision
File size: 10.4 KB
Line 
1###########################################################################
2#
3# Makefile.in -- Makefile for the MGPP 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
27UNAC_DIR = @UNAC_DIR@
28
29ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
30ifeq ($(ENABLE_ACCENTFOLD), 1)
31AFLIBS = $(UNAC_DIR)/libunac.a
32AFINCLUDES = -I$(UNAC_DIR)
33AFFLAGS = -DENABLE_ACCENTFOLD
34else
35AFLIBS =
36AFINCLUDES =
37AFFLAGS =
38endif
39
40USE_GDBM = @USE_GDBM@
41ifeq ($(USE_GDBM), 1)
42GDBM_DEFINES = -DUSE_GDBM
43else
44GDBM_DEFINES =
45endif
46
47USE_JDBM = @USE_JDBM@
48ifeq ($(USE_JDBM), 1)
49JDBM_DEFINES = -DUSE_JDBM
50else
51JDBM_DEFINES =
52endif
53
54USE_SQLITE = @USE_SQLITE@
55ifeq ($(USE_SQLITE), 1)
56SQLITE_DEFINES = -DUSE_SQLITE
57else
58SQLITE_DEFINES =
59endif
60
61SHELL = /bin/sh
62VPATH = @srcdir@
63exec_prefix = @exec_prefix@
64prefix = @prefix@
65bindir = @bindir@
66srcdir = @srcdir@
67libdir = @libdir@
68subdir = text
69top_srcdir = @top_srcdir@
70transform = @program_transform_name@
71
72AR = ar
73CC = @CC@
74CXX = @CXX@
75CFLAGS = @CFLAGS@ @COMPAT32BITFLAGS@ -ansi -fPIC -DSILENT -DSHORT_SUFFIX $(AFFLAGS)
76CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@ -fPIC -DSILENT -DSHORT_SUFFIX $(AFFLAGS)
77DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
78RANLIB = @RANLIB@
79INSTALL = @INSTALL@
80INSTALL_DATA = @INSTALL_DATA@
81INSTALL_PROGRAM = @INSTALL_PROGRAM@
82LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
83LIBS = ../lib/libmgpplib.a $(AFLIBS) -lstdc++ ../../../packages/iconv/lib/libiconv.a @LIBS@
84TOUCH = echo timestamp >
85AWK = @AWK@
86GSDLOS = @gsdlos@
87
88datadir = $(prefix)/share
89libexecdir = $(exec_prefix)/libexec
90localedir = $(datadir)/locale
91mandir = $(prefix)/man/man1
92
93COMPILE = $(CC) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(CFLAGS)
94CXXCOMPILE = $(CXX) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(CXXFLAGS)
95LINK = $(CXX) $(LDFLAGS) -o $@
96
97.SUFFIXES:
98.SUFFIXES: .c .o
99.c.o:
100 $(COMPILE) $<
101
102.SUFFIXES: .cpp .o
103.cpp.o:
104 $(CXXCOMPILE) $<
105
106
107ANSI2KNR = @ANSI2KNR@
108o = .@U@o
109
110.SUFFIXES: ._c ._o
111.c._c:
112 ./ansi2knr $< > $*.tmp && mv $*.tmp $@
113._c._o:
114 @echo $(COMPILE) $<
115 @rm -f _$*.c
116 @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
117.c._o:
118 ./ansi2knr $< > $*.tmp && mv $*.tmp $*._c
119 @echo $(COMPILE) $*._c
120 @rm -f _$*.c
121 @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
122
123INCLUDES = -I.. -I../lib -I. $(AFINCLUDES)
124
125#############################################################################
126#
127# Uncomment (and possibly edit) the following lines if you wish
128# to use the GNU readline library for the input in mgquery
129#
130#READLINE = -DGNU_READLINE -I/opt/gnu/include/readline -L/opt/gnu/lib
131#READLINE_LIBS = -lreadline -ltermcap
132#
133#
134#############################################################################
135
136SOURCES = \
137 FIvfLevelInfo.cpp ivf.pass1.cpp mgpp_invf_dump.cpp \
138 FText.cpp ivf.pass2.cpp mgpp_passes.cpp \
139 FileBuf.cpp locallib.cpp mgpp_perf_hash_build.cpp \
140 FragLevelConvert.cpp mg.special.cpp mgpp_stem_idx.cpp \
141 IndexData.cpp mgpp_compression_dict.cpp mgpp_weights_build.cpp \
142 TagInfo.cpp mgpp_decompress_text.cpp stemmer.cpp \
143 TextEl.cpp mg_errors.cpp text.cpp \
144 TextGet.cpp mgpp_fast_comp_dict.cpp text.pass1.cpp \
145 UCArray.cpp mg_files.cpp text.pass2.cpp \
146 comp_dict.cpp mgpp_invf_dict.cpp words.cpp \
147 invf.cpp mgpp_invf_dict_dump.cpp Weights.cpp \
148 MGQuery.cpp Terms.cpp QueryTester.cpp \
149 QueryLex.cpp QueryParser.cpp \
150 GSDLQueryLex.cpp GSDLQueryParser.cpp Queryer.cpp \
151 mgpp_passes_4jni.cpp
152
153
154HEADERS = \
155 FIvfLevelInfo.h TextEl.h hash.h stemmer.h \
156 FText.h TextGet.h invf.h text.h \
157 FileBuf.h UCArray.h locallib.h words.h \
158 FragLevelConvert.h WordData.h mg.h \
159 IndexData.h build.h mg_errors.h \
160 TagInfo.h comp_dict.h mg_files.h Weights.h \
161 MGQuery.h Terms.h QueryLex.h QueryParser.h \
162 GSDLQueryLex.h GSDLQueryParser.h mgpp_passes_4jni.h
163
164
165MISC = Makefile.in
166
167ALLFILES = $(SOURCES) $(HEADERS) $(MISC) $(MAN)
168
169DISTFILES = $(ALLFILES)
170
171EXEC = mgpp_passes mgpp_decompress_text mgpp_perf_hash_build \
172 mgpp_invf_dump mgpp_weights_build mgpp_invf_dict mgpp_stem_idx \
173 mgpp_invf_dict_dump mgpp_compression_dict mgpp_fast_comp_dict \
174 QueryTester Queryer
175
176MAN = mgpp_weights_build.1 mgpp_invf_dict.1 \
177 mgpp_passes.1 mgpp_perf_hash_build.1 \
178 mgpp_compression_dict.1 mgpp_fast_comp_dict.1 \
179 mgpp_stem_idx.1
180
181# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
182
183
184all: $(EXEC) libmgpptext.a libmgpppass.a
185
186depend:
187 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) $(CFLAGS) -- $(SOURCES)
188
189# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
190
191
192PASSES_OBJS = \
193 mgpp_passes$o text.pass1$o comp_dict$o \
194 text.pass2$o locallib$o \
195 ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o \
196 words$o invf$o FileBuf$o TextEl$o UCArray$o TagInfo$o \
197 FText$o text$o FIvfLevelInfo$o
198
199mgpp_passes: $(PASSES_OBJS)
200 $(LINK) $(PASSES_OBJS) $(LIBS)
201
202# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
203
204QUERYER_OBJS = Queryer$o mg_files$o mg_errors$o locallib$o invf$o UCArray$o \
205 FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
206 IndexData$o stemmer$o Weights$o TextGet$o text$o FText$o \
207 GSDLQueryParser$o GSDLQueryLex$o words$o
208
209Queryer: $(QUERYER_OBJS)
210 $(LINK) $(QUERYER_OBJS) $(LIBS)
211
212QUERY_TESTER_OBJS = QueryTester$o mg_files$o invf$o UCArray$o \
213 FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
214 IndexData$o stemmer$o Weights$o
215
216QueryTester: $(QUERY_TESTER_OBJS)
217 $(LINK) $(QUERY_TESTER_OBJS) $(LIBS)
218
219WEIGHTS_BUILD_OBJS = mgpp_weights_build$o mg_files$o invf$o UCArray$o \
220 FIvfLevelInfo$o FragLevelConvert$o
221
222mgpp_weights_build: $(WEIGHTS_BUILD_OBJS)
223 $(LINK) $(WEIGHTS_BUILD_OBJS) $(LIBS)
224
225COMP_DICT_OBJS = mgpp_compression_dict$o mg_files$o locallib$o
226
227mgpp_compression_dict: $(COMP_DICT_OBJS)
228 $(LINK) $(COMP_DICT_OBJS) $(LIBS)
229
230FAST_COMP_OBJS = mgpp_fast_comp_dict$o mg_files$o locallib$o
231
232mgpp_fast_comp_dict: $(FAST_COMP_OBJS)
233 $(LINK) $(FAST_COMP_OBJS) $(LIBS)
234
235INVF_DUMP_OBJS = mgpp_invf_dump$o locallib$o mg_files$o invf$o UCArray$o
236
237mgpp_invf_dump: $(INVF_DUMP_OBJS)
238 $(LINK) $(INVF_DUMP_OBJS) $(LIBS)
239
240INVF_DICT_OBJS = mgpp_invf_dict$o mg_files$o invf$o UCArray$o
241
242mgpp_invf_dict: $(INVF_DICT_OBJS)
243 $(LINK) $(INVF_DICT_OBJS) $(LIBS)
244
245INVF_DICT_DUMP_OBJS = mgpp_invf_dict_dump$o mg_files$o invf$o UCArray$o
246
247mgpp_invf_dict_dump: $(INVF_DICT_DUMP_OBJS)
248 $(LINK) $(INVF_DICT_DUMP_OBJS) $(LIBS)
249
250PERF_HASH_OBJS = mgpp_perf_hash_build$o mg_files$o invf$o UCArray$o
251
252mgpp_perf_hash_build: $(PERF_HASH_OBJS)
253 $(LINK) $(PERF_HASH_OBJS) $(LIBS)
254
255STEM_IDX_OBJS = mgpp_stem_idx$o mg_files$o stemmer$o \
256 invf$o UCArray$o
257
258mgpp_stem_idx: $(STEM_IDX_OBJS)
259 $(LINK) $(STEM_IDX_OBJS) $(LIBS)
260
261DECOMPRESS_TEXT_OBJS = \
262 mgpp_decompress_text$o mg_files$o mg_errors$o \
263 locallib$o text$o UCArray$o TextGet$o FText$o
264
265mgpp_decompress_text: $(DECOMPRESS_TEXT_OBJS)
266 $(LINK) $(DECOMPRESS_TEXT_OBJS) $(LIBS)
267
268# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
269
270ansi2knr: ansi2knr.o
271 $(LINK) ansi2knr.o $(LIBS)
272
273install: execinstall
274uninstall: execuninstall
275
276execinstall: $(EXEC)
277 ../mkinstalldirs $(bindir); \
278 for name in $(EXEC); do \
279 $(INSTALL_PROGRAM) $$name \
280 $(bindir)/`echo $$name | sed '$(transform)'`; \
281 done
282
283execuninstall:
284 for name in $(EXEC); do \
285 rm -f $(bindir)/`echo $$name | sed '$(transform)'`; \
286 done
287
288maninstall: $(MAN)
289 $(top_srcdir)/mkinstalldirs $(mandir); \
290 for f in $(MAN); do \
291 $(INSTALL_DATA) $$f $(mandir)/$$f ;\
292 done
293
294manuninstall: $(MAN)
295 for f in $(MAN); do \
296 rm -f $(mandir)/$$f ;\
297 done
298
299LIB_OBJS = mg_files$o mg_errors$o locallib$o invf$o UCArray$o \
300 FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
301 IndexData$o stemmer$o Weights$o TextGet$o text$o FText$o \
302 GSDLQueryParser$o GSDLQueryLex$o words$o
303
304libmgpptext.a: $(LIB_OBJS)
305 rm -f libmgpptext.a
306 $(AR) cru libmgpptext.a $(LIB_OBJS)
307 $(RANLIB) libmgpptext.a
308
309JNI_LIB_OBJS = \
310 mgpp_passes_4jni$o text.pass1$o comp_dict$o \
311 text.pass2$o locallib$o \
312 ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o \
313 words$o invf$o FileBuf$o TextEl$o UCArray$o TagInfo$o \
314 FText$o text$o FIvfLevelInfo$o
315
316libmgpppass.a: $(JNI_LIB_OBJS)
317 rm -f libmgpppass.a
318 $(AR) cru libmgpppass.a $(JNI_LIB_OBJS)
319 $(RANLIB) libmgpppass.a
320
321mostlyclean:
322 rm -f *$o _*.c _*.o *._c *._o core core.*
323
324clean: mostlyclean
325 rm -f $(EXEC) libmgpptext.a libmgpppass.a
326
327distclean: clean
328 rm -f ansi2knr
329 rm -f Makefile
330
331maintainer-clean: distclean
332 @echo "This command is intended only for maintainers to use;"
333 @echo "rebuilding the deleted files may require special tools."
334
335dist: $(DISTFILES)
336 for file in $(DISTFILES); do \
337 ln $(srcdir)/$$file $(distdir) 2> /dev/null \
338 || cp -p $(srcdir)/$$file $(distdir); \
339 done
340
341movclean:
342 for file in $(SOURCES); do \
343 test = $$file; \
344 echo $("test.c"##*.c); \
345 done
346
347
348# Tell versions [3.59,3.63) of GNU make not to export all variables.
349# Otherwise a system limit (for SysV at least) may be exc
350
351
Note: See TracBrowser for help on using the repository browser.