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

Last change on this file since 30203 was 30203, checked in by ak19, 9 years ago

Propagating ARCH_DEP_FLAGS to allow successful GS compilation on the 32 bit Mac Leopard using a 64 bit JDK 6: -m64 flag needs to propagate into mg and mgpp to get JNI to work during runtime (with mg/mgpp collections using gdbm).

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