Makefile revision 06e1a7147edd272b7296f208141627a5b1191731
012a352f4b26cfd874db8d06debc495c2303e8b2Bob Halley#
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# CDDL HEADER START
50722c0d550a63d4a2b8f34e907b693a81d864e0Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# The contents of this file are subject to the terms of the
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# Common Development and Distribution License (the "License").
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# You may not use this file except in compliance with the License.
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley#
178f6ad061e54bc5babfca3577f72058fa0797c1Bob Halley# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# or http://www.opensolaris.org/os/licensing.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# See the License for the specific language governing permissions
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley# information: Portions Copyright [yyyy] [name of copyright owner]
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater#
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence# CDDL HEADER END
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence# Use is subject to license terms.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# ident "%Z%%M% %I% %E% SMI"
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley#
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyDEFAULTFILES = cron.dfl
b897c52f865b2fc4e220e2110b874e59c716456bBob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyinclude ../Makefile.cmd
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyMANIFEST = cron.xml
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
b897c52f865b2fc4e220e2110b874e59c716456bBob HalleyROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceROOTMETHOD = $(ROOTLIBSVCMETHOD)/svc-cron
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceCPPFLAGS += -D_FILE_OFFSET_BITS=64
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyROOTVAR = $(ROOT)/var
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceROOTSPCRON = $(ROOTVAR)/spool/cron
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceROOTCROND = $(ROOTETC)/cron.d
fcb54ce0a4f7377486df5bec83b3aa4711bf4131Mark AndrewsROOTCRONTABS = $(ROOTSPCRON)/crontabs
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceROOTATJOBS = $(ROOTSPCRON)/atjobs
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceROOTLIBCRON = $(ROOTLIB)/cron
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence
460b427411b72da26b1836b9424e2e70d65d9394David LawrencePROG1 = cron
460b427411b72da26b1836b9424e2e70d65d9394David LawrencePROG2 = at atq atrm crontab
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXPG6PROG = crontab
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceXPG4PROG = at crontab
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrencePROG = $(PROG1) $(PROG2)
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceSCRIPT = batch
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark AndrewsXPG4SCRIPT = batch.xpg4
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark Andrews
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark AndrewsPOFILE= $(PROG1)_cmd.po
dabea86dac4c01f852b7aea728f73b4f55a89d44Mark AndrewsPOFILES= at.po crontab.po funcs.po batch.po
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXGETFLAGS= -a -x $(PROG1).xcl
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceROOTDIRS = $(ROOTSPCRON) $(ROOTCROND) \
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David Lawrence $(ROOTCRONTABS) $(ROOTATJOBS)
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceROOTPROG = $(PROG1:%=$(ROOTUSRSBIN)/%) $(PROG2:%=$(ROOTBIN)/%) \
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence $(SCRIPT:%=$(ROOTBIN)/%) \
596912ee9ca8eb14d30707ec286ab5d28bd39b3eMark Andrews $(XPG6PROG:%=$(ROOTXPG6BIN)/%) \
8319af16557b81eba3277ee67215285f0823b587Mark Andrews $(XPG4PROG:%=$(ROOTXPG4BIN)/%) \
8319af16557b81eba3277ee67215285f0823b587Mark Andrews $(XPG4SCRIPT:%.xpg4=$(ROOTXPG4BIN)/%)
aee5e9cbacd8f88325840b8a498876f4319b0890Mark Andrews
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceROOTSYMLINK = $(ROOTLIBCRON) $(ROOTETC)/cron
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceCOMMONOBJ1= permit.o
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceCOMMONOBJ2= funcs.o
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceCOMMONOBJS= $(COMMONOBJ1) $(COMMONOBJ2)
c32b87bc54abacf95fb3b063d72b7d1855c1643bMichael GraffCRONOBJS= cron.o elm.o
0014d6342b0d50ae37126ac16d5bf821d02ffff7David LawrenceATOBJS= at.o att1.o att2.o
460b427411b72da26b1836b9424e2e70d65d9394David LawrenceXPG4OBJS= values-xpg4.o
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceATRMOBJS= atrm.o
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceATQOBJS= atq.o
12e63bfe1d111ccb57f482b28d56c785cccc7cf7David LawrenceCRONTABOBJS= crontab.o
460b427411b72da26b1836b9424e2e70d65d9394David Lawrence
b719aabd6be52278f2cc426581179f3f3af36e20Mark Andrews# /usr/xpg*/bin/crontab isn't linked with values-xpg*.o since it isn't
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley# required by any specific behavior differences; this makes these
2320f230995995595438a9d9301d84931fd266ceMark Andrews# setuid variants less likely to accidently trip over differences that
c427260a8678f2e99a2337fb95ec98d9c9ee8c05Mark Andrews# could unintentionally open up a security hole.
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXPG4COMMONOBJS= $(COMMONOBJS:%=objs.xpg4/%)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXPG4CTOBJS= $(CRONTABOBJS:%=objs.xpg4/%)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXPG4ATOBJS= $(ATOBJS:%=objs.xpg4/%) $(XPG4OBJS:%=objs.xpg4/%)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXPG6COMMONOBJS= $(COMMONOBJS:%=objs.xpg6/%)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyXPG6CTOBJS= $(CRONTABOBJS:%=objs.xpg6/%)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleycron := POBJS = $(CRONOBJS) $(COMMONOBJ2)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyat := POBJS = $(ATOBJS) $(COMMONOBJS)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyat.xpg4 := POBJS = $(XPG4ATOBJS) $(XPG4COMMONOBJS)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyatrm := POBJS = $(ATRMOBJS) $(COMMONOBJS)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyatq := POBJS = $(ATQOBJS) $(COMMONOBJS)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleycrontab := POBJS = $(CRONTABOBJS) $(COMMONOBJS)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleycrontab.xpg4 := POBJS = $(XPG4CTOBJS) $(XPG4COMMONOBJS)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleycrontab.xpg6 := POBJS = $(XPG6CTOBJS) $(XPG6COMMONOBJS)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyat.o objs.xpg4/at.o funcs.o objs.xpg4/funcs.o objs.xpg6/funcs.o permit.o \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyobjs.xpg4/permit.o objs.xpg6/permit.o crontab.o objs.xpg4/crontab.o \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyobjs.xpg6/crontab.o elm.o := CFLAGS += $(CCVERBOSE)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyNOBJS= $(CRONOBJS) $(ATOBJS) $(ATRMOBJS) $(ATQOBJS) $(CRONTABOBJS) \
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley $(COMMONOBJS)
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyOBJS = $(NOBJS) $(XPG4COMMONOBJS) $(XPG4ATOBJS) $(XPG4CTOBJS) \
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence $(XPG6COMMONOBJS) $(XPG6CTOBJS)
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence
0014d6342b0d50ae37126ac16d5bf821d02ffff7David LawrenceSRCS = $(NOBJS:%.o=%.c)
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence
0014d6342b0d50ae37126ac16d5bf821d02ffff7David LawrenceCLOBBERFILES += $(SCRIPT) $(XPG4SCRIPT)
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrews$(ROOTLIBCRON) := SYMLNKDEST = ../../etc/cron.d
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrews$(ROOTETC)/cron := SYMLNKDEST = ../usr/sbin/cron
a9558a6c63d9c6dbb2f3800b39ccb008652fcde3Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews$(ROOTBIN)/at := FILEMODE = 04755
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews$(ROOTBIN)/at := OWNER = root
0014d6342b0d50ae37126ac16d5bf821d02ffff7David Lawrence$(ROOTBIN)/at := GROUP = sys
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTXPG4BIN)/at := FILEMODE = 04755
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTXPG4BIN)/at := OWNER = root
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTXPG4BIN)/at := GROUP = sys
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTBIN)/atrm := FILEMODE = 04755
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTBIN)/atrm := OWNER = root
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTBIN)/atrm := GROUP = sys
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTBIN)/atq := FILEMODE = 04755
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTBIN)/atq := OWNER = root
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTBIN)/atq := GROUP = sys
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTBIN)/crontab := FILEMODE = 04555
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTBIN)/crontab := OWNER = root
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTXPG6BIN)/crontab := FILEMODE = 04555
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTXPG6BIN)/crontab := OWNER = root
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTXPG4BIN)/crontab := FILEMODE = 04555
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTXPG4BIN)/crontab := OWNER = root
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTUSRSBIN)/cron := FILEMODE = 0555
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTUSRSBIN)/cron := OWNER = root
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTUSRSBIN)/cron := GROUP = sys
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob HalleyLDLIBS += -lbsm
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyat := LDLIBS += -lproject -lsecdb
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyat.xpg4 := LDLIBS += -lproject -lsecdb
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyatq := LDLIBS += -lsecdb
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleyatrm := LDLIBS += -lsecdb
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleycron := LDLIBS += -lpam -lproject -lcontract
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleycrontab := LDLIBS += -lsecdb -lpam
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleycrontab.xpg6 := LDLIBS += -lsecdb -lpam
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleycrontab.xpg4 := LDLIBS += -lsecdb -lpam
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halleylint := LDLIBS += -lproject -lsecdb -lcontract -lpam
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(XPG4) := CFLAGS += -DXPG4
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(XPG6) := CFLAGS += -DXPG6
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTSVCSYSTEM)/cron.xml := OWNER = root
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTSVCSYSTEM)/cron.xml := GROUP = sys
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTSVCSYSTEM)/cron.xml := FILEMODE = 0444
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTLIBSVCMETHOD)/svc-cron := OWNER = root
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTLIBSVCMETHOD)/svc-cron := GROUP = bin
0b72c791466d0807bcf22522b5ddb7da902c2720Bob Halley$(ROOTLIBSVCMETHOD)/svc-cron := FILEMODE = 0555
.KEEP_STATE:
all : $(PROG) $(XPG4) $(XPG6) $(SCRIPT) $(XPG4SCRIPT) $(FILES)
install : all $(ROOTPROG) $(ROOTETCDEFAULTFILES) $(ROOTSYMLINK) \
$(ROOTMANIFEST) $(ROOTMETHOD)
$(PROG) : $$(POBJS)
$(LINK.c) $(POBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
$(XPG4) : objs.xpg4 $$(POBJS)
$(LINK.c) $(POBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
$(XPG6) : objs.xpg6 $$(POBJS)
$(LINK.c) $(POBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
objs.xpg6/%.o: %.c
$(COMPILE.c) -o $@ $<
objs.xpg6:
-@mkdir -p $@
objs.xpg4/%.o: %.c
$(COMPILE.c) -o $@ $<
objs.xpg4:
-@mkdir -p $@
objs.xpg4/values-xpg4.o: ../../lib/common/common/values-xpg4.c
$(COMPILE.c) -o $@ ../../lib/common/common/values-xpg4.c
att1.c : att1.y
$(YACC.y) -d att1.y
$(MV) y.tab.c att1.c
$(MV) y.tab.h att1.h
att2.c : att2.l att2.ed att1.c
$(LEX) att2.l
ed - lex.yy.c < att2.ed
$(MV) lex.yy.c att2.c
# Don't re-install directories installed by Targetdirs
#$(ROOTDIRS):
# $(INS.dir)
$(ROOTSYMLINK) :
$(RM) $@; $(SYMLINK) $(SYMLNKDEST) $@
check: $(CHKMANIFEST)
$(POFILE): $(POFILES)
$(RM) $@; cat $(POFILES) > $@
clean :
$(RM) $(OBJS) att1.h att1.c att2.c
lint : lint_SRCS
strip :
$(STRIP) $(PROG) $(XPG4) $(XPG6)
include ../Makefile.targ