Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/rpcsvc/Makefile
+++ new/usr/src/cmd/rpcsvc/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 -#
26 -# cmd/rpcsvc/Makefile
25 +# Copyright (c) 2018, Joyent, Inc.
27 26
28 27 PROTOCOL_DIR= $(ROOT)/usr/include/rpcsvc
29 28
30 29 BINPROG= rusers rup
31 30 SBINPROG= rwall spray
32 31 RPROG= rpc.rusersd
33 32 SPROG= rpc.sprayd
34 33 WPROG= rpc.rwalld
35 34 TPROG= rpc.rstatd
36 35
37 36 PROG= $(BINPROG) $(SBINPROG) $(RPROG) $(SPROG) $(WPROG) $(TPROG)
38 37
39 38 MANIFEST= \
40 39 rusers.xml \
41 40 spray.xml \
42 41 wall.xml \
43 42 rstat.xml
44 43
45 44 SVCMETHOD=
46 45
47 46 SCLNTOBJS= spray.o spray_clnt.o
48 47 SSVCOBJS= spray_subr.o spray_svc.o
49 48 WCLNTOBJS = rwall.o rwall_clnt.o
50 49 WSVCOBJS= rwall_subr.o rwall_svc.o
51 50 TSVCOBJS= rstat_main.o rstat_proc.o rstat_svc.o rstat_v2_svc.o rstat_v2_xdr.o
52 51
53 52 DERIVED_FILES = rstat.x rstat.h rstat_svc.c rstat_v2.h rstat_v2_svc.c \
54 53 rstat_v2_xdr.c spray.x spray.h spray_clnt.c spray_svc.c \
55 54 rwall.x rwall.h rwall_svc.c rwall_clnt.c
56 55
↓ open down ↓ |
20 lines elided |
↑ open up ↑ |
57 56 include ../Makefile.cmd
58 57
59 58 ROOTMANIFESTDIR= $(ROOTSVCNETWORKRPC)
60 59
61 60 CPPFLAGS= -I. $(CPPFLAGS.master)
62 61 CERRWARN += -_gcc=-Wno-implicit-function-declaration
63 62 CERRWARN += -_gcc=-Wno-unused-variable
64 63 CERRWARN += -_gcc=-Wno-parentheses
65 64 CERRWARN += -_gcc=-Wno-extra
66 65 CERRWARN += -_gcc=-Wno-unused-function
66 +
67 +# not linted
68 +SMATCH=off
69 +
67 70 LDLIBS += -lnsl
68 71 rusers := CFLAGS += $(CCVERBOSE)
69 72 $(BINPROG) := LDLIBS += -lrpcsvc
70 73 $(RPROG) := LDLIBS += -lrpcsvc
71 74 $(SPROG) := LDLIBS += -lrpcsvc
72 75 $(TPROG) := LDLIBS += -lrpcsvc
73 76 spray := LDLIBS += -lrpcsvc
74 77
75 78
76 79 SUBDIRS= rpc.bootparamd
77 80 OBJS= $(SCLNTOBJS) $(SSVCOBJS) $(WCLNTOBJS) $(WSVCOBJS) $(TSVCOBJS)
78 81 SRCS= $(OBJS:%.o=%.c) rusers.c rpc.rusersd.c rup.c
79 82
80 83 ETCFILES= rpc
81 84
82 85 TXTS= $(ETCFILES:%=net_files/%)
83 86
84 87 NETSVC= $(ROOTLIB)/netsvc
85 88 NIS = $(NETSVC)/nis
86 89 RWALL= $(NETSVC)/rwall
87 90 RUSERS= $(NETSVC)/rusers
88 91 SPRAY= $(NETSVC)/spray
89 92 RSTAT= $(NETSVC)/rstat
90 93
91 94 ROOTDIRS= \
92 95 $(NETSVC) \
93 96 $(NIS) \
94 97 $(RWALL) \
95 98 $(RUSERS) \
96 99 $(SPRAY) \
97 100 $(RSTAT)
98 101
99 102 IBINPROG= $(BINPROG:%=$(ROOTBIN)/%)
100 103 ISBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%)
101 104 IWPROG= $(WPROG:%=$(RWALL)/%)
102 105 ISPROG= $(SPROG:%=$(SPRAY)/%)
103 106 IRPROG= $(RPROG:%=$(RUSERS)/%)
104 107 ITPROG= $(TPROG:%=$(RSTAT)/%)
105 108 IETCFILES= $(ETCFILES:%=$(ROOTETC)/%)
106 109
107 110 # non-default file attributes
108 111 $(ROOTETC)/rpc := FILEMODE= 0644
109 112
110 113 all:= TARGET= all
111 114 install:= TARGET= install
112 115 clean:= TARGET= clean
113 116 clobber:= TARGET= clobber
114 117 lint:= TARGET= lint
115 118
116 119 rpc.rstatd:= LDLIBS += -lkstat
117 120 rwall:= CPPFLAGS += -D_REENTRANT
118 121 rpc.rwalld:= CPPFLAGS += -D_REENTRANT
119 122
120 123 # install rules
121 124
122 125 $(RWALL)/% $(SPRAY)/% $(RUSERS)/% $(RSTAT)/%: %
123 126 $(INS.file)
124 127
125 128 $(ROOTETC)/%: ./net_files/%
126 129 $(INS.file)
127 130
128 131 .KEEP_STATE:
129 132
130 133 all: $(PROG) $(TXTS) $(SUBDIRS)
131 134
132 135 # multi-object targets
133 136 #
134 137 spray: $(SCLNTOBJS)
135 138 $(LINK.c) $(SCLNTOBJS) -o $@ $(LDLIBS)
136 139 $(POST_PROCESS)
137 140
138 141 spray_svc.o spray_clnt.o: spray.h
139 142
140 143 rpc.sprayd: $(SSVCOBJS)
141 144 $(LINK.c) $(SSVCOBJS) -o $@ $(LDLIBS)
142 145 $(POST_PROCESS)
143 146
144 147 rwall_svc.o rwall_clnt.o: rwall.h
145 148
146 149 rwall: $(WCLNTOBJS)
147 150 $(LINK.c) $(WCLNTOBJS) -o $@ $(LDLIBS)
148 151 $(POST_PROCESS)
149 152
150 153 rpc.rwalld: $(WSVCOBJS)
151 154 $(LINK.c) $(WSVCOBJS) -o $@ $(LDLIBS)
152 155 $(POST_PROCESS)
153 156
154 157 rstat_main.o: rstat.h rstat_v2.h
155 158
156 159 rstat_svc.o: rstat.h
157 160
158 161 rstat_V2_svc.o rstat_V2_xdr.o: rstat_v2.h
159 162
160 163 rpc.rstatd: $(TSVCOBJS)
161 164 $(LINK.c) $(TSVCOBJS) -o $@ $(LDLIBS)
162 165 $(POST_PROCESS)
163 166
164 167 install: $(PROG) $(TXTS) .WAIT $(ROOTDIRS) .WAIT $(IBINPROG) $(ISBINPROG) \
165 168 $(IWPROG) $(ISPROG) $(IRPROG) $(ITPROG) $(IETCFILES) $(SUBDIRS) \
166 169 $(ROOTMANIFEST) $(ROOTSVCMETHOD)
167 170
168 171 $(ROOTDIRS):
169 172 $(INS.dir)
170 173
171 174 $(SUBDIRS): FRC
172 175 @cd $@; pwd; $(MAKE) $(TARGET)
173 176
174 177 #
175 178 # Derived files
176 179 #
177 180
178 181 rstat.x: $(PROTOCOL_DIR)/rstat.x
179 182 $(RM) rstat.x
180 183 $(CP) $(PROTOCOL_DIR)/rstat.x rstat.x
181 184
182 185 rstat.h: $(PROTOCOL_DIR)/rstat.h
183 186 $(RM) rstat.h
184 187 $(CP) $(PROTOCOL_DIR)/rstat.h rstat.h
185 188
186 189 rstat_svc.c: rstat.x
187 190 $(RPCGEN) -C -m rstat.x > $@
188 191
189 192 rstat_v2.h: rstat_v2.x
190 193 $(RPCGEN) -C -h rstat_v2.x > $@
191 194
192 195 rstat_v2_svc.c: rstat_v2.x
193 196 $(RPCGEN) -C -m rstat_v2.x > $@
194 197
195 198 rstat_v2_xdr.c: rstat_v2.x
196 199 $(RPCGEN) -c rstat_v2.x > $@
197 200
198 201 spray.x: $(PROTOCOL_DIR)/spray.x
199 202 $(RM) spray.x
200 203 $(CP) $(PROTOCOL_DIR)/spray.x spray.x
201 204
202 205 spray.h: $(PROTOCOL_DIR)/spray.h
203 206 $(RM) spray.h
204 207 $(CP) $(PROTOCOL_DIR)/spray.h spray.h
205 208
206 209 spray_svc.c: spray.x
207 210 $(RPCGEN) -s datagram_v -s circuit_v spray.x > $@
208 211
209 212 spray_clnt.c: spray.x
210 213 $(RPCGEN) -l spray.x > $@
211 214
212 215 rwall.x: $(PROTOCOL_DIR)/rwall.x
213 216 $(RM) rwall.x
214 217 $(CP) $(PROTOCOL_DIR)/rwall.x rwall.x
215 218
216 219 rwall.h: $(PROTOCOL_DIR)/rwall.h
217 220 $(RM) rwall.h
218 221 $(CP) $(PROTOCOL_DIR)/rwall.h rwall.h
219 222
220 223 rwall_svc.c: rwall.x
221 224 $(RPCGEN) -A -s datagram_v rwall.x > $@
222 225
223 226 rwall_clnt.c: rwall.x
224 227 $(RPCGEN) -l -M rwall.x > $@
225 228
226 229 check: $(CHKMANIFEST)
227 230
228 231 clean: $(SUBDIRS)
229 232 -$(RM) $(OBJS) $(DERIVED_FILES)
230 233
231 234 clobber: $(SUBDIRS)
232 235
233 236 lint:
234 237 $(LINT.c) $(WCLNTOBJS:%.o=%.c) -lnsl -lrpcsvc
235 238 $(LINT.c) $(WSVCOBJS:%.o=%.c) -lnsl -lrpcsvc
236 239 $(LINT.c) rusers.c -lnsl -lrpcsvc
237 240
238 241 FRC:
239 242
240 243 include ../Makefile.targ
↓ open down ↓ |
164 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX