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 = text
|
---|
33 | top_srcdir = @top_srcdir@
|
---|
34 | transform = @program_transform_name@
|
---|
35 |
|
---|
36 | AR = ar
|
---|
37 | CC = @CC@
|
---|
38 | CPP = @CXX@
|
---|
39 | ifneq ($(NZDL),1)
|
---|
40 | CFLAGS = @CFLAGS@ -ansi -g -Wall -Wunused -pedantic -W -Woverloaded-virtual
|
---|
41 | CPPFLAGS = @CPPFLAGS@ -ansi -g -Wall -Wunused -pedantic -W -Woverloaded-virtual
|
---|
42 | else
|
---|
43 | CFLAGS = @CFLAGS@ -ansi -Wall -Wunused -pedantic -W -Woverloaded-virtual -g -DSILENT -DSHORT_SUFFIX
|
---|
44 | CPPFLAGS = @CPPFLAGS@ -ansi -Wall -Wunused -pedantic -W -Woverloaded-virtual -g -DSILENT -DSHORT_SUFFIX
|
---|
45 | endif
|
---|
46 | DEFS = @DEFS@
|
---|
47 | RANLIB = @RANLIB@
|
---|
48 | INSTALL = @INSTALL@
|
---|
49 | INSTALL_DATA = @INSTALL_DATA@
|
---|
50 | INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
---|
51 | LDFLAGS = @LDFLAGS@
|
---|
52 | LIBS = ../lib/libmg.a -lstdc++ @LIBS@
|
---|
53 | TOUCH = echo timestamp >
|
---|
54 | AWK = @AWK@
|
---|
55 |
|
---|
56 | ##########################################
|
---|
57 | # George Buchanan - August 1999
|
---|
58 | #
|
---|
59 | # compiling with make NZDL=1 to ensure that
|
---|
60 | # the NZDL compile mode is used
|
---|
61 | #
|
---|
62 | ##########################################
|
---|
63 |
|
---|
64 |
|
---|
65 | bindir = $(exec_prefix)/bin
|
---|
66 | datadir = $(prefix)/share
|
---|
67 | libexecdir = $(exec_prefix)/libexec
|
---|
68 | localedir = $(datadir)/locale
|
---|
69 | mandir = $(prefix)/man/man1
|
---|
70 |
|
---|
71 | COMPILE = $(CC) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
---|
72 | CPPCOMPILE = $(CPP) -c $(DEFS) $(TREC_MODE) $(READLINE) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
---|
73 | LINK = $(CC) $(LDFLAGS) -o $@
|
---|
74 |
|
---|
75 | .SUFFIXES:
|
---|
76 | .SUFFIXES: .c .o
|
---|
77 | .c.o:
|
---|
78 | $(COMPILE) $<
|
---|
79 |
|
---|
80 | .SUFFIXES: .cpp .o
|
---|
81 | .cpp.o:
|
---|
82 | $(CPPCOMPILE) -D__cplusplus $<
|
---|
83 |
|
---|
84 |
|
---|
85 | ANSI2KNR = @ANSI2KNR@
|
---|
86 | o = .@U@o
|
---|
87 |
|
---|
88 | .SUFFIXES: ._c ._o
|
---|
89 | .c._c:
|
---|
90 | ./ansi2knr $< > $*.tmp && mv $*.tmp $@
|
---|
91 | ._c._o:
|
---|
92 | @echo $(COMPILE) $<
|
---|
93 | @rm -f _$*.c
|
---|
94 | @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
|
---|
95 | .c._o:
|
---|
96 | ./ansi2knr $< > $*.tmp && mv $*.tmp $*._c
|
---|
97 | @echo $(COMPILE) $*._c
|
---|
98 | @rm -f _$*.c
|
---|
99 | @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
|
---|
100 |
|
---|
101 | INCLUDES = -I../ -I../lib -I.
|
---|
102 |
|
---|
103 | #############################################################################
|
---|
104 | #
|
---|
105 | # Uncomment (and possibly edit) the following lines if you wish
|
---|
106 | # to use the GNU readline library for the input in mgquery
|
---|
107 | #
|
---|
108 | #READLINE = -DGNU_READLINE -I/opt/gnu/include/readline -L/opt/gnu/lib
|
---|
109 | #READLINE_LIBS = -lreadline -ltermcap
|
---|
110 | #
|
---|
111 | #
|
---|
112 | #############################################################################
|
---|
113 |
|
---|
114 | SOURCES = \
|
---|
115 | FIvfLevelInfo.cpp ivf.pass1.cpp mg_invf_dump.cpp \
|
---|
116 | FText.cpp ivf.pass2.cpp mg_passes.cpp \
|
---|
117 | FileBuf.cpp locallib.cpp mg_perf_hash_build.cpp \
|
---|
118 | FragLevelConvert.cpp mg.special.cpp mg_stem_idx.cpp \
|
---|
119 | IndexData.cpp mg_compression_dict.cpp mg_weights_build.cpp \
|
---|
120 | TagInfo.cpp mg_decompress_text.cpp stemmer.cpp \
|
---|
121 | TextEl.cpp mg_errors.cpp text.cpp \
|
---|
122 | TextGet.cpp mg_fast_comp_dict.cpp text.pass1.cpp \
|
---|
123 | UCArray.cpp mg_files.cpp text.pass2.cpp \
|
---|
124 | comp_dict.cpp mg_invf_dict.cpp words.cpp \
|
---|
125 | invf.cpp mg_invf_dict_dump.cpp Weights.cpp \
|
---|
126 | MGQuery.cpp Terms.cpp QueryTester.cpp \
|
---|
127 | QueryLex.cpp QueryParser.cpp Queryer.cpp
|
---|
128 |
|
---|
129 |
|
---|
130 | HEADERS = \
|
---|
131 | FIvfLevelInfo.h TextEl.h hash.h stemmer.h \
|
---|
132 | FText.h TextGet.h invf.h text.h \
|
---|
133 | FileBuf.h UCArray.h locallib.h words.h \
|
---|
134 | FragLevelConvert.h WordData.h mg.h \
|
---|
135 | IndexData.h build.h mg_errors.h \
|
---|
136 | TagInfo.h comp_dict.h mg_files.h Weights.h \
|
---|
137 | MGQuery.h Terms.h QueryLex.h QueryParser.h
|
---|
138 |
|
---|
139 |
|
---|
140 | MISC = Makefile.in
|
---|
141 |
|
---|
142 | ALLFILES = $(SOURCES) $(HEADERS) $(MISC) $(MAN)
|
---|
143 |
|
---|
144 | DISTFILES = $(ALLFILES)
|
---|
145 |
|
---|
146 | EXEC = mg_passes mg_decompress_text mg_perf_hash_build \
|
---|
147 | mg_invf_dump mg_weights_build mg_invf_dict mg_stem_idx \
|
---|
148 | mg_invf_dict_dump mg_compression_dict mg_fast_comp_dict \
|
---|
149 | QueryTester Queryer
|
---|
150 |
|
---|
151 | MAN = mg_weights_build.1 mg_invf_dict.1 \
|
---|
152 | mg_passes.1 mg_perf_hash_build.1 \
|
---|
153 | mg_compression_dict.1 mg_fast_comp_dict.1 \
|
---|
154 | mg_stem_idx.1
|
---|
155 |
|
---|
156 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
157 |
|
---|
158 |
|
---|
159 | all: $(EXEC) libtextin.a
|
---|
160 |
|
---|
161 | depend:
|
---|
162 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -- $(SOURCES)
|
---|
163 |
|
---|
164 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
165 |
|
---|
166 |
|
---|
167 | PASSES_OBJS = \
|
---|
168 | mg_passes$o text.pass1$o comp_dict$o \
|
---|
169 | text.pass2$o locallib$o \
|
---|
170 | ivf.pass1$o ivf.pass2$o mg.special$o mg_files$o \
|
---|
171 | words$o invf$o FileBuf$o TextEl$o UCArray$o TagInfo$o \
|
---|
172 | FText$o text$o FIvfLevelInfo$o
|
---|
173 |
|
---|
174 | mg_passes: $(PASSES_OBJS)
|
---|
175 | $(LINK) $(PASSES_OBJS) $(LIBS)
|
---|
176 |
|
---|
177 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
178 |
|
---|
179 | QUERYER_OBJS = Queryer$o mg_files$o mg_errors$o locallib$o invf$o UCArray$o \
|
---|
180 | FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
|
---|
181 | IndexData$o stemmer$o Weights$o TextGet$o text$o FText$o \
|
---|
182 | QueryParser$o QueryLex$o words$o
|
---|
183 |
|
---|
184 | Queryer: $(QUERYER_OBJS)
|
---|
185 | $(LINK) $(QUERYER_OBJS) $(LIBS)
|
---|
186 |
|
---|
187 | QUERY_TESTER_OBJS = QueryTester$o mg_files$o invf$o UCArray$o \
|
---|
188 | FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
|
---|
189 | IndexData$o stemmer$o Weights$o
|
---|
190 |
|
---|
191 | QueryTester: $(QUERY_TESTER_OBJS)
|
---|
192 | $(LINK) $(QUERY_TESTER_OBJS) $(LIBS)
|
---|
193 |
|
---|
194 | WEIGHTS_BUILD_OBJS = mg_weights_build$o mg_files$o invf$o UCArray$o \
|
---|
195 | FIvfLevelInfo$o FragLevelConvert$o
|
---|
196 |
|
---|
197 | mg_weights_build: $(WEIGHTS_BUILD_OBJS)
|
---|
198 | $(LINK) $(WEIGHTS_BUILD_OBJS) $(LIBS)
|
---|
199 |
|
---|
200 | COMP_DICT_OBJS = mg_compression_dict$o mg_files$o locallib$o
|
---|
201 |
|
---|
202 | mg_compression_dict: $(COMP_DICT_OBJS)
|
---|
203 | $(LINK) $(COMP_DICT_OBJS) $(LIBS)
|
---|
204 |
|
---|
205 | FAST_COMP_OBJS = mg_fast_comp_dict$o mg_files$o locallib$o
|
---|
206 |
|
---|
207 | mg_fast_comp_dict: $(FAST_COMP_OBJS)
|
---|
208 | $(LINK) $(FAST_COMP_OBJS) $(LIBS)
|
---|
209 |
|
---|
210 | INVF_DUMP_OBJS = mg_invf_dump$o locallib$o mg_files$o invf$o UCArray$o
|
---|
211 |
|
---|
212 | mg_invf_dump: $(INVF_DUMP_OBJS)
|
---|
213 | $(LINK) $(INVF_DUMP_OBJS) $(LIBS)
|
---|
214 |
|
---|
215 | INVF_DICT_OBJS = mg_invf_dict$o mg_files$o invf$o UCArray$o
|
---|
216 |
|
---|
217 | mg_invf_dict: $(INVF_DICT_OBJS)
|
---|
218 | $(LINK) $(INVF_DICT_OBJS) $(LIBS)
|
---|
219 |
|
---|
220 | INVF_DICT_DUMP_OBJS = mg_invf_dict_dump$o mg_files$o invf$o UCArray$o
|
---|
221 |
|
---|
222 | mg_invf_dict_dump: $(INVF_DICT_DUMP_OBJS)
|
---|
223 | $(LINK) $(INVF_DICT_DUMP_OBJS) $(LIBS)
|
---|
224 |
|
---|
225 | PERF_HASH_OBJS = mg_perf_hash_build$o mg_files$o invf$o UCArray$o
|
---|
226 |
|
---|
227 | mg_perf_hash_build: $(PERF_HASH_OBJS)
|
---|
228 | $(LINK) $(PERF_HASH_OBJS) $(LIBS)
|
---|
229 |
|
---|
230 | STEM_IDX_OBJS = mg_stem_idx$o mg_files$o stemmer$o \
|
---|
231 | invf$o UCArray$o
|
---|
232 |
|
---|
233 | mg_stem_idx: $(STEM_IDX_OBJS)
|
---|
234 | $(LINK) $(STEM_IDX_OBJS) $(LIBS)
|
---|
235 |
|
---|
236 | DECOMPRESS_TEXT_OBJS = \
|
---|
237 | mg_decompress_text$o mg_files$o mg_errors$o \
|
---|
238 | locallib$o text$o UCArray$o TextGet$o FText$o
|
---|
239 |
|
---|
240 | mg_decompress_text: $(DECOMPRESS_TEXT_OBJS)
|
---|
241 | $(LINK) $(DECOMPRESS_TEXT_OBJS) $(LIBS)
|
---|
242 |
|
---|
243 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
244 |
|
---|
245 | ansi2knr: ansi2knr.o
|
---|
246 | $(LINK) ansi2knr.o $(LIBS)
|
---|
247 |
|
---|
248 | install: execinstall maninstall
|
---|
249 | uninstall: execuninstall manuninstall
|
---|
250 |
|
---|
251 | execinstall: $(EXEC)
|
---|
252 | $(top_srcdir)/mkinstalldirs $(bindir); \
|
---|
253 | for name in $(EXEC); do \
|
---|
254 | $(INSTALL_PROGRAM) $$name \
|
---|
255 | $(bindir)/`echo $$name | sed '$(transform)'`; \
|
---|
256 | done
|
---|
257 |
|
---|
258 | execuninstall:
|
---|
259 | for name in $(EXEC); do \
|
---|
260 | rm -f $(bindir)/`echo $$name | sed '$(transform)'`; \
|
---|
261 | done
|
---|
262 |
|
---|
263 | maninstall: $(MAN)
|
---|
264 | $(top_srcdir)/mkinstalldirs $(mandir); \
|
---|
265 | for f in $(MAN); do \
|
---|
266 | $(INSTALL_DATA) $$f $(mandir)/$$f ;\
|
---|
267 | done
|
---|
268 |
|
---|
269 | manuninstall: $(MAN)
|
---|
270 | for f in $(MAN); do \
|
---|
271 | rm -f $(mandir)/$$f ;\
|
---|
272 | done
|
---|
273 |
|
---|
274 |
|
---|
275 | LIB_OBJS = Queryer$o mg_files$o mg_errors$o locallib$o invf$o UCArray$o \
|
---|
276 | FIvfLevelInfo$o FragLevelConvert$o Terms$o MGQuery$o \
|
---|
277 | IndexData$o stemmer$o Weights$o TextGet$o text$o FText$o \
|
---|
278 | QueryParser$o QueryLex$o words$o
|
---|
279 |
|
---|
280 | libtextin.a: $(LIB_OBJS)
|
---|
281 | rm -f libtextin.a
|
---|
282 | $(AR) cru libtextin.a $(LIB_OBJS)
|
---|
283 | $(RANLIB) libtextin.a
|
---|
284 |
|
---|
285 |
|
---|
286 | mostlyclean:
|
---|
287 | rm -f *$o _*.c _*.o *._c *._o core core.*
|
---|
288 |
|
---|
289 | clean: mostlyclean
|
---|
290 | rm -f $(EXEC)
|
---|
291 |
|
---|
292 | distclean: clean
|
---|
293 | rm -f ansi2knr
|
---|
294 | rm -f Makefile
|
---|
295 |
|
---|
296 | maintainer-clean: distclean
|
---|
297 | @echo "This command is intended only for maintainers to use;"
|
---|
298 | @echo "rebuilding the deleted files may require special tools."
|
---|
299 |
|
---|
300 | dist: $(DISTFILES)
|
---|
301 | for file in $(DISTFILES); do \
|
---|
302 | ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
---|
303 | || cp -p $(srcdir)/$$file $(distdir); \
|
---|
304 | done
|
---|
305 |
|
---|
306 | movclean:
|
---|
307 | for file in $(SOURCES); do \
|
---|
308 | test = $$file; \
|
---|
309 | echo $("test.c"##*.c); \
|
---|
310 | done
|
---|
311 |
|
---|
312 | Makefile: Makefile.in ../config.status
|
---|
313 | cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
|
---|
314 |
|
---|
315 | # Tell versions [3.59,3.63) of GNU make not to export all variables.
|
---|
316 | # Otherwise a system limit (for SysV at least) may be exc
|
---|
317 |
|
---|
318 |
|
---|