source: gsdl/trunk/trunk/mg/src/text/Makefile.in@ 16583

Last change on this file since 16583 was 16583, checked in by davidb, 16 years ago

Undoing change commited in r16582

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