Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/cron/Makefile
+++ new/usr/src/cmd/cron/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 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25 # Copyright (c) 2018, Joyent, Inc.
26 26
27 27 DEFAULTFILES = cron.dfl
28 28
↓ open down ↓ |
28 lines elided |
↑ open up ↑ |
29 29 include ../Makefile.cmd
30 30
31 31 MANIFEST = cron.xml
32 32
33 33 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
34 34 ROOTMETHOD = $(ROOTLIBSVCMETHOD)/svc-cron
35 35
36 36 CPPFLAGS += -D_FILE_OFFSET_BITS=64 -I $(SRC)/common/util
37 37 CERRWARN += -_gcc=-Wno-parentheses
38 38 CERRWARN += -_gcc=-Wno-unused-label
39 -CERRWARN += -_gcc=-Wno-uninitialized
39 +CERRWARN += $(CNOWARN_UNINIT)
40 40 CERRWARN += -_gcc=-Wno-unused-variable
41 41 CERRWARN += -_gcc=-Wno-unused-value
42 42
43 43 # not linted
44 44 SMATCH=off
45 45
46 46 ROOTVAR = $(ROOT)/var
47 47
48 48 ROOTSPCRON = $(ROOTVAR)/spool/cron
49 49 ROOTCROND = $(ROOTETC)/cron.d
50 50 ROOTCRONTABS = $(ROOTSPCRON)/crontabs
51 51 ROOTATJOBS = $(ROOTSPCRON)/atjobs
52 52 ROOTLIBCRON = $(ROOTLIB)/cron
53 53
54 54 PROG1 = cron
55 55 PROG2 = at atq atrm crontab
56 56 XPG6PROG = crontab
57 57 XPG4PROG = at crontab
58 58 PROG = $(PROG1) $(PROG2)
59 59
60 60 SCRIPT = batch
61 61 XPG4SCRIPT = batch.xpg4
62 62
63 63 POFILE= $(PROG1)_cmd.po
64 64 POFILES1= at.po crontab.po funcs.po batch.po
65 65 POFILES= $(POFILES1) atrm.po
66 66 $(POFILES1) := XGETFLAGS= -a -x $(PROG1).xcl
67 67
68 68 ROOTDIRS = $(ROOTSPCRON) $(ROOTCROND) \
69 69 $(ROOTCRONTABS) $(ROOTATJOBS)
70 70
71 71 ROOTPROG = $(PROG1:%=$(ROOTUSRSBIN)/%) $(PROG2:%=$(ROOTBIN)/%) \
72 72 $(SCRIPT:%=$(ROOTBIN)/%) \
73 73 $(XPG6PROG:%=$(ROOTXPG6BIN)/%) \
74 74 $(XPG4PROG:%=$(ROOTXPG4BIN)/%) \
75 75 $(XPG4SCRIPT:%.xpg4=$(ROOTXPG4BIN)/%)
76 76
77 77 ROOTSYMLINK = $(ROOTLIBCRON) $(ROOTETC)/cron
78 78
79 79 GETRESPSRC= $(SRC)/common/util/getresponse.c
80 80 GETRESPOBJ= getresponse.o
81 81 COMMONOBJ1= permit.o
82 82 COMMONOBJ2= funcs.o
83 83 COMMONOBJS= $(COMMONOBJ1) $(COMMONOBJ2)
84 84 CRONOBJS= cron.o elm.o
85 85 ATOBJS= at.o att1.o att2.o
86 86 XPG4OBJS= values-xpg4.o
87 87 ATRMOBJS1= atrm.o
88 88 ATRMOBJS= $(ATRMOBJS1) $(GETRESPOBJ)
89 89 ATQOBJS= atq.o
90 90 CRONTABOBJS1= crontab.o
91 91 CRONTABOBJS= $(CRONTABOBJS1) $(GETRESPOBJ)
92 92
93 93 # /usr/xpg*/bin/crontab isn't linked with values-xpg*.o since it isn't
94 94 # required by any specific behavior differences; this makes these
95 95 # setuid variants less likely to accidently trip over differences that
96 96 # could unintentionally open up a security hole.
97 97 XPG4COMMONOBJS= $(COMMONOBJS:%=objs.xpg4/%)
98 98 XPG4CTOBJS= $(CRONTABOBJS:%=objs.xpg4/%)
99 99 XPG4ATOBJS= $(ATOBJS:%=objs.xpg4/%) $(XPG4OBJS:%=objs.xpg4/%)
100 100 XPG6COMMONOBJS= $(COMMONOBJS:%=objs.xpg6/%)
101 101 XPG6CTOBJS= $(CRONTABOBJS:%=objs.xpg6/%)
102 102
103 103 cron := POBJS = $(CRONOBJS) $(COMMONOBJ2)
104 104 at := POBJS = $(ATOBJS) $(COMMONOBJS)
105 105 at.xpg4 := POBJS = $(XPG4ATOBJS) $(XPG4COMMONOBJS)
106 106 atrm := POBJS = $(ATRMOBJS) $(COMMONOBJS)
107 107 atq := POBJS = $(ATQOBJS) $(COMMONOBJS)
108 108 crontab := POBJS = $(CRONTABOBJS) $(COMMONOBJS)
109 109 crontab.xpg4 := POBJS = $(XPG4CTOBJS) $(XPG4COMMONOBJS)
110 110 crontab.xpg6 := POBJS = $(XPG6CTOBJS) $(XPG6COMMONOBJS)
111 111
112 112 CFLAGS += $(CCVERBOSE)
113 113
114 114 NOBJS= $(CRONOBJS) $(ATOBJS) $(ATRMOBJS1) $(ATQOBJS) $(CRONTABOBJS1) \
115 115 $(COMMONOBJS)
116 116 OBJS = $(NOBJS) $(XPG4COMMONOBJS) $(XPG4ATOBJS) $(XPG4CTOBJS) \
117 117 $(XPG6COMMONOBJS) $(XPG6CTOBJS) $(GETRESPOBJ)
118 118
119 119 SRCS = $(NOBJS:%.o=%.c) $(GETRESPSRC)
120 120
121 121 CLOBBERFILES += $(SCRIPT) $(XPG4SCRIPT)
122 122
123 123 $(ROOTLIBCRON) := SYMLNKDEST = ../../etc/cron.d
124 124 $(ROOTETC)/cron := SYMLNKDEST = ../usr/sbin/cron
125 125
126 126 $(ROOTBIN)/at := FILEMODE = 04755
127 127 $(ROOTXPG4BIN)/at := FILEMODE = 04755
128 128 $(ROOTBIN)/atrm := FILEMODE = 04755
129 129 $(ROOTBIN)/atq := FILEMODE = 04755
130 130 $(ROOTBIN)/crontab := FILEMODE = 04555
131 131 $(ROOTXPG6BIN)/crontab := FILEMODE = 04555
132 132 $(ROOTXPG4BIN)/crontab := FILEMODE = 04555
133 133 $(ROOTUSRSBIN)/cron := FILEMODE = 0555
134 134
135 135 LDLIBS += -lbsm
136 136
137 137 at := LDLIBS += -lproject -lsecdb
138 138 at.xpg4 := LDLIBS += -lproject -lsecdb
139 139 atq := LDLIBS += -lsecdb
140 140 atrm := LDLIBS += -lsecdb
141 141 cron := LDLIBS += -lpam -lproject -lcontract -lzoneinfo
142 142 crontab := LDLIBS += -lsecdb -lpam -lzoneinfo
143 143 crontab.xpg6 := LDLIBS += -lsecdb -lpam -lzoneinfo
144 144 crontab.xpg4 := LDLIBS += -lsecdb -lpam -lzoneinfo
145 145
146 146 lint := LDLIBS += -lproject -lsecdb -lcontract -lpam
147 147
148 148 $(XPG4) := CFLAGS += -DXPG4
149 149 $(XPG6) := CFLAGS += -DXPG6
150 150
151 151 LINTFLAGS += -u
152 152
153 153 $(ROOTSVCSYSTEM)/cron.xml := FILEMODE = 0444
154 154 $(ROOTLIBSVCMETHOD)/svc-cron := FILEMODE = 0555
155 155
156 156
157 157 .KEEP_STATE:
158 158
159 159 all : $(PROG) $(XPG4) $(XPG6) $(SCRIPT) $(XPG4SCRIPT) $(FILES)
160 160
161 161 install : all $(ROOTPROG) $(ROOTETCDEFAULTFILES) $(ROOTSYMLINK) \
162 162 $(ROOTMANIFEST) $(ROOTMETHOD)
163 163
164 164 $(PROG) : $$(POBJS)
165 165 $(LINK.c) $(POBJS) -o $@ $(LDLIBS)
166 166 $(POST_PROCESS)
167 167
168 168 $(XPG4) : objs.xpg4 $$(POBJS)
169 169 $(LINK.c) $(POBJS) -o $@ $(LDLIBS)
170 170 $(POST_PROCESS)
171 171
172 172 $(XPG6) : objs.xpg6 $$(POBJS)
173 173 $(LINK.c) $(POBJS) -o $@ $(LDLIBS)
174 174 $(POST_PROCESS)
175 175
176 176 objs.xpg6/%.o: %.c
177 177 $(COMPILE.c) -o $@ $<
178 178
179 179 objs.xpg6:
180 180 -@mkdir -p $@
181 181
182 182 objs.xpg4/%.o: %.c
183 183 $(COMPILE.c) -o $@ $<
184 184
185 185 objs.xpg4:
186 186 -@mkdir -p $@
187 187
188 188 objs.xpg4/values-xpg4.o: ../../lib/crt/common/values-xpg4.c
189 189 $(COMPILE.c) -o $@ ../../lib/crt/common/values-xpg4.c
190 190
191 191 %.o: $(SRC)/common/util/%.c
192 192 $(COMPILE.c) $(OUTPUT_OPTION) $<
193 193 $(POST_PROCESS_O)
194 194
195 195 objs.xpg4/%.o: $(SRC)/common/util/%.c
196 196 $(COMPILE.c) -o $@ $<
197 197 $(POST_PROCESS_O)
198 198
199 199 objs.xpg6/%.o: $(SRC)/common/util/%.c
200 200 $(COMPILE.c) -o $@ $<
201 201 $(POST_PROCESS_O)
202 202
203 203 att1.c : att1.y
204 204 $(YACC.y) -d att1.y
205 205 $(MV) y.tab.c att1.c
206 206 $(MV) y.tab.h att1.h
207 207
208 208 att2.c : att2.l att2.ed att1.c
209 209 $(LEX) att2.l
210 210 ed - lex.yy.c < att2.ed
211 211 $(MV) lex.yy.c att2.c
212 212
213 213 # Don't re-install directories installed by Targetdirs
214 214 #$(ROOTDIRS):
215 215 # $(INS.dir)
216 216
217 217 $(ROOTSYMLINK) :
218 218 $(RM) $@; $(SYMLINK) $(SYMLNKDEST) $@
219 219
220 220 check: $(CHKMANIFEST)
221 221
222 222 $(POFILE): $(POFILES)
223 223 $(RM) $@; cat $(POFILES) > $@
224 224
225 225 clean :
226 226 $(RM) $(OBJS) att1.h att1.c att2.c
227 227
228 228 lint : lint_SRCS
229 229
230 230 strip :
231 231 $(STRIP) $(PROG) $(XPG4) $(XPG6)
232 232
233 233 include ../Makefile.targ
↓ open down ↓ |
184 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX