build: silence cmd/spell/spellin1
[unleashed.git] / usr / src / cmd / spell / Makefile
blob398e4acd1a3617c1f566c30fe042396101c36bb0
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 CERRWARN += -Wno-parentheses
55 XGETFLAGS += -a -x spell.xcl
57 CLOBBERFILES += htemp1 htemp2
59 ROOTSPELLD = $(ROOTLIB)/spell
60 ROOTVARADMD = $(ROOT)/var/adm
61 ROOTDIRS= $(ROOTSPELLD)
63 BINF= spell
64 SPELLF= spellprog hashmake hashcheck spellin hstop hlistb hlista compress
65 VARADMF= spellhist
67 ROOTBINF = $(BINF:%=$(ROOTBIN)/%)
68 ROOTSPELLF = $(SPELLF:%=$(ROOTSPELLD)/%)
69 ROOTVARADMF = $(VARADMF:%=$(ROOTVARADMD)/%)
71 HASHFILEMODE = 0644
72 $(ROOTSPELLD)/hstop $(ROOTSPELLD)/hlistb \
73 $(ROOTSPELLD)/hlista := FILEMODE = 0644
74 $(ROOTVARADMF) := FILEMODE = 0666
76 spellin1 hashmk1 := CC = $(NATIVECC)
77 spellin1 hashmk1 := POST_PROCESS =
78 spellin1 hashmk1 := CPPFLAGS =
79 spellin1 hashmk1 := LDFLAGS =
81 $(ROOTSPELLD)/% $(ROOTVARADMD)/% : %
82 $(INS.file)
84 .KEEP_STATE:
86 all: $(PROG) $(TXTS)
88 spellprog: $(SPELLPROGOBJ)
89 $(LINK.c) $(SPELLPROGOBJ) -o $@ $(LDLIBS)
90 $(POST_PROCESS)
92 spellin spellin1: $(SPELLINOBJ)
93 $(LINK.c) $(SPELLINOBJ) -o $@ $(LDLIBS)
94 $(POST_PROCESS)
96 spellhist:
97 $(ECHO) '\c' > spellhist
99 hashcheck: $(HASHCHECKOBJ)
100 $(LINK.c) $(HASHCHECKOBJ) -o $@ $(LDLIBS)
101 $(POST_PROCESS)
103 hashmake hashmk1: $(HASHMAKEOBJ)
104 $(LINK.c) $(HASHMAKEOBJ) -o $@ $(LDLIBS)
105 $(POST_PROCESS)
107 htemp1: list local extra hashmk1
108 $(RM) $@; cat list local extra | $(_SH_) ./hashmk1 > $@
110 hlista: american $(HASHPROG) htemp1
111 $(RM) htemp2; ./hashmk1 <american |sort -u - htemp1 >htemp2
112 $(RM) $@; ./spellin1 `wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2 >$@ 2>/dev/null
113 $(RM) htemp2
115 hlistb: british $(HASHPROG) htemp1
116 $(RM) htemp2; ./hashmk1 <british |sort -u - htemp1 >htemp2
117 $(RM) $@; ./spellin1 `wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2 >$@ 2>/dev/null
118 $(RM) htemp2
120 hstop: stop $(HASHPROG)
121 $(RM) htemp2; ./hashmk1 <stop | sort -u >htemp2
122 $(RM) $@; ./spellin1 `wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2 >$@ 2>/dev/null
123 $(RM) htemp2
125 install: all $(ROOTDIRS) $(ROOTBINF) $(ROOTSPELLF) $(ROOTVARADMF)
127 $(ROOTDIRS):
128 $(INS.dir)
131 clean:
132 $(RM) $(OBJS)
134 include ../Makefile.targ