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