Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/ldap/Makefile.com
+++ new/usr/src/cmd/ldap/Makefile.com
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 # Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 # Copyright (c) 2018, Joyent, Inc.
24 24 #
25 25 # cmd/ldap/Makefile.com
26 26 # Native LDAP II commands (makestyle clean).
27 27 #
28 28 include $(SRC)/cmd/Makefile.cmd
29 29
30 30 LDAPMOD= ldapmodify
31 31 LDAPADD= ldapadd
32 32 LDAPPROG= ldapmodrdn ldapsearch ldapdelete $(LDAPMOD)
33 33 LDAPSRCS= $(LDAPPROG:%=../common/%.c)
34 34 LDAPOBJS= $(LDAPPROG:%=%.o)
35 35
36 36 #ldap common
37 37 LDAPCOMMSRC= common.c ldaptool-sasl.c fileurl.c convutf8.c
38 38 LDAPCOMMOBJS= $(LDAPCOMMSRC:%.c=%.o)
39 39
40 40 # LDAP Naming service commands
41 41 # idsconfig command
42 42 IDSCONFIGPROG= idsconfig
43 43 IDSCONFIGSRC= idsconfig.sh
44 44
45 45 # ldaplist command
46 46 LDAPLISTPROG= ldaplist
47 47 LDAPLISTSRCS= ldaplist.c mapping.c printResult.c standalone.c
48 48 LDAPLISTOBJS= $(LDAPLISTSRCS:%.c=%.o)
49 49
50 50 # ldapaddent command
51 51 LDAPADDENTPROG= ldapaddent
52 52 LDAPADDENTSRCS= ldapaddent.c ldapaddrbac.c ldapaddtsol.c standalone.c
53 53 LDAPADDENTOBJS= $(LDAPADDENTSRCS:%.c=%.o)
54 54
55 55 # ldapclient command
56 56 LDAPCLIENTPROG= ldapclient
57 57 LDAPCLIENTSRCS= ldapclient.c standalone.c
58 58 LDAPCLIENTOBJS= $(LDAPCLIENTSRCS:%.c=%.o)
59 59
60 60
61 61 NSLDAPOBJS= $(LDAPLISTOBJS) $(LDAPADDENTOBJS) $(LDAPCLIENTOBJS)
62 62 NSLDAPSRCS= $(LDAPLISTSRCS) $(LDAPADDENTSRCS) $(LDAPCLIENTSRCS)
63 63
64 64 OBJS= $(LDAPOBJS) $(NSLDAPOBJS) $(LDAPCOMMOBJS)
65 65 SRCS= $(LDAPSRCS) $(NSLDAPSRCS)
66 66 ROOTUSRSBIN= $(ROOT)/usr/sbin
67 67 ROOTUSRLIBLDAP= $(ROOT)/usr/lib/ldap
68 68
69 69 ROOTSCRIPT= $(IDSCONFIGPROG:%=$(ROOTUSRLIBLDAP)/%)
70 70 ROOTSBIN= $(LDAPADDENTPROG:%=$(ROOTUSRSBIN)/%) \
71 71 $(LDAPCLIENTPROG:%=$(ROOTUSRSBIN)/%)
72 72
73 73 PROG= $(LDAPPROG) $(LDAPLISTPROG)
74 74 ROOTADD= $(ROOTBIN)/$(LDAPADD)
75 75 ROOTMOD= $(ROOTBIN)/$(LDAPMOD)
76 76 ALLPROG= all $(ROOTADD)
77 77
78 78 CLOBBERFILES += $(OBJS) $(PROG) $(LDAPCLIENTPROG) $(LDAPADDENTPROG) \
79 79 $(IDSCONFIGPROG) $(LINTOUT)
80 80
↓ open down ↓ |
80 lines elided |
↑ open up ↑ |
81 81 # creating /var/ldap directory
82 82 ROOTVAR_LDAP= $(ROOT)/var/ldap
83 83
84 84 LINTFLAGS += -erroff=E_INCONS_ARG_DECL2
85 85 LINTFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
86 86
87 87 CERRWARN += -_gcc=-Wno-implicit-function-declaration
88 88 CERRWARN += -_gcc=-Wno-parentheses
89 89 CERRWARN += -_gcc=-Wno-unused-function
90 90 CERRWARN += -_gcc=-Wno-unused-variable
91 -CERRWARN += -_gcc=-Wno-uninitialized
91 +CERRWARN += $(CNOWARN_UNINIT)
92 92
93 93 # not linted
94 94 SMATCH=off
95 95
96 96 all:= TARGET= all
97 97 install:= TARGET= install
98 98 clean:= TARGET= clean
99 99 clobber:= TARGET= clobber
100 100 lint:= TARGET= lint
101 101
102 102 # C Pre-Processor flags used by C, CC & lint
103 103 CPPFLAGS += -DSUN -DSVR4 -DSOLARIS_LDAP_CMD \
104 104 -I $(SRC)/lib/libldap5/include/ldap \
105 105 -I $(SRC)/lib/libsldap/common \
106 106 -I $(SRC)/lib/libnsl/include/rpcsvc \
107 107 -DNO_LIBLCACHE -DLDAP_REFERRALS -DNET_SSL -DLDAPSSLIO \
108 108 -DHAVE_SASL_OPTIONS -DSOLARIS_LDAP_CMD
109 109 LDLIBS += $(COMPLIB)
110 110
111 111 ldapmodrdn := LDLIBS += -lldap
112 112 ldapsearch := LDLIBS += -lldap
113 113 ldapdelete := LDLIBS += -lldap
114 114 ldapmodify := LDLIBS += -lldap
115 115 ldaplist := LDLIBS += -lsldap
116 116 ldapaddent := LDLIBS += -lsldap -lnsl -lsecdb
117 117 ldapclient := LDLIBS += -lsldap -lscf
118 118
119 119 ldaplist := CSTD = $(CSTD_GNU99)
120 120 ldapaddent := CSTD = $(CSTD_GNU99)
121 121 ldapclient := CSTD = $(CSTD_GNU99)
122 122
123 123 lint := LDLIBS += -lldap
124 124
125 125 .KEEP_STATE:
126 126
127 127 all: $(PROG) $(LDAPCLIENTPROG) $(LDAPADDENTPROG) $(IDSCONFIGPROG)
128 128
129 129 $(LDAPADD): $(LDAPMOD)
130 130 @$(RM) $(LDAPADD); $(LN) $(LDAPMOD) $(LDAPADD)
131 131
132 132 $(LDAPPROG): ../common/$$@.c $(LDAPCOMMOBJS)
133 133 $(LINK.c) -o $@ ../common/$@.c $(LDAPCOMMOBJS) $(LDLIBS)
134 134 $(POST_PROCESS)
135 135
136 136 %.o: ../common/%.c
137 137 $(COMPILE.c) -o $@ $<
138 138 $(POST_PROCESS_O)
139 139
140 140 %.o: ../ns_ldap/%.c
141 141 $(COMPILE.c) -o $@ $<
142 142 $(POST_PROCESS_O)
143 143
144 144 idsconfig: ../ns_ldap/$$@.sh
145 145 $(CP) ../ns_ldap/$(IDSCONFIGSRC) $(IDSCONFIGPROG)
146 146 $(CHMOD) 755 $(IDSCONFIGPROG)
147 147
148 148 ldaplist: $(LDAPLISTOBJS)
149 149 $(LINK.c) -o $@ $(LDAPLISTOBJS) $(LDLIBS)
150 150 $(POST_PROCESS)
151 151
152 152 ldapaddent: $(LDAPADDENTOBJS)
153 153 $(LINK.c) -o $@ $(LDAPADDENTOBJS) $(LDLIBS)
154 154 $(POST_PROCESS)
155 155
156 156 ldapclient: $(LDAPCLIENTOBJS)
157 157 $(LINK.c) -o $@ $(LDAPCLIENTOBJS) $(LDLIBS)
158 158 $(POST_PROCESS)
159 159
160 160 install: all $(ROOTVAR_LDAP) $(ROOTUSRLIBLDAP) $(ROOTADD) $(ROOTSBIN) \
161 161 $(ROOTSCRIPT)
162 162
163 163 $(ROOTUSRLIBLDAP):
164 164 $(INS.dir)
165 165
166 166 $(ROOTVAR_LDAP):
167 167 $(INS.dir)
168 168
169 169 $(ROOTADD): $(ROOTPROG)
170 170 $(RM) $@
171 171 $(LN) $(ROOTMOD) $@
172 172
173 173 $(ROOTUSRLIBLDAP)/%: %
174 174 $(INS.file)
175 175
176 176 FRC:
177 177
178 178 clean:
179 179 $(RM) $(OBJS)
180 180
181 181 # Not linted Mozilla upstream commands
182 182 lint: lintns_ldaplist lintns_ldapaddent lintns_ldapclient
183 183
184 184 lintns_ldaplist := CSTD = $(CSTD_GNU99)
185 185
186 186 lintns_ldaplist:
187 187 $(LINT.c) $(LDAPLISTSRCS:%=../ns_ldap/%) $(LDLIBS) -lsldap
188 188
189 189 lintns_ldapaddent := CSTD = $(CSTD_GNU99)
190 190
191 191 lintns_ldapaddent:
192 192 $(LINT.c) $(LDAPADDENTSRCS:%=../ns_ldap/%) $(LDLIBS) -lsldap -lnsl \
193 193 -lsecdb
194 194
195 195 lintns_ldapclient := CSTD = $(CSTD_GNU99)
196 196
197 197 lintns_ldapclient:
198 198 $(LINT.c) $(LDAPCLIENTSRCS:%=../ns_ldap/%) $(LDLIBS) -lsldap -lscf
199 199
200 200 lintc_%:
201 201 $(LINT.c) $(@:lintc_%=../common/%.c) $(LDAPCOMMSRC:%=../common/%) \
202 202 $(LDLIBS)
203 203
204 204 include $(SRC)/cmd/Makefile.targ
↓ open down ↓ |
103 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX