source: main/branches/64_bit_Greenstone/greenstone2/common-src/indexers/mg/src/text/Makefile.in@ 23508

Last change on this file since 23508 was 23508, checked in by sjm84, 13 years ago

Committing 64 bit changes into the branch

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