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