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