8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / spell / Makefile
blob659481df0a148bb542c799d5a9a86fa74403b702
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License, Version 1.0 only
6 # (the "License"). You may not use this file except in compliance
7 # with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
20 # CDDL HEADER END
23 # Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
27 HASHPROG= hashmk1 spellin1
28 SHPROG= spell compress
29 HASHTAB= hlista hlistb hstop
30 BINPROG= spellprog spellin hashmake hashcheck
31 PROG= $(SHPROG) $(BINPROG) $(HASHPROG) $(HASHTAB) spellhist
33 SPELLPROGSRC= spellprog.c hash.c hashlook.c huff.c
34 SPELLPROGOBJ= $(SPELLPROGSRC:%.c=%.o)
36 SPELLINSRC= spellin.c huff.c
37 SPELLINOBJ= $(SPELLINSRC:%.c=%.o)
39 HASHCHECKSRC= hashcheck.c hash.c huff.c
40 HASHCHECKOBJ= $(HASHCHECKSRC:%.c=%.o)
42 HASHMAKESRC= hashmake.c hash.c
43 HASHMAKEOBJ= $(HASHMAKESRC:%.c=%.o)
45 SRCS= $(SPELLPROGSRC) spellin.c hashcheck.c hashmake.c
46 OBJS= $(SRCS:%.c=%.o)
48 WORDS= american british local list extra stop
49 TXTS= compress.sh spell.sh
51 include ../Makefile.cmd
53 CFLAGS += $(CCVERBOSE)
54 CERRWARN += -_gcc=-Wno-parentheses
56 XGETFLAGS += -a -x spell.xcl
58 CLOBBERFILES += htemp1 htemp2
60 ROOTSPELLD = $(ROOTLIB)/spell
61 ROOTVARADMD = $(ROOT)/var/adm
62 ROOTDIRS= $(ROOTSPELLD)
64 BINF= spell
65 SPELLF= spellprog hashmake hashcheck spellin hstop hlistb hlista compress
66 VARADMF= spellhist
68 ROOTBINF = $(BINF:%=$(ROOTBIN)/%)
69 ROOTSPELLF = $(SPELLF:%=$(ROOTSPELLD)/%)
70 ROOTVARADMF = $(VARADMF:%=$(ROOTVARADMD)/%)
72 HASHFILEMODE = 0644
73 $(ROOTSPELLD)/hstop $(ROOTSPELLD)/hlistb \
74 $(ROOTSPELLD)/hlista := FILEMODE = 0644
75 $(ROOTVARADMF) := FILEMODE = 0666
77 spellin1 hashmk1 := CC = $(NATIVECC)
78 spellin1 hashmk1 := POST_PROCESS =
79 spellin1 hashmk1 := CPPFLAGS =
80 spellin1 hashmk1 := LDFLAGS =
82 $(ROOTSPELLD)/% $(ROOTVARADMD)/% : %
83 $(INS.file)
85 .KEEP_STATE:
87 all: $(PROG) $(TXTS)
89 spellprog: $(SPELLPROGOBJ)
90 $(LINK.c) $(SPELLPROGOBJ) -o $@ $(LDLIBS)
91 $(POST_PROCESS)
93 spellin spellin1: $(SPELLINOBJ)
94 $(LINK.c) $(SPELLINOBJ) -o $@ $(LDLIBS)
95 $(POST_PROCESS)
97 spellhist:
98 $(ECHO) '\c' > spellhist
100 hashcheck: $(HASHCHECKOBJ)
101 $(LINK.c) $(HASHCHECKOBJ) -o $@ $(LDLIBS)
102 $(POST_PROCESS)
104 hashmake hashmk1: $(HASHMAKEOBJ)
105 $(LINK.c) $(HASHMAKEOBJ) -o $@ $(LDLIBS)
106 $(POST_PROCESS)
108 htemp1: list local extra hashmk1
109 $(RM) $@; cat list local extra | $(_SH_) ./hashmk1 > $@
111 hlista: american $(HASHPROG) htemp1
112 $(RM) htemp2; ./hashmk1 <american |sort -u - htemp1 >htemp2
113 $(RM) $@; ./spellin1 `wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2 >$@
114 $(RM) htemp2
116 hlistb: british $(HASHPROG) htemp1
117 $(RM) htemp2; ./hashmk1 <british |sort -u - htemp1 >htemp2
118 $(RM) $@; ./spellin1 `wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2 >$@
119 $(RM) htemp2
121 hstop: stop $(HASHPROG)
122 $(RM) htemp2; ./hashmk1 <stop | sort -u >htemp2
123 $(RM) $@; ./spellin1 `wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2 >$@
124 $(RM) htemp2
126 install: all $(ROOTDIRS) $(ROOTBINF) $(ROOTSPELLF) $(ROOTVARADMF)
128 $(ROOTDIRS):
129 $(INS.dir)
131 lint: lint_SRCS
133 clean:
134 $(RM) $(OBJS)
136 include ../Makefile.targ