xref: /titanic_50/usr/src/cmd/Adm/Makefile (revision 753a6d457b330b1b29b2d3eefcd0831116ce950d)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29CRON_ENT= adm root sys
30CRON_LIB= .proto at.deny cron.deny queuedefs
31ETC_SCRIPT= group project ttysrch
32ZI_SPECIAL= zones-index
33SUBDIRS= sun
34
35include ../Makefile.cmd
36
37all:=		TARGET= all
38install:=	TARGET= install
39clean:=		TARGET= clean
40clobber:=	TARGET= clobber
41lint:=		TARGET= lint
42
43CROND= $(ROOT)/var/spool/cron
44CRONTABD= $(ROOT)/var/spool/cron/crontabs
45CRONLIBD= $(ROOT)/etc/cron.d
46ETCZONESD= $(ROOT)/etc/zones
47DIRS= $(CROND) $(CRONTABD) $(CRONLIBD)
48
49CRONTABS=	$(CRON_ENT:%=$(CRONTABD)/%)
50CRONLIBS=	$(CRON_LIB:%=$(CRONLIBD)/%)
51ETCSCRIPTS=	$(ETC_SCRIPT:%=$(ROOTETC)/%)
52ZISPECIALS=	$(ETCZONESD)/index
53
54FILEMODE= 0644
55GROUP= sys
56
57$(CRONLIBD)/.proto :=	FILEMODE =	0744
58$(CRONTABD)/adm :=	FILEMODE =	0600
59$(CRONTABD)/sys :=	FILEMODE =	0600
60$(CRONTABD)/root :=	FILEMODE =	0600
61
62.KEEP_STATE:
63
64all: $(CRON_ENT) $(CRON_LIB) $(ETC_SCRIPT) $(SUBDIRS)
65
66install: all $(DIRS) $(CRONTABS) $(CRONLIBS) $(ETCSCRIPTS) $(ETCZONESD) \
67	$(SUBDIRS)
68
69$(CRONTABD)/% : %
70	$(INS.file)
71
72$(CRONLIBD)/% : %
73	$(INS.file)
74
75$(ETCZONESD): $(ZI_SPECIAL)
76	$(CP) -f $(ZI_SPECIAL) $(ZISPECIALS)
77	$(CHMOD) $(FILEMODE) $(ZISPECIALS)
78
79$(SUBDIRS): FRC
80	@cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET)
81
82$(DIRS):
83	$(INS.dir)
84
85FRC:
86
87clean:
88
89lint:
90
91clobber:
92