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