1 | # |
---|
2 | # $Id: Makefile,v 1.4 1999-08-09 20:37:10 ghudson Exp $ |
---|
3 | # |
---|
4 | # Copyright 1992, 1993, Geoff Kuenning, Granada Hills, CA |
---|
5 | # All rights reserved. |
---|
6 | # |
---|
7 | # Redistribution and use in source and binary forms, with or without |
---|
8 | # modification, are permitted provided that the following conditions |
---|
9 | # are met: |
---|
10 | # |
---|
11 | # 1. Redistributions of source code must retain the above copyright |
---|
12 | # notice, this list of conditions and the following disclaimer. |
---|
13 | # 2. Redistributions in binary form must reproduce the above copyright |
---|
14 | # notice, this list of conditions and the following disclaimer in the |
---|
15 | # documentation and/or other materials provided with the distribution. |
---|
16 | # 3. All modifications to the source code must be clearly marked as |
---|
17 | # such. Binary redistributions based on modified source code |
---|
18 | # must be clearly marked as modified versions in the documentation |
---|
19 | # and/or other materials provided with the distribution. |
---|
20 | # 4. All advertising materials mentioning features or use of this software |
---|
21 | # must display the following acknowledgment: |
---|
22 | # This product includes software developed by Geoff Kuenning and |
---|
23 | # other unpaid contributors. |
---|
24 | # 5. The name of Geoff Kuenning may not be used to endorse or promote |
---|
25 | # products derived from this software without specific prior |
---|
26 | # written permission. |
---|
27 | # |
---|
28 | # THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND |
---|
29 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
30 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
31 | # ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE |
---|
32 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
---|
33 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
---|
34 | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
---|
35 | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
---|
36 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
---|
37 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
---|
38 | # SUCH DAMAGE. |
---|
39 | # |
---|
40 | # You will have to create a local.h file before building; look over |
---|
41 | # config.X to learn what things you may need to define, or use one of |
---|
42 | # the sample local.h files shipped. |
---|
43 | # |
---|
44 | # the argument syntax for buildhash to make alternate dictionary files |
---|
45 | # is simply: |
---|
46 | # |
---|
47 | # buildhash <dictfile> <affix-file> <outfile> |
---|
48 | |
---|
49 | # $Log: not supported by cvs2svn $ |
---|
50 | # Revision 1.3 1999/03/01 18:30:26 ghudson |
---|
51 | # MAKE=make is bad for gmake. |
---|
52 | # |
---|
53 | # Revision 1.2 1997/09/29 08:52:35 ghudson |
---|
54 | # Treat ispell.info as a source file, like everyone else. (I would have |
---|
55 | # left things the way they were, but the emacs command for generating |
---|
56 | # the info file doesn't work with 19.34b.) |
---|
57 | # |
---|
58 | # Revision 1.1.1.1 1997/09/03 21:08:11 ghudson |
---|
59 | # Import of ispell 3.1.20 |
---|
60 | # |
---|
61 | # Revision 1.102 1995/10/11 04:30:25 geoff |
---|
62 | # Allow DEFHASH and MASTERHASH to be the same. |
---|
63 | # |
---|
64 | # Revision 1.101 1995/08/05 23:19:33 geoff |
---|
65 | # Add the showversion target to ease the job of debugging people's make |
---|
66 | # output. Make sure SHELLDEBUG is set for the entire process of making |
---|
67 | # config.sh. |
---|
68 | # |
---|
69 | # Revision 1.100 1995/03/06 02:42:39 geoff |
---|
70 | # Run iwhich explicitly from the shell, so that we don't have to worry |
---|
71 | # about PATH problems and whether it's executable or not. Also fix a |
---|
72 | # place where -nw was not removed from the batch emacs switch list. |
---|
73 | # |
---|
74 | # Revision 1.99 1995/01/08 23:23:23 geoff |
---|
75 | # Get rid of an obsolete etags flag. Add some new variables to config.sh. |
---|
76 | # |
---|
77 | # Revision 1.98 1994/12/27 23:08:43 geoff |
---|
78 | # Use the new "iwhich" script to decide whether to install emacs-related |
---|
79 | # stuff. Make correct.o depend on version.h so that "ispell -a" always |
---|
80 | # reports the correct version. |
---|
81 | # |
---|
82 | # Revision 1.97 1994/11/21 07:02:51 geoff |
---|
83 | # Specify default values for the BUILD macros, so that some systems |
---|
84 | # don't accidentally override them and make ispell think that the |
---|
85 | # dictionaries are missing. |
---|
86 | # |
---|
87 | # Revision 1.96 1994/10/25 05:45:54 geoff |
---|
88 | # Make the installation command configurable. |
---|
89 | # |
---|
90 | # Revision 1.95 1994/10/18 04:03:17 geoff |
---|
91 | # Get rid of DICTVARIANTS, which is obsolete. Compile term.o first, so |
---|
92 | # that errors in it (which are common) will show up first. Improve the |
---|
93 | # rules for generation of msgs.h. |
---|
94 | # |
---|
95 | # Revision 1.94 1994/09/16 05:06:55 geoff |
---|
96 | # Split installation up into basic and dictionary-building tools, so |
---|
97 | # that we can have a partial-install target. |
---|
98 | # |
---|
99 | # Revision 1.93 1994/09/16 04:51:28 geoff |
---|
100 | # Handle installations that have ELISPDIR but not TEXINFODIR |
---|
101 | # |
---|
102 | # Revision 1.92 1994/09/16 02:45:52 geoff |
---|
103 | # Don't strip non-binaries. Fix an accidentally-doubled backslash. |
---|
104 | # |
---|
105 | # Revision 1.91 1994/08/31 05:58:27 geoff |
---|
106 | # Strip binaries before installing them. Create directories before |
---|
107 | # installing into them. Make sure manual pages are installed with the |
---|
108 | # correct protection modes. |
---|
109 | # |
---|
110 | # Revision 1.90 1994/05/25 04:29:16 geoff |
---|
111 | # Don't remove english.4 after the English makefile has carefully |
---|
112 | # installed it. |
---|
113 | # |
---|
114 | # Revision 1.89 1994/05/24 05:31:22 geoff |
---|
115 | # Return to the old sed-based method of parsing LANGUAGES, so that things |
---|
116 | # will work on broken systems like BSDI. |
---|
117 | # |
---|
118 | # Revision 1.88 1994/05/24 04:54:30 geoff |
---|
119 | # Fix the emacs installation to use emacs batch mode properly, so that a |
---|
120 | # terminal isn't required. |
---|
121 | # |
---|
122 | # Revision 1.87 1994/03/21 01:55:17 geoff |
---|
123 | # If a hard link can't be made to msgs.h, copy it instead |
---|
124 | # |
---|
125 | # Revision 1.86 1994/02/22 06:09:03 geoff |
---|
126 | # Add SHELLDEBUG. Change the language-subdirs target to use the shell |
---|
127 | # IFS variable to parse things, simplifying things and improving |
---|
128 | # efficiency (thanks to Hagen Ross for the idea and implemenation). |
---|
129 | # |
---|
130 | # Revision 1.85 1994/02/13 23:25:31 geoff |
---|
131 | # Fix multiple-language processing to not pass subsequent specifications to |
---|
132 | # the first Makefile. Also fix the language shell loop to be more flexible. |
---|
133 | # |
---|
134 | # Revision 1.84 1994/02/07 08:10:40 geoff |
---|
135 | # When processing the LANGUAGES configuration variable (from local.h), |
---|
136 | # use sed instead of expr to process it. This gets around versions of |
---|
137 | # expr that have 127-character limitations (though it probably still |
---|
138 | # limits us to 512 characters with some versions of sed, so further work |
---|
139 | # may be needed here). |
---|
140 | # |
---|
141 | # Revision 1.83 1994/02/07 06:31:20 geoff |
---|
142 | # Clarify how to change variables in local.h |
---|
143 | # |
---|
144 | # Revision 1.82 1994/02/07 06:29:31 geoff |
---|
145 | # Add a dummy else clause to shell if-test for Ultrix |
---|
146 | # |
---|
147 | # Revision 1.81 1994/02/07 05:35:34 geoff |
---|
148 | # Make realclean run dictclean |
---|
149 | # |
---|
150 | # Revision 1.80 1994/01/26 07:44:43 geoff |
---|
151 | # Make yacc configurable through local.h. |
---|
152 | # |
---|
153 | # Revision 1.79 1994/01/25 07:11:11 geoff |
---|
154 | # Get rid of all old RCS log lines in preparation for the 3.1 release. |
---|
155 | # |
---|
156 | # |
---|
157 | |
---|
158 | # |
---|
159 | # !!!DO NOT EDIT HERE!!! |
---|
160 | # |
---|
161 | # Unlike previous versions of ispell, there should be no need to edit |
---|
162 | # your Makefile. Instead, #define the corresponding variables in your |
---|
163 | # local.h file; the Makefile will automatically pick them up. The |
---|
164 | # only reason you should need to edit the Makefile might to be to add |
---|
165 | # non-English dictionary support. |
---|
166 | # |
---|
167 | # For example, if you want to set CFLAGS to "-g -Wall", don't put it |
---|
168 | # here. Put: |
---|
169 | # |
---|
170 | # #define CFLAGS "-g -Wall" |
---|
171 | # |
---|
172 | # in local.h. Otherwise, it won't have any effect. |
---|
173 | # |
---|
174 | EXTRADICT = Use_config.sh |
---|
175 | |
---|
176 | SHELL = /bin/sh |
---|
177 | |
---|
178 | # |
---|
179 | # Set this to "-vx" in the make command line if you need to |
---|
180 | # debug the complex shell commands. |
---|
181 | # |
---|
182 | SHELLDEBUG = +vx |
---|
183 | |
---|
184 | all: unpacked |
---|
185 | all: config.sh |
---|
186 | all: programs showversion ispell.1 |
---|
187 | all: all-languages |
---|
188 | |
---|
189 | programs: buildhash findaffix tryaffix ispell |
---|
190 | programs: icombine ijoin munchlist |
---|
191 | programs: subset sq unsq zapdups |
---|
192 | |
---|
193 | showversion: |
---|
194 | ./ispell -v | head -1 |
---|
195 | |
---|
196 | .c.o: |
---|
197 | @. ./config.sh; \ |
---|
198 | set -x; \ |
---|
199 | $$CC $$CFLAGS -c $< |
---|
200 | |
---|
201 | .y.o: |
---|
202 | @. ./config.sh; \ |
---|
203 | set -x; \ |
---|
204 | $$YACC $<; \ |
---|
205 | $$CC $$CFLAGS -c y.tab.c; \ |
---|
206 | mv y.tab.o $@; \ |
---|
207 | rm -f y.tab.c |
---|
208 | |
---|
209 | all-languages: munchable |
---|
210 | $(MAKE) LANGUAGE_TARGET=all SHELLDEBUG=$(SHELLDEBUG) language-subdirs |
---|
211 | |
---|
212 | install: config.sh all install-basic install-dictbuild install-languages |
---|
213 | |
---|
214 | partial-install: config.sh all install-basic install-languages |
---|
215 | |
---|
216 | install-basic: |
---|
217 | @. ./config.sh; \ |
---|
218 | set -x; \ |
---|
219 | [ -d $$BINDIR ] || (mkdir $$BINDIR; chmod 755 $$BINDIR); \ |
---|
220 | cd $$BINDIR; \ |
---|
221 | rm -f ispell |
---|
222 | @. ./config.sh; \ |
---|
223 | set -x; \ |
---|
224 | $$INSTALL ispell $$BINDIR |
---|
225 | @. ./config.sh; \ |
---|
226 | set -x; \ |
---|
227 | cd $$BINDIR; \ |
---|
228 | strip ispell; \ |
---|
229 | chmod 755 ispell |
---|
230 | @. ./config.sh; \ |
---|
231 | set -x; \ |
---|
232 | [ -d $$MAN1DIR ] || (mkdir $$MAN1DIR; chmod 755 $$MAN1DIR); \ |
---|
233 | [ -d $$MAN4DIR ] || (mkdir $$MAN4DIR; chmod 755 $$MAN4DIR); \ |
---|
234 | cd $$MAN1DIR; \ |
---|
235 | rm -f ispell$$MAN1EXT; \ |
---|
236 | cd $$MAN4DIR; \ |
---|
237 | rm -f ispell$$MAN4EXT |
---|
238 | @. ./config.sh; \ |
---|
239 | set -x; \ |
---|
240 | $$INSTALL ispell.1 $$MAN1DIR/ispell$$MAN1EXT; \ |
---|
241 | $$INSTALL ispell.4 $$MAN4DIR/ispell$$MAN4EXT |
---|
242 | @. ./config.sh; \ |
---|
243 | set -x; \ |
---|
244 | cd $$MAN1DIR; \ |
---|
245 | chmod 644 ispell$$MAN1EXT; \ |
---|
246 | cd $$MAN4DIR; \ |
---|
247 | chmod 644 ispell$$MAN4EXT |
---|
248 | @set +e; \ |
---|
249 | . ./config.sh; \ |
---|
250 | set $(SHELLDEBUG); \ |
---|
251 | if [ -d $$TEXINFODIR -a -r ispell.info ]; then \ |
---|
252 | set -ex; \ |
---|
253 | rm -f $$TEXINFODIR/ispell; \ |
---|
254 | $$INSTALL ispell.info $$TEXINFODIR/ispell; \ |
---|
255 | chmod 644 $$TEXINFODIR/ispell; \ |
---|
256 | else \ |
---|
257 | : ; \ |
---|
258 | fi |
---|
259 | @set +e; \ |
---|
260 | . ./config.sh; \ |
---|
261 | set $(SHELLDEBUG); \ |
---|
262 | if [ -d $$ELISPDIR ]; then \ |
---|
263 | set -ex; \ |
---|
264 | rm -f $$ELISPDIR/ispell.el; \ |
---|
265 | $$INSTALL ispell.el $$ELISPDIR; \ |
---|
266 | if sh iwhich $$EMACS >/dev/null; then \ |
---|
267 | echo '(byte-compile-file "'"$$ELISPDIR/ispell.el"'")' \ |
---|
268 | > /tmp/emi$$$$; \ |
---|
269 | $$EMACS -batch -l /tmp/emi$$$$; \ |
---|
270 | rm -f /tmp/emi$$$$; \ |
---|
271 | chmod 644 $$ELISPDIR/ispell.el $$ELISPDIR/ispell.elc; \ |
---|
272 | else \ |
---|
273 | chmod 644 $$ELISPDIR/ispell.el; \ |
---|
274 | fi; \ |
---|
275 | else \ |
---|
276 | : ; \ |
---|
277 | fi |
---|
278 | |
---|
279 | install-dictbuild: |
---|
280 | @. ./config.sh; \ |
---|
281 | set -x; \ |
---|
282 | [ -d $$BINDIR ] || (mkdir $$BINDIR; chmod 755 $$BINDIR); \ |
---|
283 | cd $$BINDIR; \ |
---|
284 | rm -f buildhash icombine ijoin \ |
---|
285 | munchlist findaffix tryaffix sq unsq; \ |
---|
286 | rm -f $$LIBDIR/icombine |
---|
287 | @. ./config.sh; \ |
---|
288 | set -x; \ |
---|
289 | $$INSTALL buildhash icombine ijoin munchlist findaffix tryaffix \ |
---|
290 | sq unsq \ |
---|
291 | $$BINDIR |
---|
292 | @. ./config.sh; \ |
---|
293 | set -x; \ |
---|
294 | cd $$BINDIR; \ |
---|
295 | strip buildhash icombine ijoin sq unsq; \ |
---|
296 | chmod 755 buildhash icombine ijoin \ |
---|
297 | munchlist findaffix tryaffix sq unsq |
---|
298 | @. ./config.sh; \ |
---|
299 | set -x; \ |
---|
300 | [ -d $$MAN1DIR ] || (mkdir $$MAN1DIR; chmod 755 $$MAN1DIR); \ |
---|
301 | [ -d $$MAN4DIR ] || (mkdir $$MAN4DIR; chmod 755 $$MAN4DIR); \ |
---|
302 | cd $$MAN1DIR; \ |
---|
303 | rm -f sq$$MAN1EXT |
---|
304 | @. ./config.sh; \ |
---|
305 | set -x; \ |
---|
306 | $$INSTALL sq.1 $$MAN1DIR/sq$$MAN1EXT; \ |
---|
307 | for m in buildhash munchlist findaffix tryaffix; do \ |
---|
308 | echo ".so `basename $$MAN1DIR`/ispell$$MAN1EXT" \ |
---|
309 | > $$MAN1DIR/$$m$$MAN1EXT; \ |
---|
310 | done; \ |
---|
311 | echo ".so `basename $$MAN1DIR`/sq$$MAN1EXT" \ |
---|
312 | > $$MAN1DIR/unsq$$MAN1EXT |
---|
313 | @. ./config.sh; \ |
---|
314 | set -x; \ |
---|
315 | cd $$MAN1DIR; \ |
---|
316 | chmod 644 sq$$MAN1EXT buildhash$$MAN1EXT \ |
---|
317 | munchlist$$MAN1EXT findaffix$$MAN1EXT tryaffix$$MAN1EXT |
---|
318 | |
---|
319 | install-languages: |
---|
320 | $(MAKE) LANGUAGE_TARGET=install SHELLDEBUG=$(SHELLDEBUG) \ |
---|
321 | language-subdirs |
---|
322 | . ./config.sh; \ |
---|
323 | [ -d $$LIBDIR ] || (mkdir $$LIBDIR; chmod 755 $$LIBDIR); \ |
---|
324 | set -x; \ |
---|
325 | cd $$LIBDIR; \ |
---|
326 | if [ $$MASTERHASH != $DEFHASH ]; then \ |
---|
327 | rm -f $$DEFHASH; \ |
---|
328 | ln $$MASTERHASH $$DEFHASH; \ |
---|
329 | fi |
---|
330 | |
---|
331 | munchable: findaffix tryaffix munchlist buildhash ispell icombine |
---|
332 | munchable: ijoin |
---|
333 | munchable: sq unsq |
---|
334 | |
---|
335 | # |
---|
336 | # The following auxiliary dependency is used to make targets in |
---|
337 | # the language directories. Do you find it intimidating? No |
---|
338 | # surprise; remember that this is by the guy who wrote munchlist. |
---|
339 | # |
---|
340 | LANGUAGE_TARGET = Do_not_try_to_make_this_target_yourself |
---|
341 | BUILD = build |
---|
342 | CBUILD = build |
---|
343 | DBUILD = build |
---|
344 | |
---|
345 | language-subdirs: config.sh |
---|
346 | @. ./config.sh; \ |
---|
347 | set $(SHELLDEBUG); \ |
---|
348 | set +e; \ |
---|
349 | while [ "X$$LANGUAGES" != X ]; do \ |
---|
350 | ( \ |
---|
351 | descriptor=`echo "$$LANGUAGES" \ |
---|
352 | | sed 's/[^{]*{\([^}]*\)}.*/\1/'`; \ |
---|
353 | dir=`echo "$$descriptor" | sed 's/\([^,]*\).*/\1/'`; \ |
---|
354 | descriptor=`echo "$$descriptor" \ |
---|
355 | | sed 's/[^,]*,*\(.*\).*/\1/'`; \ |
---|
356 | makeargs=''; \ |
---|
357 | while [ "X$$descriptor" != X ]; \ |
---|
358 | do \ |
---|
359 | nextvar=`echo "$$descriptor" | sed 's/\([^,]*\).*/\1/'`; \ |
---|
360 | makeargs="$$makeargs '$$nextvar'"; \ |
---|
361 | descriptor=`echo "$$descriptor" \ |
---|
362 | | sed 's/[^,]*,*\(.*\).*/\1/'`; \ |
---|
363 | done; \ |
---|
364 | set -x; \ |
---|
365 | cd languages/$$dir; \ |
---|
366 | eval $(MAKE) BUILD=$(BUILD) DBUILD=$(DBUILD) CBUILD=$(CBUILD) \ |
---|
367 | SHELLDEBUG=$(SHELLDEBUG) "$$makeargs" $(LANGUAGE_TARGET) \ |
---|
368 | || exit 1; \ |
---|
369 | ) || exit 1; \ |
---|
370 | LANGUAGES=`echo "$$LANGUAGES" \ |
---|
371 | | sed 's/[^{]*{[^}]*}[^{]*\(.*\)$$/\1/'`; \ |
---|
372 | case "$$LANGUAGES" in \ |
---|
373 | ''|*{*}*) \ |
---|
374 | ;; \ |
---|
375 | *) \ |
---|
376 | echo "Bad language specification: '$$LANGUAGES'" \ |
---|
377 | 1>&2; \ |
---|
378 | exit 2 \ |
---|
379 | ;; \ |
---|
380 | esac; \ |
---|
381 | done; \ |
---|
382 | exit 0 |
---|
383 | |
---|
384 | buildhash: config.sh buildhash.o hash.o makedent.o parse.o |
---|
385 | @. ./config.sh; \ |
---|
386 | set -x; \ |
---|
387 | $$CC $$CFLAGS -o buildhash buildhash.o hash.o makedent.o parse.o \ |
---|
388 | $$LIBES |
---|
389 | |
---|
390 | icombine: config.sh icombine.o makedent.o parse.o |
---|
391 | . ./config.sh; \ |
---|
392 | set -x; \ |
---|
393 | $$CC $$CFLAGS -o icombine icombine.o makedent.o parse.o \ |
---|
394 | $$LIBES |
---|
395 | |
---|
396 | ijoin: config.sh ijoin.o fields.o |
---|
397 | @. ./config.sh; \ |
---|
398 | set -x; \ |
---|
399 | $$CC $$CFLAGS -o ijoin ijoin.o fields.o $$LIBES |
---|
400 | |
---|
401 | EDITFILE = notthere |
---|
402 | OUTFILE = /dev/null |
---|
403 | |
---|
404 | config.sh: config.X local.h |
---|
405 | set $(SHELLDEBUG); \ |
---|
406 | for var in BINDIR CC CFLAGS COUNTSUFFIX DEFDICT DEFHASH DEFLANG \ |
---|
407 | ELISPDIR EMACS HASHSUFFIX INSTALL \ |
---|
408 | LANGUAGES LIBDIR LIBES LINT LINTFLAGS \ |
---|
409 | MAKE_SORTTMP MAN1DIR MAN1EXT MAN4DIR MAN4EXT MASTERHASH \ |
---|
410 | MSGLANG REGLIB STATSUFFIX \ |
---|
411 | TERMLIB TEXINFODIR YACC \ |
---|
412 | ; do \ |
---|
413 | cat config.X local.h \ |
---|
414 | | sed -n -e "s/^#define[ ]*$$var[ ]*"'"'"/$$var=/p" \ |
---|
415 | | sed -e 's/".*$$/'"'/" -e "s/=/='/" \ |
---|
416 | | tail -1; \ |
---|
417 | done > config.sh; \ |
---|
418 | echo 'case "$$MAKE_SORTTMP" in "") \ |
---|
419 | SORTTMP="-e /!!SORTTMP!!/s/=.*$$/=/";; *) SORTTMP=;; esac' \ |
---|
420 | >> config.sh |
---|
421 | |
---|
422 | doedit: |
---|
423 | . ./config.sh; \ |
---|
424 | sed -e "s@!!LIBDIR!!@$$LIBDIR@" -e "s@!!DEFDICT!!@$$DEFDICT@" \ |
---|
425 | -e "s@!!DEFHASH!!@$$DEFHASH@" -e "s@!!DEFLANG!!@$$DEFLANG@" \ |
---|
426 | -e "s@!!COUNTSUFFIX!!@$$COUNTSUFFIX@g" \ |
---|
427 | -e "s@!!HASHSUFFIX!!@$$HASHSUFFIX@g" \ |
---|
428 | -e "s@!!STATSUFFIX!!@$$STATSUFFIX@g" \ |
---|
429 | $$SORTTMP < $(EDITFILE) > $(OUTFILE) |
---|
430 | |
---|
431 | findaffix: findaffix.X config.sh |
---|
432 | @$(MAKE) EDITFILE=findaffix.X OUTFILE=findaffix doedit |
---|
433 | chmod +x findaffix |
---|
434 | |
---|
435 | ispell.1: ispell.1X config.sh |
---|
436 | @$(MAKE) EDITFILE=ispell.1X OUTFILE=ispell.1 SHELLDEBUG=$(SHELLDEBUG) \ |
---|
437 | doedit |
---|
438 | |
---|
439 | munchlist: munchlist.X config.sh |
---|
440 | @$(MAKE) EDITFILE=munchlist.X OUTFILE=munchlist \ |
---|
441 | SHELLDEBUG=$(SHELLDEBUG) doedit |
---|
442 | chmod +x munchlist |
---|
443 | |
---|
444 | subset: subset.X config.sh |
---|
445 | @$(MAKE) EDITFILE=subset.X OUTFILE=subset SHELLDEBUG=$(SHELLDEBUG) \ |
---|
446 | doedit |
---|
447 | chmod +x subset |
---|
448 | |
---|
449 | tryaffix: tryaffix.X config.sh |
---|
450 | @$(MAKE) EDITFILE=tryaffix.X OUTFILE=tryaffix \ |
---|
451 | SHELLDEBUG=$(SHELLDEBUG) doedit |
---|
452 | chmod +x tryaffix |
---|
453 | |
---|
454 | zapdups: zapdups.X config.sh |
---|
455 | @$(MAKE) EDITFILE=zapdups.X OUTFILE=zapdups SHELLDEBUG=$(SHELLDEBUG) \ |
---|
456 | doedit |
---|
457 | chmod +x zapdups |
---|
458 | |
---|
459 | OBJS = term.o ispell.o correct.o defmt.o dump.o good.o lookup.o \ |
---|
460 | hash.o makedent.o tgood.o tree.o xgets.o |
---|
461 | |
---|
462 | ispell: config.sh $(OBJS) |
---|
463 | @. ./config.sh; \ |
---|
464 | set -x; \ |
---|
465 | $$CC $$CFLAGS -o ispell $(OBJS) $$TERMLIB $$REGLIB $$LIBES |
---|
466 | |
---|
467 | # Since some makes don't have appropriate built-in rules, here are |
---|
468 | # dependencies for sq and unsq. Sigh. |
---|
469 | sq: config.sh msgs.h sq.c |
---|
470 | @. ./config.sh; \ |
---|
471 | set -x; \ |
---|
472 | $$CC $$CFLAGS -o sq sq.c |
---|
473 | |
---|
474 | unsq: config.sh msgs.h unsq.c |
---|
475 | @. ./config.sh; \ |
---|
476 | set -x; \ |
---|
477 | $$CC $$CFLAGS -o unsq unsq.c |
---|
478 | |
---|
479 | $(OBJS) buildhash.o icombine.o hash.o parse.o: config.h ispell.h local.h |
---|
480 | $(OBJS) buildhash.o icombine.o hash.o parse.o: proto.h msgs.h |
---|
481 | ijoin.o: config.h ispell.h local.h |
---|
482 | ijoin.o: proto.h fields.h |
---|
483 | buildhash.o correct.o ispell.o: version.h |
---|
484 | |
---|
485 | config.h: config.X local.h |
---|
486 | cp config.X config.h |
---|
487 | chmod u+w config.h |
---|
488 | echo '' >> config.h |
---|
489 | echo '/* AUTOMATICALLY-GENERATED SYMBOLS */' >> config.h |
---|
490 | cat local.h config.X \ |
---|
491 | | egrep '^#define[ ]*SIGNAL_TYPE' \ |
---|
492 | | sed -e 's/TYPE[ ]*/TYPE_STRING "/' -e 's/$$/"/' -e 1q \ |
---|
493 | >> config.h |
---|
494 | cat local.h config.X \ |
---|
495 | | egrep '^#define[ ]*MASKTYPE' \ |
---|
496 | | sed -e 's/TYPE[ ]*/TYPE_STRING "/' -e 's/$$/"/' -e 1q \ |
---|
497 | >> config.h |
---|
498 | |
---|
499 | # Create a sample local.h if no such file currently exists |
---|
500 | local.h: |
---|
501 | set +e; [ -r local.h ] || cp local.h.samp local.h |
---|
502 | |
---|
503 | msgs.h: config.sh FRC |
---|
504 | @. ./config.sh; \ |
---|
505 | set $(SHELLDEBUG); \ |
---|
506 | set +e; \ |
---|
507 | if [ -r languages/$$MSGLANG/msgs.h ]; then \ |
---|
508 | msgs=languages/$$MSGLANG/msgs.h; \ |
---|
509 | else \ |
---|
510 | msgs=languages/english/msgs.h; \ |
---|
511 | fi; \ |
---|
512 | if cmp -s msgs.h $$msgs; then \ |
---|
513 | :; \ |
---|
514 | else \ |
---|
515 | set -x; \ |
---|
516 | rm -f msgs.h; ln $$msgs msgs.h || cp $$msgs msgs.h; \ |
---|
517 | fi |
---|
518 | |
---|
519 | FRC: |
---|
520 | |
---|
521 | tags: config.h *.[chy] |
---|
522 | ctags -w -t *.[chy] |
---|
523 | sed -e s/config.h/config.X/ tags > ntags |
---|
524 | mv ntags tags |
---|
525 | |
---|
526 | TAGS: config.h *.[chy] |
---|
527 | etags *.[chy] |
---|
528 | sed -e s/config.h/config.X/ TAGS > NTAGS |
---|
529 | mv NTAGS TAGS |
---|
530 | |
---|
531 | lint: languages/*/msgs.h |
---|
532 | lint: config.sh config.h ispell.h proto.h *.[cy] |
---|
533 | @. ./config.sh; \ |
---|
534 | $$LINT $$LINTFLAGS ispell.c correct.c defmt.c dump.c good.c \ |
---|
535 | hash.c lookup.c makedent.c tgood.c term.c tree.c xgets.c; \ |
---|
536 | $$YACC parse.y; \ |
---|
537 | $$LINT $$LINTFLAGS buildhash.c hash.c makedent.c y.tab.c; \ |
---|
538 | $$LINT $$LINTFLAGS icombine.c makedent.c y.tab.c; \ |
---|
539 | $$LINT $$LINTFLAGS ijoin.c fields.c |
---|
540 | @rm -f y.tab.c |
---|
541 | |
---|
542 | clean: config.sh clean-languages |
---|
543 | @. ./config.sh; \ |
---|
544 | set -x; \ |
---|
545 | rm -f $$DEFHASH $$FOREIGNHASHES |
---|
546 | rm -f *.o core a.out mon.out hash.out y.tab.c *.stat *.cnt \ |
---|
547 | config.h msgs.h |
---|
548 | rm -f buildhash findaffix tryaffix ispell icombine ijoin \ |
---|
549 | munchlist subset sq unsq zapdups ispell.1 |
---|
550 | |
---|
551 | clean-languages: |
---|
552 | $(MAKE) LANGUAGE_TARGET=clean SHELLDEBUG=$(SHELLDEBUG) language-subdirs |
---|
553 | |
---|
554 | realclean veryclean: clean dictclean |
---|
555 | rm -f config.sh |
---|
556 | |
---|
557 | # |
---|
558 | # The following dependency can be executed when ispell is unpacked, |
---|
559 | # to unpack the dictionaries. |
---|
560 | # |
---|
561 | unpack: unsq |
---|
562 | $(MAKE) LANGUAGE_TARGET=unpack SHELLDEBUG=$(SHELLDEBUG) \ |
---|
563 | language-subdirs |
---|
564 | |
---|
565 | unpacked: |
---|
566 | $(MAKE) SHELLDEBUG=$(SHELLDEBUG) unpack |
---|
567 | touch unpacked |
---|
568 | |
---|
569 | # |
---|
570 | # The following target allows you to clean out the leftover raw |
---|
571 | # files gotten from unpacking the kit. It makes sure that you |
---|
572 | # have the combined files first, so it may take a little while |
---|
573 | # to run. |
---|
574 | # |
---|
575 | kitclean: unsq |
---|
576 | $(MAKE) LANGUAGE_TARGET=kitclean SHELLDEBUG=$(SHELLDEBUG) \ |
---|
577 | language-subdirs |
---|
578 | |
---|
579 | # |
---|
580 | # The following target allows you to clean out the combined |
---|
581 | # dictionary files. For safety, so you don't lose your files, |
---|
582 | # it makes sure that there is something to work from, but it can |
---|
583 | # only be so smart, so be careful! |
---|
584 | # |
---|
585 | dictclean: |
---|
586 | $(MAKE) LANGUAGE_TARGET=dictclean SHELLDEBUG=$(SHELLDEBUG) \ |
---|
587 | language-subdirs |
---|