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