home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / isp31b3.zip / ispell / makefile < prev    next >
Makefile  |  1995-07-10  |  18KB  |  578 lines

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