home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Product / Product.zip / ISPSRC.ZIP / makefile.os2 < prev    next >
Makefile  |  1993-04-13  |  26KB  |  800 lines

  1. # -*- Mode: Text -*-
  2.  
  3. # $Id: Makefile,v 1.58 1992/01/10 10:54:06 geoff Exp $ 
  4. #
  5. # Copyright 1987, 1988, 1989, by Geoff Kuenning, Manhattan Beach, CA
  6. # Permission for non-profit use is hereby granted.
  7. # All other rights reserved.
  8. # See "version.h" for a more complete copyright notice.
  9. #
  10. # $Log: Makefile,v $
  11. # Revision 1.58  1992/01/10  10:54:06  geoff
  12. # Install the sq(1) manual page with the correct extension.
  13. #
  14. # Revision 1.57  1992/01/04  22:08:06  geoff
  15. # Add sq and unsq to BINDIR at installation time, and add the manual
  16. # page for them to MANDIR.  Make the sample german dictionary a bit more
  17. # configurable.  Fix calls to unsq so they don't assume that the current
  18. # directory is in the path.  Add sq and unsq to the clean dependency.
  19. #
  20. # Revision 1.56  91/09/11  23:22:20  geoff
  21. # Add some more foreign-language support, including sample dependencies
  22. # for German.
  23. # Revision 1.55  91/09/04  18:00:44  geoff
  24. # Remove old installed files before copying over them; this may help if
  25. # the owner differs.
  26. # Revision 1.54  91/09/04  17:33:29  geoff
  27. # Make emacs be a variable
  28. # Revision 1.53  91/08/10  14:09:23  geoff
  29. # Add a "defaultdict" target which allows the user to make the chosen
  30. # dictionary without typing a convoluted command line.
  31. # Revision 1.52  91/07/28  20:20:33  geoff
  32. # Fix some silly typos in the dictionary-building stuff
  33. # Revision 1.51  91/07/27  20:48:05  geoff
  34. # Add DICTVARIANTS.  Fix MAKE_SORTTMP to attempt to obey TMPDIR if it
  35. # exists.  Add a warning about /usr/dict/web2's size.  Add zapdups.  Fix
  36. # the emacs installation to work even if getcwd doesn't.  Major changes
  37. # to the way dictionaries are built, adding the BUILD, CBUILD, and
  38. # DBUILD macros to make ispell much easier to install and maintain.  Add
  39. # the "kitclean" and "dictclean" dependencies.
  40. # Revision 1.50  91/07/15  19:26:35  geoff
  41. # Fix the installation of the texinfo file to make use of @setfilename,
  42. # rather than using a dummy file.  Add a TAGS dependency for emacs
  43. # users.
  44. # Revision 1.49  91/07/05  19:51:32  geoff
  45. # Remove some comments that really belong in config.X.  Fix a typo in
  46. # the lint command.
  47. # Revision 1.48  91/07/05  16:48:23  geoff
  48. # Add automatic installation for the emacs support (on systems that
  49. # have emacs)
  50. # Revision 1.47  91/05/27  21:47:49  geoff
  51. # Separate the "make clean" target into a "garbage files" removal and an
  52. # executables removal step.  This will make maintenance a bit simpler.
  53. # Revision 1.46  90/09/06  03:13:03  geoff
  54. # Rename dictionaries to english.{sml,med,lrg}, so that their names aren't
  55. # tied to word counts that change.  Add the makecomponents and makeenglish.?
  56. # dependencies so that dictionary maintenance is under better control.
  57. # Revision 1.45  90/09/05  02:37:29  geoff
  58. # Add a separate "programs" dependency so a make can be done without
  59. # rebuilding the hash file.
  60. # Revision 1.44  90/09/04  01:53:11  geoff
  61. # Change the dictionary names to reflect their actual sizes.  Remove some
  62. # commentary related to development on the Callan, and make the default
  63. # SORTTMP directory be /usr/tmp.
  64. # Revision 1.43  90/04/17  15:30:22  geoff
  65. # Port to NeXT;  also fix a bug in install
  66. # Revision 1.42  89/12/27  03:24:50  geoff
  67. # Add msgs.h
  68. # Revision 1.41  89/07/11  00:17:48  geoff
  69. # Add the three new routines that ispell.c was broken up into:  correct.c,
  70. # defmt.c, and dump.c.  Also add REGLIB.
  71. # Revision 1.40  89/06/09  15:51:08  geoff
  72. # Add support for my new "llint" shell script.
  73. # Revision 1.39  89/04/27  23:51:01  geoff
  74. # Fix the tags dependency to include the yacc grammar file.
  75. # Revision 1.38  89/02/27  02:19:16  geoff
  76. # Instead of creating a null local.h, create it from local.h.samp.
  77. # Revision 1.37  89/02/22  23:23:21  geoff
  78. # Install english.4 in the manual page directory.
  79. # Revision 1.36  88/12/26  02:22:18  geoff
  80. # Add a copyright notice.  Make a couple of minor improvements to the
  81. # commentary.  Warn about the inaccuracies in english.92k.
  82. # Revision 1.35  88/11/25  19:50:04  geoff
  83. # Make the LIBES macro correct for this installation (oversight in last
  84. # change).
  85. # Revision 1.34  88/11/16  02:19:04  geoff
  86. # Add comments about how to build foreign hash files, and the LIBES
  87. # macro.  Rename the "plus" dictionaries to take out the "k", for name
  88. # length reasons.  Change the dictionary-making dependencies to require
  89. # explicit invocation, rather than remaking the dictionaries whenever
  90. # anything else is remade.  Add dependencies to make all hash files.  Change
  91. # the making of the "k" dictionaries to use sort, instead of munchlist, so
  92. # they run faster.  Add a dependency that creates a null local.h if none
  93. # exists.
  94. # Revision 1.33  88/04/30  22:11:36  geoff
  95. # Add the lint dependency.
  96. # Revision 1.32  88/04/11  01:32:34  geoff
  97. # Add icombine and sq/unsq to the munchable list.  Change the dictionary
  98. # builds so that they unsqueeze the distributed dictionaries.
  99. # Revision 1.31  88/03/27  00:55:28  geoff
  100. # Add icombine back in.
  101. # Revision 1.30  88/03/12  02:42:14  geoff
  102. # Correct a hardwired usage of cc to use the macro.
  103. # Revision 1.29  88/02/20  23:09:09  geoff
  104. # Drop icombine, and add tryaffix.  Numerous other changes to support
  105. # the new "makedent" module and the new capitalization format.  Add a
  106. # tags dependency.
  107. # Revision 1.28  87/09/26  15:52:11  geoff
  108. # Add EXTRADICT, the "munchable" dependency, subset.X, and the
  109. # dictionary-making dependencies.
  110. # Revision 1.27  87/09/14  22:58:20  geoff
  111. # Add buildhash to the install list
  112. # Revision 1.26  87/09/09  00:14:59  geoff
  113. # Fix a couple of typos, and install findaffix in BINDIR.
  114. # Revision 1.25  87/09/03  19:22:43  geoff
  115. # Make objects depend on local.h
  116. # Revision 1.24  87/09/03  17:32:04  geoff
  117. # Add dependencies to run munchlist and fixdict
  118. # Revision 1.23  87/09/02  21:56:54  geoff
  119. # Install icombine in LIBDIR
  120. # Revision 1.22  87/08/28  21:19:38  geoff
  121. # Change the argument order for buildhash.
  122. # Revision 1.21  87/07/20  23:20:08  geoff
  123. # Simplify some comments, and add SORTTMP.  Change the hash file name
  124. # to reflect the language.  Add support for the modules involved in
  125. # table-driving.  Dump isexpand and the four sed scripts.  Add findaffix.
  126. # Revision 1.20  87/06/27  12:18:40  geoff
  127. # Add some more stuff to the make clean list (Michael Wester).
  128. # Revision 1.19  87/06/07  14:50:33  geoff
  129. # Integrate Gary Johnson's suggestions into the main branch
  130. # Revision 1.18  87/06/07  14:17:54  geoff
  131. # Add patch2's comments, also some comments to try to prevent another posting
  132. # that has CC defined to lcc
  133. # Revision 1.17  87/05/30  16:54:22  geoff
  134. # Add support for the ispell.4 man page.
  135. # Revision 1.16  87/05/27  23:34:25  geoff
  136. # Add TERMLIB to the what-to-change list
  137. # Revision 1.15  87/05/25  21:58:15  geoff
  138. # Make ispell.o depend on version.h
  139. # Revision 1.14  87/05/25  21:09:42  geoff
  140. # Add xgets to the source list.
  141. # Revision 1.13  87/05/18  00:21:55  geoff
  142. # Add isexpand.
  143. # Revision 1.12  87/04/19  22:50:33  geoff
  144. # Make things depend on more header files.
  145. # Revision 1.11  87/04/01  17:38:42  geoff
  146. # Build ispell shared-text
  147. # Revision 1.10  87/03/28  22:40:33  geoff
  148. # Document the need for -DUSG
  149. # Revision 1.9  87/03/27  17:20:13  geoff
  150. # Add icombine and munchlist.
  151. # Revision 1.8  87/03/26  00:30:17  geoff
  152. # Integrate Rich Salz's changes/improvements
  153. # Revision 1.7  87/03/22  23:55:58  geoff
  154. # Fix minor bugs found by Dave Mason
  155. # Revision 1.6  87/03/10  23:46:55  geoff
  156. # Add munchlist and expand to the install dependency
  157. # Revision 1.5  87/02/28  00:59:17  geoff
  158. # AddMCC, long cc support, SHELL, and header file dependencies
  159. # Revision 1.4  87/02/26  00:53:32  geoff
  160. # Integrate McQueer's and Ries's changes into the main branch,
  161. # including changes needed to make it run on my system, and one
  162. # bug fix (in the chmod command for make install).
  163. # Revision 1.3  87/01/19  00:05:22  geoff
  164. # Modify to work on System V and with my pathnames.
  165. # Revision 1.2  87/01/17  13:11:14  geoff
  166. # Add RCS ID keywords
  167. #
  168. #
  169. # Look over config.X before building.
  170. #
  171. # You will probably want to edit where it says "EDIT HERE" below;
  172. # the Makefile will update all other files to match.
  173. #
  174. # If you want to build non-English hash files, search for the string
  175. # "foreignhashes" and add command lines there.
  176. #
  177. # the argument syntax for buildhash to make alternate dictionary files
  178. # is simply:
  179. #
  180. #   buildhash <dictfile> <affix-file> <outfile>
  181. #
  182. # EDIT HERE
  183. #
  184.  
  185. CC = gcc
  186. PARSER = bison
  187.  
  188. .SUFFIXES : .y
  189.  
  190. .c.o:
  191.         $(CC) -c -O $(CFLAGS) $<
  192.  
  193. .y.o:
  194.         $(PARSER) $<
  195.         $(CC) -c -O -o $(<R).o $(CFLAGS) $(<R).tab.c
  196.  
  197. #EMACS = emacs
  198. #LINT = lint
  199. #DEFINES =
  200. #CFLAGS = -O $(DEFINES)
  201. #LINTFLAGS = $(DEFINES)
  202. #
  203. # If you need any special libraries to get things to link, put them here.
  204. LIBES = -los2
  205. #
  206. #
  207. # BINDIR - where to install user-executable binaries
  208. #
  209. # Don't forget CC above!
  210. #BINDIR = /usr/local/bin
  211. #
  212. # LIBDIR - where library files (notably the hash file) go.
  213. #
  214. #LIBDIR = /usr/local/lib
  215. #
  216. # EMACSDIR - where emacs files go
  217. #
  218. #EMACSDIR = /usr/lib/emacs
  219. #ELISPDIR = $(EMACSDIR)/lisp
  220. #TEXINFODIR = $(EMACSDIR)/info
  221. #
  222. # DEFHASH - default name for the hash file
  223. # FOREIGNHASHES - list of other hash files
  224. #
  225. DEFHASH = english.hash
  226. #FOREIGNHASHES = german.hash
  227. #FOREIGNHASHES =
  228. #
  229. # DEFLANG - default language file to use when building DEFHASH
  230. # FOREIGNLANGS - list of other language files to use when building
  231. # FOREIGNHASHES.
  232. #
  233. DEFLANG    = english.aff
  234. #FOREIGNLANGS = german.aff
  235. FOREIGNLANGS =
  236. #
  237. # DEFDICT - default dictionary to use to build DEFHASH.  Choices, in
  238. # approximate order of increasing size: english.sml, english.sml+,
  239. # english.med, english.med+, english.lrg, english.lrg+.  Note that larger
  240. # dictionaries increase ispell's startup time.
  241. #
  242. # Note that making the "+" dictionaries requires LOTS of temp file space
  243. # (in either /usr/tmp or wherever your environment variable TMPDIR points).
  244. # The biggest, "english.lrg+", takes up to 30000 blocks of temp file space
  245. # to create.  (By contrast, the non-"+" versions take temp space of about
  246. # twice the size of the completed dictionary, except for "sml", which needs
  247. # no temp space at all).
  248. #
  249. # Also, you should be aware that the two smaller dictionaries are much more
  250. # accurate than the "lrg" and "lrg+" dictionaries.  The smaller dictionaries
  251. # have been checked for errors and are believed to be error-free, but the
  252. # ones based on "english.lrg" are known to contain spelling errors.  Because
  253. # of the nature of ispell, these errors are not fatal flaws, but you should
  254. # still be aware that they exist and be suspicious of the "lrg*" dictionaries.
  255. #
  256. # FOREIGNDICTS - list of foreign dictionaries.
  257. #
  258. DEFDICT = english.med
  259. #FOREIGNDICTS = german.med
  260. FOREIGNDICTS =
  261. GERMANDICTS = german.0
  262. #
  263. # DICTVARIANTS - variants of the English dictionary that are desired.
  264. # Choose from "british", "american", or "altamer".  (The latter is an
  265. # extension to the American dictionary, with alternate spellings, and
  266. # should be used together with the American list).  It is possible to
  267. # include all three variants, or to add your own, if you wish.
  268. # British users should be a bit suspicious of the British lists,
  269. # especially the larger ones, as the final versions were compiled by
  270. # an American.
  271. #
  272. DICTVARIANTS = american altamer
  273. #
  274. # EXTRADICT - system dictionary (dictionaries) to be included with
  275. # the distributed dictionaries to make the "+" versions above.  Usually
  276. # /usr/dict/words, /usr/dict/web2, or both.  (Warning:  /usr/dict/web2 is
  277. # extremely big.  You don't want it in most cases.)
  278. #
  279. #EXTRADICT = /usr/dict/words
  280. #
  281. # MAN1DIR - where chapter-1 man pages go
  282. #
  283. #MAN1DIR    = /usr/local/man/man1
  284. #
  285. # MAN4DIR - where chapter-4 man pages go
  286. #
  287. #MAN4DIR    = /usr/local/man/man4
  288. #
  289. # MAN1EXT - what extension to put on chapter-1 man pages
  290. #
  291. #MAN1EXT    = .1
  292. #
  293. # MAN4EXT - what extension to put on chapter-4 man pages
  294. #
  295. #MAN4EXT    = .4
  296. #
  297. # TERMLIB - where to get the termcap library.  Should be -ltermcap or -lcurses
  298. # on most systems.
  299. #
  300. # TERMLIB = -lcurses
  301. TERMLIB = -ltermc
  302. #
  303. # REGLIB - where to get the regular-expression routines, if SYSTEM_LOOKUP is
  304. # not defined.  Should be -lPW on USG systems, null (I think) on BSD systems.
  305. #
  306. #REGLIB =
  307. #
  308. # If your sort command accepts the -T switch to set temp file locations
  309. # (try it out;  it exists but is undocumented on some systems), make the
  310. # following variable null.  Otherwise make it the sed script.
  311. #
  312. #SORTTMP = -e '/!!SORTTMP!!/s/=.*$$/=/'
  313. #SORTTMP =
  314. #
  315. # If your sort command accepts the -T switch (see above), make the following
  316. # variable refer to a temporary directory with lots of space.  Otherwise
  317. # make it null.
  318. #
  319. #MAKE_SORTTMP = -T $${TMPDIR-/usr/tmp}
  320. #
  321. #    END OF EDITING
  322. #
  323. #SHELL = /bin/sh
  324.  
  325. #all: programs ispell.info
  326. #all: $(DEFHASH)
  327. #all: foreignhashes
  328.  
  329. #programs: buildhash findaffix tryaffix fixdict ispell icombine munchlist
  330. #programs: subset sq unsq zapdups
  331.  
  332. #$(DEFHASH): buildhash $(DEFDICT) $(DEFLANG)
  333. #    ./buildhash $(DEFDICT) $(DEFLANG) $(DEFHASH)
  334.  
  335. #
  336. # The following target provides an easy way to rebuild your default
  337. # dictionary when you wish to do so.  This dependency isn't all that
  338. # smart, but it tries to handle the possibility that you might have
  339. # run "make dictclean" or "make kitclean".
  340. #
  341. #defaultdict:
  342. #    if [ -r english.0 ]; then \
  343. #        $(MAKE) DBUILD= $(DEFDICT); \
  344. #    else \
  345. #        $(MAKE) BUILD= $(DEFDICT); \
  346. #    fi
  347.  
  348. #install: all
  349. #    cd $(BINDIR); rm -f ispell buildhash munchlist findaffix tryaffix
  350. #    cp ispell buildhash munchlist findaffix tryaffix sq unsq $(BINDIR)
  351. #    cd $(LIBDIR); rm -f $(DEFHASH) $(DEFLANG) $(FOREIGNHASHES) \
  352. #      $(FOREIGNLANGS) icombine
  353. #    cp $(DEFHASH) $(DEFLANG) $(FOREIGNHASHES) $(FOREIGNLANGS) icombine \
  354. #      $(LIBDIR)
  355. #    chmod 755 $(LIBDIR)/icombine $(BINDIR)/ispell $(BINDIR)/munchlist \
  356. #      $(BINDIR)/findaffix $(BINDIR)/tryaffix $(BINDIR)/buildhash \
  357. #      $(BINDIR)/sq $(BINDIR)/unsq
  358. #    cd $(LIBDIR); chmod 644 $(DEFHASH) $(DEFLANG) \
  359. #      $(FOREIGNHASHES) $(FOREIGNLANGS)
  360. #    rm -f $(MAN1DIR)/ispell$(MAN1EXT) $(MAN4DIR)/ispell$(MAN4EXT) \
  361. #      $(MAN4DIR)/english$(MAN4EXT)
  362. #    cp ispell.1 $(MAN1DIR)/ispell$(MAN1EXT)
  363. #    cp sq.1 $(MAN1DIR)/sq$(MAN1EXT)
  364. #    cp ispell.4 $(MAN4DIR)/ispell$(MAN4EXT)
  365. #    cp english.4 $(MAN4DIR)/english$(MAN4EXT)
  366. #    if [ -d $(ELISPDIR) ]; then \
  367. #        rm -f $(TEXINFODIR)/ispell $(ELISPDIR)/ispell.el; \
  368. #        cp ispell.info $(TEXINFODIR)/ispell; \
  369. #        chmod 644 $(TEXINFODIR)/ispell; \
  370. #        cp ispell.el $(ELISPDIR); \
  371. #        echo '(byte-compile-file "$(ELISPDIR)/ispell.el")' \
  372. #          > /tmp/emi$$$$; \
  373. #        $(EMACS) -batch $(ELISPDIR)/ispell.el -l /tmp/emi$$$$; \
  374. #        rm -f /tmp/emi$$$$; \
  375. #        chmod 644 $(ELISPDIR)/ispell.el $(ELISPDIR)/ispell.elc; \
  376. #    fi
  377.  
  378. #ispell.info:    ispell.texinfo
  379. #    if [ -d $(ELISPDIR) ]; then \
  380. #        $(EMACS) -batch dummy -i ispell.texinfo \
  381. #          -f texinfo-format-buffer -f save-buffer; \
  382. #        rm -f ispell.info~; \
  383. #    fi
  384.  
  385. #fix-dictionary:    all
  386. #    PATH=:$$PATH sh fixdict $(DEFDICT)
  387.  
  388. #munchable:    findaffix tryaffix munchlist buildhash ispell icombine sq unsq
  389.  
  390. #munch-dictionary:    munchable
  391. #    PATH=:$$PATH munchlist -l $(DEFLANG) $(DEFDICT)
  392.  
  393. #
  394. #    Dependencies to build extra hash files
  395. #
  396. #allhashes:    normhashes plushashes foreignhashes
  397. normhashes:    sml.hash med.hash lrg.hash
  398. #plushashes:    sml+.hash med+.hash lrg+.hash
  399.  
  400. #
  401. #    Add dependencies here to build non-English hash files.
  402. #foreignhashes: $(FOREIGNHASHES)
  403.  
  404. #german.hash:    buildhash german.aff german.med
  405. #    rm -f german.hash
  406. #    if [ "$(DEFDICT)" = german.med ]; then \
  407. #        make $(DEFHASH); ln $(DEFHASH) $@; \
  408. #    else \
  409. #        ./buildhash german.med german.aff $@; \
  410. #    fi
  411.  
  412. #$(DBUILD)german.med:    munchable $(GERMANDICTS)
  413. #    PATH=:$$PATH munchlist -l german.aff $(GERMANDICTS) > german.med
  414.  
  415. #
  416. # Note that we don't use $(MAKE) in the following dependencies.  There
  417. # is a good reason for this -- if we did, "make -n" would still run buildhash.
  418. #
  419. sml.hash:    buildhash english.aff english.sml
  420.     rm -f sml.hash
  421.     if [ "$(DEFDICT)" = english.sml ]; then \
  422.         make $(DEFHASH); ln $(DEFHASH) $@; \
  423.     else \
  424.         ./buildhash english.sml english.aff $@; \
  425.     fi
  426.  
  427. #sml+.hash:    buildhash english.aff english.sml+
  428. #    rm -f sml+.hash
  429. #    if [ "$(DEFDICT)" = english.sml+ ]; then \
  430. #        make $(DEFHASH); ln $(DEFHASH) $@; \
  431. #    else \
  432. #        ./buildhash english.sml+ english.aff $@; \
  433. #    fi
  434.  
  435. med.hash:    buildhash english.aff english.med
  436.     rm -f med.hash
  437.     if [ "$(DEFDICT)" = english.med ]; then \
  438.         make $(DEFHASH); ln $(DEFHASH) $@; \
  439.     else \
  440.         ./buildhash english.med english.aff $@; \
  441.     fi
  442.  
  443. #med+.hash:    buildhash english.aff english.med+
  444. #    rm -f med+.hash
  445. #    if [ "$(DEFDICT)" = english.med+ ]; then \
  446. #        make $(DEFHASH); ln $(DEFHASH) $@; \
  447. #    else \
  448. #        ./buildhash english.med+ english.aff $@; \
  449. #    fi
  450.  
  451. lrg.hash:    buildhash english.aff english.lrg
  452.     rm -f lrg.hash
  453.     if [ "$(DEFDICT)" = english.lrg ]; then \
  454.         make $(DEFHASH); ln $(DEFHASH) $@; \
  455.     else \
  456.         ./buildhash english.lrg english.aff $@; \
  457.     fi
  458.  
  459. #lrg+.hash:    buildhash english.aff english.lrg+
  460. #    rm -f lrg+.hash
  461. #    if [ "$(DEFDICT)" = english.lrg+ ]; then \
  462. #        make $(DEFHASH); ln $(DEFHASH) $@; \
  463. #    else \
  464. #        ./buildhash english.lrg+ english.aff $@; \
  465. #    fi
  466.  
  467. #
  468. #    The six dictionaries, english.sml through english.lrg+, are built
  469. #    by the following dependencies.  The macros "CBUILD" and
  470. #    "DBUILD" are a sneaky trick used to keep make from trying to
  471. #    run munchlist every time a minor change is made to one of the
  472. #    C programs.  If you define these macros as null, "make all"
  473. #    will automatically build the dictionaries.  If you leave them
  474. #    with their default definitions, "make all" will leave the
  475. #    dictionaries alone, and you will have to type something like
  476. #    "make buildenglish.med+" to build the dictionary using
  477. #    munchlist.
  478. #
  479. #    Why two macros?  So you can delete {eng,amer,altamer,brit}.[012].??
  480. #    to save space, and still type "make DBUILD= all".
  481. #
  482. #    The following dependencies are convenient ways to make some or
  483. #    all of the dictionaries.
  484. #
  485. BUILD    =    build
  486. CBUILD    =    $(BUILD)
  487. DBUILD    =    $(BUILD)
  488.  
  489. #alldicts:    normdicts plusdicts
  490. normdicts:    $(DBUILD)english.sml $(DBUILD)english.med $(DBUILD)english.lrg
  491. #plusdicts:    $(DBUILD)english.sml+ $(DBUILD)english.med+
  492. #plusdicts:    $(DBUILD)english.lrg+
  493.  
  494. dictcomponents:    $(CBUILD)english.0 $(CBUILD)english.1 $(CBUILD)english.2
  495. dictcomponents: $(CBUILD)american.0 $(CBUILD)american.1 $(CBUILD)american.2
  496. dictcomponents: $(CBUILD)altamer.0 $(CBUILD)altamer.1 $(CBUILD)altamer.2
  497. dictcomponents: $(CBUILD)british.0 $(CBUILD)british.1 $(CBUILD)british.2
  498.  
  499. $(CBUILD)english.0:    unsq eng.0.??
  500.     cat eng.0.?? | ./unsq > english.0
  501.  
  502. $(CBUILD)english.1:    unsq eng.1.??
  503.     cat eng.1.?? | ./unsq > english.1
  504.  
  505. $(CBUILD)english.2:    unsq eng.2.??
  506.     cat eng.2.?? | ./unsq > english.2
  507.  
  508. $(CBUILD)american.0:    unsq amer.0.??
  509.     cat amer.0.?? | ./unsq > american.0
  510.  
  511. $(CBUILD)american.1:    unsq amer.1.??
  512.     cat amer.1.?? | ./unsq > american.1
  513.  
  514. $(CBUILD)american.2:    unsq amer.2.??
  515.     cat amer.2.?? | ./unsq > american.2
  516.  
  517. $(CBUILD)altamer.0:    unsq altamer.0.??
  518.     cat altamer.0.?? | ./unsq > altamer.0
  519.  
  520. $(CBUILD)altamer.1:    unsq altamer.1.??
  521.     cat altamer.1.?? | ./unsq > altamer.1
  522.  
  523. $(CBUILD)altamer.2:    unsq altamer.2.??
  524.     cat altamer.2.?? | ./unsq > altamer.2
  525.  
  526. $(CBUILD)british.0:    unsq brit.0.??
  527.     cat brit.0.?? | ./unsq > british.0
  528.  
  529. $(CBUILD)british.1:    unsq brit.1.??
  530.     cat brit.1.?? | ./unsq > british.1
  531.  
  532. $(CBUILD)british.2:    unsq brit.2.??
  533.     cat brit.2.?? | ./unsq > british.2
  534.  
  535. $(DBUILD)english.sml:    english.0 american.0 altamer.0 british.0
  536.     dicts="english.0"; \
  537.         for i in $(DICTVARIANTS); do \
  538.         dicts="$$dicts $$i.0"; \
  539.         done; \
  540.         set -x; \
  541.         sort -u -t/ +0f -1 +0 $(MAKE_SORTTMP) -o english.sml $$dicts
  542.  
  543. #$(DBUILD)english.sml+:    munchable $(EXTRADICT)
  544. #$(DBUILD)english.sml+:    english.0 american.0 altamer.0 british.0
  545. #    dicts="english.0 $(EXTRADICT)"; \
  546. #        for i in $(DICTVARIANTS); do \
  547. #        dicts="$$dicts $$i.0"; \
  548. #        done; \
  549. #        set -x; \
  550. #        PATH=:$$PATH munchlist -l $(DEFLANG) $$dicts > english.sml+
  551.  
  552. $(DBUILD)english.med:    english.0 american.0 altamer.0 british.0
  553. $(DBUILD)english.med:    english.1 american.1 altamer.1 british.1
  554.     dicts="english.0 english.1"; \
  555.         for i in $(DICTVARIANTS); do \
  556.         dicts="$$dicts $$i.0 $$i.1"; \
  557.         done; \
  558.         set -x; \
  559.         sort -u -t/ +0f -1 +0 $(MAKE_SORTTMP) -o english.med $$dicts
  560.  
  561. #$(DBUILD)english.med+:    munchable $(EXTRADICT)
  562. #$(DBUILD)english.med+:    english.0 american.0 altamer.0 british.0
  563. #$(DBUILD)english.med+:    english.1 american.1 altamer.1 british.1
  564. #    dicts="english.0 english.1 $(EXTRADICT)"; \
  565. #        for i in $(DICTVARIANTS); do \
  566. #        dicts="$$dicts $$i.0 $$i.1"; \
  567. #        done; \
  568. #        set -x; \
  569. #        PATH=:$$PATH munchlist -l $(DEFLANG) $$dicts > english.med+
  570.  
  571. $(DBUILD)english.lrg:    english.0 american.0 altamer.0 british.0
  572. $(DBUILD)english.lrg:    english.1 american.1 altamer.1 british.1
  573. $(DBUILD)english.lrg:    english.2 american.2 altamer.2 british.2
  574.     dicts="english.0 english.1 english.2"; \
  575.         for i in $(DICTVARIANTS); do \
  576.         dicts="$$dicts $$i.0 $$i.1 $$i.2"; \
  577.         done; \
  578.         set -x; \
  579.         sort -u -t/ +0f -1 +0 $(MAKE_SORTTMP) -o english.lrg $$dicts
  580.  
  581. #$(DBUILD)english.lrg+:    munchable $(EXTRADICT)
  582. #$(DBUILD)english.lrg+:    english.0 american.0 altamer.0 british.0
  583. #$(DBUILD)english.lrg+:    english.1 american.1 altamer.1 british.1
  584. #$(DBUILD)english.lrg+:    english.2 american.2 altamer.2 british.2
  585. #    dicts="english.0 english.1 english.2 $(EXTRADICT)"; \
  586. #        for i in $(DICTVARIANTS); do \
  587. #        dicts="$$dicts $$i.0 $$i.1 $$i.2"; \
  588. #        done; \
  589. #        set -x; \
  590. #        PATH=:$$PATH munchlist -l $(DEFLANG) $$dicts > english.lrg+
  591.  
  592.  
  593. buildhas.o: buildhas.c config.h ispell.h local.h msgs.h
  594.  
  595. makedent.o: makedent.c config.h ispell.h local.h msgs.h
  596.  
  597. parse.o: parse.y config.h ispell.h local.h msgs.h
  598.  
  599. hash.o: hash.c config.h ispell.h local.h msgs.h
  600.  
  601.  
  602. buildhas: buildhas.o hash.o makedent.o parse.o
  603.     $(CC) $(CFLAGS) -o buildhas.exe buildhas.o hash.o makedent.o \
  604.                             parse.o  $(LIBES)
  605. #        emxbind e:/emx/bin/emx "buildhash"
  606.  
  607.  
  608. icombine: icombine.o makedent.o parse.o
  609.     $(CC) $(CFLAGS) -o icombine icombine.o makedent.o parse.o \
  610.       $(LIBES)
  611. #        emxbind e:/emx/bin/emx ispell
  612.  
  613.  
  614. #EDITFILE=notthere
  615. #OUTFILE=/dev/null
  616.  
  617. #doedit:
  618. #    sed -e 's@!!LIBDIR!!@$(LIBDIR)@' -e 's@!!DEFDICT!!@$(DEFDICT)@' \
  619. #        -e 's@!!DEFHASH!!@$(DEFHASH)@' -e 's@!!DEFLANG!!@$(DEFLANG)@' \
  620. #        $(SORTTMP) < $(EDITFILE) > $(OUTFILE)
  621.  
  622. #findaffix:    findaffix.X Makefile
  623. #    @$(MAKE) EDITFILE=findaffix.X OUTFILE=findaffix doedit
  624. #    chmod +x findaffix
  625.  
  626. #fixdict:    fixdict.X Makefile
  627. #    @$(MAKE) EDITFILE=fixdict.X OUTFILE=fixdict doedit
  628. #    chmod +x fixdict
  629.  
  630. #munchlist:    munchlist.X Makefile
  631. #    @$(MAKE) EDITFILE=munchlist.X OUTFILE=munchlist doedit
  632. #    chmod +x munchlist
  633.  
  634. #subset:    subset.X Makefile
  635. #    @$(MAKE) EDITFILE=subset.X OUTFILE=subset doedit
  636. #    chmod +x subset
  637.  
  638. #tryaffix:    tryaffix.X Makefile
  639. #    @$(MAKE) EDITFILE=tryaffix.x OUTFILE=tryaffix doedit
  640. #    chmod +x tryaffix
  641.  
  642. #zapdups:    zapdups.X Makefile
  643. #    @$(MAKE) EDITFILE=zapdups.X OUTFILE=zapdups doedit
  644. #    chmod +x zapdups
  645.  
  646.  
  647. ispell.o: ispell.c config.h ispell.h version.h local.h msgs.h
  648.  
  649. correct.o: correct.c config.h ispell.h local.h msgs.h
  650.  
  651. defmt.o: defmt.c config.h ispell.h local.h msgs.h
  652.  
  653. dump.o: dump.c config.h ispell.h local.h msgs.h
  654.  
  655. good.o: good.c config.h ispell.h local.h msgs.h
  656.  
  657. lookup.o: lookup.c config.h ispell.h local.h msgs.h
  658.  
  659. term.o: term.c config.h ispell.h  local.h msgs.h
  660.  
  661. tgood.o: tgood.c config.h ispell.h local.h msgs.h
  662.  
  663. tree.o: tree.c config.h ispell.h local.h msgs.h
  664.  
  665. xgets.o: xgets.c config.h ispell.h local.h msgs.h
  666.  
  667. getsetup.o: getsetup.c config.h ispell.h local.h msgs.h
  668.  
  669.  
  670.  
  671. OBJS=ispell.o correct.o defmt.o dump.o good.o lookup.o hash.o \
  672.      makedent.o term.o tgood.o tree.o xgets.o getsetup.o
  673.  
  674. ispell: $(OBJS)
  675.     $(CC) $(CFLAGS) -o ispell.exe $(OBJS) $(TERMLIB) $(REGLIB) $(LIBES)
  676.  
  677. ispellb: $(OBJS)
  678.     $(CC) $(CFLAGS) -o ispell $(OBJS) $(TERMLIB) $(REGLIB) $(LIBES)
  679.         emxbind e:\emx\bin\emx ispell ispellb.exe
  680.  
  681. #$(OBJS) buildhash.o icombine.o hash.o parse.o: config.h ispell.h local.h m.gs.h
  682.  
  683.  
  684. # disabling the feature  jbh
  685. #config.h:    config.X Makefile
  686. #    @$(MAKE) EDITFILE=config.X OUTFILE=config.h doedit
  687.  
  688. #    Create a sample local.h if no such file currently exists
  689. #local.h:
  690. #    [ -r local.h ]  ||  cp local.h.samp local.h
  691.  
  692. tags:    config.h *.[chy]
  693.     ctags -w -t *.[chy]
  694.     sed -e s/config.h/config.X/ tags > ntags
  695.     mv ntags tags
  696.  
  697. TAGS:    config.h *.[chy]
  698.     etags -t *.[chy]
  699.     sed -e s/config.h/config.X/ TAGS > NTAGS
  700.     mv NTAGS TAGS
  701.  
  702. #lint:    config.h ispell.h msgs.h *.[cy]
  703. #    @$(LINT) $(LINTFLAGS) ispell.c correct.c defmt.c dump.c good.c \
  704. #        hash.c lookup.c makedent.c tgood.c term.c tree.c xgets.c
  705. #    @yacc parse.y
  706. #    @$(LINT) $(LINTFLAGS) buildhash.c hash.c makedent.c y.tab.c
  707. #    @$(LINT) $(LINTFLAGS) icombine.c makedent.c y.tab.c
  708. #    @rm -f y.tab.c
  709.  
  710. clean:
  711.     rm -f *.o core a.out mon.out hash.out \
  712.         *.stat *.cnt config.h $(DEFHASH) $(FOREIGNHASHES)
  713.     rm -f buildhash findaffix tryaffix fixdict ispell icombine \
  714.         munchlist subset sq unsq zapdups
  715.  
  716. #
  717. #    The following target allows you to clean out the leftover raw
  718. #    files gotten from unpacking the kit.  It makes sure that you
  719. #    have the combined files first, so it may take a little while
  720. #    to run.
  721. #
  722. kitclean:
  723.     $(MAKE) dictcomponents
  724.     rm -f eng.[012].?? amer.[012].?? altamer.[012].?? brit.[012].??
  725.  
  726. #
  727. #    The following target allows you to clean out the combined
  728. #    dictionary files.  For safety, so you don't lose your files,
  729. #    it makes sure that there is something to work from, but it can
  730. #    only be so smart, so be careful!
  731. #
  732. dictclean:
  733.     rm -f english.sml english.sml+ english.med english.med+
  734.     rm -f english.lrg english.lrg+
  735.     ok=yes; \
  736.         for i in eng amer altamer brit; do \
  737.         for j in 0 1 2; do \
  738.             [ -r $$i.$$j.aa ]  ||  ok=no; \
  739.         done; \
  740.         done; \
  741.         if [ $$ok = yes ]; then \
  742.         rm -f english.[012] american.[012]; \
  743.         rm -f altamer.[012] british.[012]; \
  744.         fi
  745.