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 |
|
---|
24 | PACKAGE = @PACKAGE@
|
---|
25 | VERSION = @VERSION@
|
---|
26 |
|
---|
27 | SHELL = /bin/sh
|
---|
28 | VPATH = @srcdir@
|
---|
29 | exec_prefix = @exec_prefix@
|
---|
30 | prefix = @prefix@
|
---|
31 | srcdir = @srcdir@
|
---|
32 | subdir = src/text
|
---|
33 | top_srcdir = @top_srcdir@
|
---|
34 | transform = @program_transform_name@
|
---|
35 |
|
---|
36 | AR = ar
|
---|
37 | CC = @CC@
|
---|
38 | CFLAGS = @CFLAGS@ -fpic
|
---|
39 | DEFS = @DEFS@
|
---|
40 | RANLIB = @RANLIB@
|
---|
41 | INSTALL = @INSTALL@
|
---|
42 | INSTALL_DATA = @INSTALL_DATA@
|
---|
43 | INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
---|
44 | LDFLAGS = @LDFLAGS@
|
---|
45 | LIBS = ../../lib/libmg.a @LIBS@
|
---|
46 | TOUCH = echo timestamp >
|
---|
47 | AWK = @AWK@
|
---|
48 | YACC = @YACC@
|
---|
49 | GSDLOS = @gsdlos@
|
---|
50 |
|
---|
51 | ##########################################
|
---|
52 | # Uncomment for compiling for the nzdl project
|
---|
53 | #
|
---|
54 | CFLAGS = @CFLAGS@ -fpic -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM
|
---|
55 | ##########################################
|
---|
56 |
|
---|
57 | bindir = $(exec_prefix)/bin
|
---|
58 | datadir = $(prefix)/share
|
---|
59 | libexecdir = $(exec_prefix)/libexec
|
---|
60 | localedir = $(datadir)/locale
|
---|
61 | mandir = $(prefix)/man/man1
|
---|
62 |
|
---|
63 | COMPILE = $(CC) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(CFLAGS)
|
---|
64 | LINK = $(CC) $(LDFLAGS) -o $@
|
---|
65 |
|
---|
66 | .SUFFIXES:
|
---|
67 | .SUFFIXES: .c .o
|
---|
68 | .c.o:
|
---|
69 | $(COMPILE) $<
|
---|
70 |
|
---|
71 |
|
---|
72 | ANSI2KNR = @ANSI2KNR@
|
---|
73 | o = .@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 |
|
---|
88 | INCLUDES = -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 |
|
---|
110 | SOURCES = \
|
---|
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 |
|
---|
128 | HEADERS = \
|
---|
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 |
|
---|
140 | MISC = Makefile.in help.mg.src bool_parser.y warranty.src conditions.src
|
---|
141 |
|
---|
142 | ALLFILES = $(SOURCES) $(HEADERS) $(MISC) $(MAN)
|
---|
143 |
|
---|
144 | DISTFILES = $(ALLFILES)
|
---|
145 |
|
---|
146 | EXEC = 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 |
|
---|
152 | MAN = 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 |
|
---|
161 | all: $(EXEC) libtextin.a libmgpass.a
|
---|
162 |
|
---|
163 |
|
---|
164 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
165 |
|
---|
166 | help.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 |
|
---|
169 | warranty.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 |
|
---|
172 | conditions.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 |
|
---|
178 | HILITE_OBJS = mg_hilite_words$o stemmer$o locallib$o words$o environment$o
|
---|
179 |
|
---|
180 | mg_hilite_words: $(HILITE_OBJS)
|
---|
181 | $(LINK) $(HILITE_OBJS) $(LIBS)
|
---|
182 |
|
---|
183 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
184 |
|
---|
185 | bool_parser.c: bool_parser.y
|
---|
186 | $(YACC) $?
|
---|
187 | mv y.tab.c $@
|
---|
188 |
|
---|
189 | BOOL_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 |
|
---|
193 | bool_tester: $(BOOL_OBJS)
|
---|
194 | $(LINK) $(BOOL_OBJS) $(LIBS)
|
---|
195 |
|
---|
196 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
197 |
|
---|
198 | QUERY_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 |
|
---|
206 | mgquery: $(QUERY_OBJS)
|
---|
207 | $(LINK) $(READLINE) $(QUERY_OBJS) $(READLINE_LIBS) $(LIBS)
|
---|
208 |
|
---|
209 | commands$o : help.mg.h warranty.h conditions.h
|
---|
210 |
|
---|
211 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
212 |
|
---|
213 | PASSES_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 |
|
---|
219 | mg_passes: $(PASSES_OBJS)
|
---|
220 | $(LINK) $(PASSES_OBJS) $(LIBS)
|
---|
221 |
|
---|
222 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
223 |
|
---|
224 | WEIGHTS_BUILD_OBJS = mg_weights_build$o mg_files$o
|
---|
225 |
|
---|
226 | mg_weights_build: $(WEIGHTS_BUILD_OBJS)
|
---|
227 | $(LINK) $(WEIGHTS_BUILD_OBJS) $(LIBS)
|
---|
228 |
|
---|
229 | COMP_DICT_OBJS = mg_compression_dict$o mg_files$o locallib$o
|
---|
230 |
|
---|
231 | mg_compression_dict: $(COMP_DICT_OBJS)
|
---|
232 | $(LINK) $(COMP_DICT_OBJS) $(LIBS)
|
---|
233 |
|
---|
234 | FAST_COMP_OBJS = mg_fast_comp_dict$o mg_files$o locallib$o
|
---|
235 |
|
---|
236 | mg_fast_comp_dict: $(FAST_COMP_OBJS)
|
---|
237 | $(LINK) $(FAST_COMP_OBJS) $(LIBS)
|
---|
238 |
|
---|
239 | TEXT_EST_OBJS = mg_text_estimate$o locallib$o comp_dict$o mg_files$o
|
---|
240 |
|
---|
241 | mg_text_estimate: $(TEXT_EST_OBJS)
|
---|
242 | $(LINK) $(TEXT_EST_OBJS) $(LIBS)
|
---|
243 |
|
---|
244 | STAT_OBJS = mgstat$o mg_files$o locallib$o
|
---|
245 |
|
---|
246 | mgstat: $(STAT_OBJS)
|
---|
247 | $(LINK) $(STAT_OBJS) $(LIBS)
|
---|
248 |
|
---|
249 | INVF_DUMP_OBJS = mg_invf_dump$o locallib$o mg_files$o
|
---|
250 |
|
---|
251 | mg_invf_dump: $(INVF_DUMP_OBJS)
|
---|
252 | $(LINK) $(INVF_DUMP_OBJS) $(LIBS)
|
---|
253 |
|
---|
254 | INVF_DICT_OBJS = mg_invf_dict$o mg_files$o locallib$o
|
---|
255 |
|
---|
256 | mg_invf_dict: $(INVF_DICT_OBJS)
|
---|
257 | $(LINK) $(INVF_DICT_OBJS) $(LIBS)
|
---|
258 |
|
---|
259 | INVF_REB_OBJS = mg_invf_rebuild$o locallib$o
|
---|
260 |
|
---|
261 | mg_invf_rebuild: $(INVF_REB_OBJS)
|
---|
262 | $(LINK) $(INVF_REB_OBJS) $(LIBS)
|
---|
263 |
|
---|
264 | DICTLIST_OBJS = mgdictlist$o locallib$o
|
---|
265 |
|
---|
266 | mgdictlist: $(DICTLIST_OBJS)
|
---|
267 | $(LINK) $(DICTLIST_OBJS) $(LIBS)
|
---|
268 |
|
---|
269 | PERF_HASH_OBJS = mg_perf_hash_build$o mg_files$o
|
---|
270 |
|
---|
271 | mg_perf_hash_build: $(PERF_HASH_OBJS)
|
---|
272 | $(LINK) $(PERF_HASH_OBJS) $(LIBS)
|
---|
273 |
|
---|
274 | STEM_IDX_OBJS = \
|
---|
275 | mg_stem_idx$o mg_files$o stemmer$o locallib$o \
|
---|
276 | mg_errors$o term_lists$o
|
---|
277 |
|
---|
278 | mg_stem_idx: $(STEM_IDX_OBJS)
|
---|
279 | $(LINK) $(STEM_IDX_OBJS) $(LIBS)
|
---|
280 |
|
---|
281 | STEM_IDX_LIST_OBJS = mgstemidxlist$o mg_files$o
|
---|
282 |
|
---|
283 | mgstemidxlist: $(STEM_IDX_LIST_OBJS)
|
---|
284 | $(LINK) $(STEM_IDX_LIST_OBJS) $(LIBS)
|
---|
285 |
|
---|
286 | DECOMPRESS_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 |
|
---|
291 | mg_decompress_text: $(DECOMPRESS_TEXT_OBJS)
|
---|
292 | $(LINK) $(DECOMPRESS_TEXT_OBJS) $(LIBS)
|
---|
293 |
|
---|
294 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
295 |
|
---|
296 | TEXT_MERGE_OBJS = mg_text_merge$o mg_files$o locallib$o
|
---|
297 |
|
---|
298 | mg_text_merge: $(TEXT_MERGE_OBJS)
|
---|
299 | $(LINK) $(TEXT_MERGE_OBJS) $(LIBS)
|
---|
300 |
|
---|
301 | INVF_MERGE_OBJS = mg_invf_merge$o mg_files$o locallib$o
|
---|
302 |
|
---|
303 | mg_invf_merge: $(INVF_MERGE_OBJS)
|
---|
304 | $(LINK) $(INVF_MERGE_OBJS) $(LIBS)
|
---|
305 |
|
---|
306 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
307 |
|
---|
308 | ansi2knr: ansi2knr.o
|
---|
309 | $(LINK) ansi2knr.o $(LIBS)
|
---|
310 |
|
---|
311 | install: execinstall #maninstall
|
---|
312 | uninstall: execuninstall manuninstall
|
---|
313 |
|
---|
314 | execinstall: $(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 |
|
---|
321 | execuninstall:
|
---|
322 | for name in $(EXEC); do \
|
---|
323 | rm -f $(bindir)/`echo $$name | sed '$(transform)'`; \
|
---|
324 | done
|
---|
325 |
|
---|
326 | maninstall: $(MAN)
|
---|
327 | $(top_srcdir)/mkinstalldirs $(mandir); \
|
---|
328 | for f in $(MAN); do \
|
---|
329 | $(INSTALL_DATA) $$f $(mandir)/$$f ;\
|
---|
330 | done
|
---|
331 |
|
---|
332 | manuninstall: $(MAN)
|
---|
333 | for f in $(MAN); do \
|
---|
334 | rm -f $(mandir)/$$f ;\
|
---|
335 | done
|
---|
336 |
|
---|
337 | LIB_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 |
|
---|
346 | libtextin.a: $(LIB_OBJS)
|
---|
347 | rm -f libtextin.a
|
---|
348 | $(AR) cru libtextin.a $(LIB_OBJS)
|
---|
349 | $(RANLIB) libtextin.a
|
---|
350 |
|
---|
351 | JNI_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 |
|
---|
356 | libmgpass.a: $(JNI_LIB_OBJS)
|
---|
357 | rm -f libmgpass.a
|
---|
358 | $(AR) cru libmgpass.a $(JNI_LIB_OBJS)
|
---|
359 | $(RANLIB) libmgpass.a
|
---|
360 |
|
---|
361 | mostlyclean:
|
---|
362 | rm -f *$o _*.c _*.o *._c *._o core core.*
|
---|
363 |
|
---|
364 | clean: mostlyclean
|
---|
365 | rm -f $(EXEC) libtextin.a libmgpass.a
|
---|
366 |
|
---|
367 | distclean: clean
|
---|
368 | rm -f ansi2knr
|
---|
369 | rm -f Makefile
|
---|
370 |
|
---|
371 | maintainer-clean: distclean
|
---|
372 | @echo "This command is intended only for maintainers to use;"
|
---|
373 | @echo "rebuilding the deleted files may require special tools."
|
---|
374 |
|
---|
375 | dist: $(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 |
|
---|