Print this page
8516 Suppress gcc errors with -Wno- in Makefile 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 2017 Gary Mills
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 +# Suppress the error for: lp
103 +ns_files.o := CERRWARN += -_gcc=-Wno-unused-but-set-parameter
104 +# Suppress the error for: lastread
105 +autod_nfs.o := CERRWARN += -_gcc=-Wno-unused-but-set-variable
106 +
101 107 OBJS= $(AUTOOBJS) $(MOUNTOBJS) $(TYPEOBJS) \
102 108 $(SHAREOBJS) $(UNSHAREOBJS)
103 109
104 110 AUTOSRCS= automount.c $(COMMON:%.o=%.c) $(FSLIBSRC)
105 111 MOUNTSRCS= mount.c $(FSLIBSRC)
106 112 TYPESRCS= $(LOCAL:%.o=%.c) $(COMMON:%.o=%.c) \
107 113 ../nfs/lib/replica.c ../nfs/lib/nfs_sec.c \
108 114 ../nfs/lib/nfs_subr.c $(FSLIBSRC) ../nfs/lib/selfcheck.c \
109 115 ../nfs/lib/nfs_resolve.c ../nfs/lib/smfcfg.c
110 116 SHARESRCS= $(SHARE:%=%.c)
111 117 UNSHARESRCS= $(UNSHARE:%=%.c)
112 118 DFSHARESSRCS= $(DFSHARES:%=%.sh)
113 119 SRCS= $(OBJS:%.o=%.c)
114 120
115 121 nfs_sec.o := CPPFLAGS += -DWNFS_SEC_NEGO
116 122
117 123 $(AUTO): $(AUTOOBJS)
118 124 $(LINK.c) -o $@ $(AUTOOBJS) $(LDLIBS)
119 125 $(POST_PROCESS)
120 126
121 127 $(MOUNT): $(MOUNTOBJS)
122 128 $(LINK.c) -o $@ $(MOUNTOBJS) $(LDLIBS)
123 129 $(POST_PROCESS)
124 130
125 131 $(TYPEPROG): webnfs.h $(TYPEOBJS)
126 132 $(LINK.c) -o $@ $(TYPEOBJS) $(LDLIBS)
127 133 $(POST_PROCESS)
128 134
129 135 $(SHARE): $(SHAREOBJS)
130 136 $(LINK.c) -o $@ $(SHAREOBJS) $(LDLIBS)
131 137 $(POST_PROCESS)
132 138
133 139 $(UNSHARE): $(UNSHAREOBJS)
134 140 $(LINK.c) -o $@ $(UNSHAREOBJS) $(LDLIBS)
135 141 $(POST_PROCESS)
136 142
137 143 $(ROOTSVCSYSTEM)/filesystem/%: %
138 144 $(INS.file)
139 145
140 146 DUMP_PROG=malloc_dump
141 147 BUILDDIR=tmp
142 148 DUMP_PROTO=$(BUILDDIR)/$(DUMP_PROG)_client
143 149 XFILE=$(BUILDDIR)/malloc_dump.x
144 150 XLINE= "program DUMP { version VERS \
145 151 { void DUMP_IT(void) = 1000000; } = 2; } = 100099;"
146 152
147 153 $(XFILE): $(BUILDDIR)
148 154 $(RM) $(XFILE)
149 155 echo $(XLINE) > $(XFILE)
150 156
151 157 $(BUILDDIR):
152 158 $(RM) -r $(BUILDDIR)
153 159 mkdir $(BUILDDIR)
154 160
155 161 $(DUMP_PROTO): $(BUILDDIR) $(XFILE)
156 162 cd $(BUILDDIR); $(RM) *.[ch] makefile.malloc_dump ; rpcgen -a `basename $(XFILE)
157 163 cd $(BUILDDIR); $(MAKE) -f makefile.malloc_dump `basename $@`
158 164
159 165 $(DUMP_PROG): $(DUMP_PROTO)
160 166 $(RM) $@
161 167 cp $(DUMP_PROTO) $@
162 168
163 169 clean_dump:
164 170 $(RM) -r $(BUILDDIR)
165 171 $(RM) $(DUMP_PROG)
166 172 $(ROOTUSRSBIN)/$(AUTO):
167 173 $(RM) $@; $(SYMLINK) $(LINKVALUE) $@
168 174
169 175 replica.o: ../nfs/lib/replica.c
170 176 $(COMPILE.c) ../nfs/lib/replica.c
171 177
172 178 nfs_sec.o: ../nfs/lib/nfs_sec.c
173 179 $(COMPILE.c) ../nfs/lib/nfs_sec.c
174 180
175 181 nfs_subr.o: ../nfs/lib/nfs_subr.c
176 182 $(COMPILE.c) ../nfs/lib/nfs_subr.c
177 183
178 184 selfcheck.o: ../nfs/lib/selfcheck.c
179 185 $(COMPILE.c) ../nfs/lib/selfcheck.c
180 186
181 187 smfcfg.o: ../nfs/lib/smfcfg.c
182 188 $(COMPILE.c) ../nfs/lib/smfcfg.c
183 189
184 190 nfs_resolve.o: ../nfs/lib/nfs_resolve.c
185 191 $(COMPILE.c) ../nfs/lib/nfs_resolve.c
186 192
187 193 webnfs_xdr.c: webnfs.x
188 194 $(RPCGEN) -M -C -c -o $@ webnfs.x
189 195
190 196 webnfs_client.c: webnfs.x
191 197 $(RPCGEN) -M -C -l -o $@ webnfs.x
192 198
193 199 webnfs.h: webnfs.x
194 200 $(RPCGEN) -M -C -h -o $@ webnfs.x
195 201
196 202 webnfs.x: ../nfs/lib/webnfs.x
197 203 $(RM) webnfs.x
198 204 cp ../nfs/lib/webnfs.x .
199 205
200 206 catalog: $(POFILE)
201 207
202 208 $(POFILE):
203 209 $(RM) messages.po
204 210 $(SED) -e 's/pr_msg/gettext/' `$(GREP) -l "pr_msg|gettext" *.[ch]` | \
205 211 $(XGETTEXT) $(XGETFLAGS) -
206 212 $(SED) -e '/^# msg/d' -e '/^domain/d' < messages.po > $@
207 213 $(RM) messages.po
208 214
209 215 lint:
210 216 $(LINT.c) $(AUTOSRCS)
211 217 $(LINT.c) $(MOUNTSRCS)
212 218 $(LINT.c) $(TYPESRCS)
213 219
214 220 clean: clean_dump
215 221 $(RM) $(OBJS) webnfs_xdr.c webnfs_client.c webnfs.h webnfs.x
216 222
217 223 check: $(CHKMANIFEST)
↓ open down ↓ |
107 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX