Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/fs.d/autofs/Makefile
+++ new/usr/src/cmd/fs.d/autofs/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 #
23 23 # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 # Copyright 2015 RackTop Systems.
25 +# Copyright (c) 2018, Joyent, Inc.
25 26 #
26 27
27 28 FSTYPE= autofs
28 29 AUTO= automount
29 30 MOUNT= mount
30 31 VERS= .2
31 32 DFSHARES= dfshares
32 33 SHARE= share
33 34 UNSHARE= unshare
34 35 LIBPROG= $(AUTO) $(MOUNT) $(DFSHARES) $(SHARE) $(UNSHARE)
35 36 TYPEPROG= automountd
36 37
37 38 LINKINSTALL= $(ROOTUSRSBIN)/$(AUTO)
38 39 LINKVALUE= ../lib/fs/$(FSTYPE)/$(AUTO)
39 40 MAPS= auto_master auto_home
40 41 MAPINSTALL= $(MAPS:%=$(ROOTETC)/%)
41 42 AUTOFS= autofs
42 43 DEFAULTFILES= autofs.dfl
43 44 SMFMANIFEST= autofs.xml
44 45 SMFMETHOD= svc-autofs
45 46 MFSTINSTALL= $(SMFMANIFEST:%=$(ROOTSVCSYSTEM)/filesystem/%)
46 47 METHODINSTALL= $(SMFMETHOD:%=$(ROOTLIBSVCMETHOD)/%)
47 48
48 49 OTHERINSTALL= $(MAPINSTALL) $(LINKINSTALL) $(ROOTETCDEFAULTFILES) \
49 50 $(MFSTINSTALL) $(METHODINSTALL)
50 51
51 52 UNCHECKED_HDRS= webnfs.h
52 53
53 54 MANIFEST= autofs.xml
54 55 SVCMETHOD= svc-autofs
55 56
56 57 include ../Makefile.fstype
57 58
58 59 $(MAPINSTALL) := FILEMODE= 0644
59 60
60 61 $(MFSTINSTALL) := FILEMODE = 0444
61 62
62 63 REAL_COMMON= debug_alloc.o
63 64 COMMON= ns_generic.o ns_files.o ns_nis.o \
64 65 ns_ldap.o auto_mnttab.o auto_subr.o $(REAL_COMMON)
65 66
66 67 AUTOOBJS= automount.o $(COMMON) $(FSLIB) smfcfg.o
67 68
68 69 MOUNTOBJS= mount.o $(FSLIB) $(REAL_COMMON)
69 70
70 71 LOCAL= autod_main.o \
71 72 autod_parse.o autod_mount.o autod_nfs.o nfs_cast.o \
72 73 autod_autofs.o autod_xdr.o autod_readdir.o autod_lookup.o \
73 74 smfcfg.o
74 75
75 76 TYPEOBJS= $(LOCAL) $(COMMON) replica.o nfs_sec.o nfs_resolve.o nfs_subr.o \
76 77 $(FSLIB) webnfs_xdr.o webnfs_client.o selfcheck.o
77 78
78 79 SHAREOBJS= $(SHARESRCS:%.c=%.o)
79 80
80 81 UNSHAREOBJS= $(UNSHARESRCS:%.c=%.o)
81 82
82 83 POFILE= autofs.po
83 84 GREP= egrep
84 85 SED= sed
85 86
86 87 $(AUTO) := LDLIBS += -lnsl -lsldap -lscf
87 88 $(MOUNT):= LDLIBS += -lscf
88 89 $(TYPEPROG) := LDLIBS += -lrpcsvc -lsocket -lnsl -lsldap -lkstat -lscf
89 90
90 91 CFLAGS += $(CCVERBOSE) -D_FILE_OFFSET_BITS=64
↓ open down ↓ |
56 lines elided |
↑ open up ↑ |
91 92 CPPFLAGS= -I. -I.. -I../nfs/lib $(CPPFLAGS.master) -D_REENTRANT \
92 93 $(MALLOC_DEBUG)
93 94
94 95 CERRWARN += -_gcc=-Wno-parentheses
95 96 CERRWARN += -_gcc=-Wno-unused-variable
96 97 CERRWARN += -_gcc=-Wno-switch
97 98 CERRWARN += -_gcc=-Wno-uninitialized
98 99 CERRWARN += -_gcc=-Wno-unused-label
99 100 CERRWARN += -_gcc=-Wno-unused-function
100 101
102 +# not linted
103 +SMATCH=off
104 +
101 105 OBJS= $(AUTOOBJS) $(MOUNTOBJS) $(TYPEOBJS) \
102 106 $(SHAREOBJS) $(UNSHAREOBJS)
103 107
104 108 AUTOSRCS= automount.c $(COMMON:%.o=%.c) $(FSLIBSRC)
105 109 MOUNTSRCS= mount.c $(FSLIBSRC)
106 110 TYPESRCS= $(LOCAL:%.o=%.c) $(COMMON:%.o=%.c) \
107 111 ../nfs/lib/replica.c ../nfs/lib/nfs_sec.c \
108 112 ../nfs/lib/nfs_subr.c $(FSLIBSRC) ../nfs/lib/selfcheck.c \
109 113 ../nfs/lib/nfs_resolve.c ../nfs/lib/smfcfg.c
110 114 SHARESRCS= $(SHARE:%=%.c)
111 115 UNSHARESRCS= $(UNSHARE:%=%.c)
112 116 DFSHARESSRCS= $(DFSHARES:%=%.sh)
113 117 SRCS= $(OBJS:%.o=%.c)
114 118
115 119 nfs_sec.o := CPPFLAGS += -DWNFS_SEC_NEGO
116 120
117 121 $(AUTO): $(AUTOOBJS)
118 122 $(LINK.c) -o $@ $(AUTOOBJS) $(LDLIBS)
119 123 $(POST_PROCESS)
120 124
121 125 $(MOUNT): $(MOUNTOBJS)
122 126 $(LINK.c) -o $@ $(MOUNTOBJS) $(LDLIBS)
123 127 $(POST_PROCESS)
124 128
125 129 $(TYPEPROG): webnfs.h $(TYPEOBJS)
126 130 $(LINK.c) -o $@ $(TYPEOBJS) $(LDLIBS)
127 131 $(POST_PROCESS)
128 132
129 133 $(SHARE): $(SHAREOBJS)
130 134 $(LINK.c) -o $@ $(SHAREOBJS) $(LDLIBS)
131 135 $(POST_PROCESS)
132 136
133 137 $(UNSHARE): $(UNSHAREOBJS)
134 138 $(LINK.c) -o $@ $(UNSHAREOBJS) $(LDLIBS)
135 139 $(POST_PROCESS)
136 140
137 141 $(ROOTSVCSYSTEM)/filesystem/%: %
138 142 $(INS.file)
139 143
140 144 DUMP_PROG=malloc_dump
141 145 BUILDDIR=tmp
142 146 DUMP_PROTO=$(BUILDDIR)/$(DUMP_PROG)_client
143 147 XFILE=$(BUILDDIR)/malloc_dump.x
144 148 XLINE= "program DUMP { version VERS \
145 149 { void DUMP_IT(void) = 1000000; } = 2; } = 100099;"
146 150
147 151 $(XFILE): $(BUILDDIR)
148 152 $(RM) $(XFILE)
149 153 echo $(XLINE) > $(XFILE)
150 154
151 155 $(BUILDDIR):
152 156 $(RM) -r $(BUILDDIR)
153 157 mkdir $(BUILDDIR)
154 158
155 159 $(DUMP_PROTO): $(BUILDDIR) $(XFILE)
156 160 cd $(BUILDDIR); $(RM) *.[ch] makefile.malloc_dump ; rpcgen -a `basename $(XFILE)
157 161 cd $(BUILDDIR); $(MAKE) -f makefile.malloc_dump `basename $@`
158 162
159 163 $(DUMP_PROG): $(DUMP_PROTO)
160 164 $(RM) $@
161 165 cp $(DUMP_PROTO) $@
162 166
163 167 clean_dump:
164 168 $(RM) -r $(BUILDDIR)
165 169 $(RM) $(DUMP_PROG)
166 170 $(ROOTUSRSBIN)/$(AUTO):
167 171 $(RM) $@; $(SYMLINK) $(LINKVALUE) $@
168 172
169 173 replica.o: ../nfs/lib/replica.c
170 174 $(COMPILE.c) ../nfs/lib/replica.c
171 175
172 176 nfs_sec.o: ../nfs/lib/nfs_sec.c
173 177 $(COMPILE.c) ../nfs/lib/nfs_sec.c
174 178
175 179 nfs_subr.o: ../nfs/lib/nfs_subr.c
176 180 $(COMPILE.c) ../nfs/lib/nfs_subr.c
177 181
178 182 selfcheck.o: ../nfs/lib/selfcheck.c
179 183 $(COMPILE.c) ../nfs/lib/selfcheck.c
180 184
181 185 smfcfg.o: ../nfs/lib/smfcfg.c
182 186 $(COMPILE.c) ../nfs/lib/smfcfg.c
183 187
184 188 nfs_resolve.o: ../nfs/lib/nfs_resolve.c
185 189 $(COMPILE.c) ../nfs/lib/nfs_resolve.c
186 190
187 191 webnfs_xdr.c: webnfs.x
188 192 $(RPCGEN) -M -C -c -o $@ webnfs.x
189 193
190 194 webnfs_client.c: webnfs.x
191 195 $(RPCGEN) -M -C -l -o $@ webnfs.x
192 196
193 197 webnfs.h: webnfs.x
194 198 $(RPCGEN) -M -C -h -o $@ webnfs.x
195 199
196 200 webnfs.x: ../nfs/lib/webnfs.x
197 201 $(RM) webnfs.x
198 202 cp ../nfs/lib/webnfs.x .
199 203
200 204 catalog: $(POFILE)
201 205
202 206 $(POFILE):
203 207 $(RM) messages.po
204 208 $(SED) -e 's/pr_msg/gettext/' `$(GREP) -l "pr_msg|gettext" *.[ch]` | \
205 209 $(XGETTEXT) $(XGETFLAGS) -
206 210 $(SED) -e '/^# msg/d' -e '/^domain/d' < messages.po > $@
207 211 $(RM) messages.po
208 212
209 213 lint:
210 214 $(LINT.c) $(AUTOSRCS)
211 215 $(LINT.c) $(MOUNTSRCS)
212 216 $(LINT.c) $(TYPESRCS)
213 217
214 218 clean: clean_dump
215 219 $(RM) $(OBJS) webnfs_xdr.c webnfs_client.c webnfs.h webnfs.x
216 220
217 221 check: $(CHKMANIFEST)
↓ open down ↓ |
107 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX