Makefile revision 2
1N/A#
1N/A# CDDL HEADER START
1N/A#
1N/A# The contents of this file are subject to the terms of the
1N/A# Common Development and Distribution License (the "License").
1N/A# You may not use this file except in compliance with the License.
1N/A#
1N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1N/A# or http://www.opensolaris.org/os/licensing.
1N/A# See the License for the specific language governing permissions
1N/A# and limitations under the License.
1N/A#
1N/A# When distributing Covered Code, include this CDDL HEADER in each
1N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1N/A# If applicable, add the following below this CDDL HEADER, with the
1N/A# fields enclosed by brackets "[]" replaced with your own identifying
1N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1N/A#
1N/A# CDDL HEADER END
1N/A#
1N/A#
1N/A# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
1N/A#
1N/A
1N/Ainclude ../Makefile.lib
1N/A
1N/ASUBDIRS = help $(MACH)
1N/A$(BUILD64)SUBDIRS += $(MACH64)
1N/A
1N/AMSGSUBDIRS= help
1N/A
1N/Aall:= TARGET= all
1N/Aclean:= TARGET= clean
1N/Aclobber:= TARGET= clobber
1N/Ainstall:= TARGET= install
1N/Alint:= TARGET= lint
1N/A_msg:= TARGET= _msg
1N/Astub:= TARGET= stub
1N/Astubinstall:= TARGET= stubinstall
1N/A
1N/A.KEEP_STATE:
1N/A
1N/AROOTETC = $(ROOT)/etc
1N/AROOTETCSECURITY = $(ROOTETC)/security
1N/A
1N/AEFILES = user_attr
1N/AEFILESRC = $(EFILES:%=%)
1N/AETCFILES = $(EFILES:%=$(ROOTETC)/%)
1N/AETCDFILES = $(EFILES:%=$(ROOTETC)/%.d/core-os)
1N/AETCDFILES += $(EFILES:%=$(ROOTETC)/%.d/local-entries)
1N/A
1N/AESDFILES = auth_attr exec_attr prof_attr
1N/AESFILES = $(ESDFILES) policy.conf
1N/AESSRC = $(ESFILES:%=%)
1N/AETCSECURITYFILES = $(ESFILES:%=$(ROOTETCSECURITY)/%)
1N/AETCSECURITYDFILES = $(ESDFILES:%=$(ROOTETCSECURITY)/%.d/core-os)
1N/AETCSECURITYDFILES += $(ESDFILES:%=$(ROOTETCSECURITY)/%.d/local-entries)
1N/A
1N/A
1N/AMFSTFILES = rbac.xml
1N/AMANIFESTDIR = $(ROOT)/lib/svc/manifest/system
1N/AMANIFEST = $(MFSTFILES:%=$(MANIFESTDIR)/%)
1N/A$(MANIFEST) := FILEMODE = 0444
1N/A
1N/AMETHODFILES = svc-rbac
1N/AMETHODDIR = $(ROOT)/lib/svc/method
1N/AMETHOD = $(METHODFILES:%=$(METHODDIR)/%)
1N/A$(METHOD) := FILEMODE = 0555
1N/A
SCRIPTS = i.rbac r.rbac
CLASS_SCR_SRC_DIR = common
INSTALL_DIR = $(ROOT)/usr/sadm/install
CLASS_SCR_DIR = $(INSTALL_DIR)/scripts
CLASS_SCR_FILES = $(SCRIPTS:%=$(CLASS_SCR_DIR)/%)
$(CLASS_SCR_FILES) := FILEMODE = 0555
all clean clobber delete install lint package stub stubinstall: $(SUBDIRS)
_msg: $(MSGSUBDIRS)
install: check_prof install_data
install_data: $(ETCSECURITYFILES) $(ETCSECURITYDFILES) $(ETCFILES) \
$(ETCDFILES) $(CLASS_SCR_FILES) $(MANIFESTDIR) $(MANIFEST) \
$(METHODDIR) $(METHOD)
ATTR_FILES = auth_attr exec_attr prof_attr user_attr
${ATTR_FILES}: $$@.txt ${CLASS_SCR_SRC_DIR}/i.rbac
> $@
$(ECHO) $@.txt $@ | $(SHELL) ${CLASS_SCR_SRC_DIR}/i.rbac
$(ETCSECURITYDFILES) $(ETCDFILES): $$(@D)
$(ETCSECURITYFILES) $(ETCFILES): $(ETCSECURITY) $(ROOTETCSECURITY)
$(ROOTETCSECURITY)/%.d/local-entries:= INSLINKTARGET = ../$<
$(ROOTETC)/%.d/local-entries:= INSLINKTARGET = ../$<
$(ETCSECURITY)/%: %
$(INS.file)
$(ROOTETCSECURITY):
$(INS.dir)
$(ROOTETCSECURITY)/%: %
$(INS.file)
$(ROOTETCSECURITY)/%.d/core-os: %.txt
$(INS.rename)
$(ROOTETCSECURITY)/%.d/local-entries: %
$(INS.symlink)
$(ROOTETC)/%.d/local-entries: %
$(INS.symlink)
$(ROOTETC)/% : %
$(INS.file)
$(ROOTETC)/%.d/core-os: %.txt
$(INS.rename)
$(MANIFESTDIR):
$(INS.dir)
$(MANIFESTDIR)/% : %
$(INS.file)
$(METHODDIR):
$(INS.dir)
$(METHODDIR)/% : %
$(INS.file)
$(CLASS_SCR_FILES): $(INSTALL_DIR) $(CLASS_SCR_DIR)
$(INSTALL_DIR):
$(INS.dir)
$(CLASS_SCR_DIR):
$(INS.dir)
$(CLASS_SCR_DIR)/%: $(CLASS_SCR_SRC_DIR)/%
$(INS.file)
clobber clean:
$(RM) $(ATTR_FILES)
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
BSU="Basic Solaris User"
check_prof: prof_attr.txt
@if $(PERL) -pe 's/\\\n//' prof_attr.txt | $(EGREP) -v $(BSU) \
| $(EGREP) -s '[=:,]All[,;]'; then\
echo 'The profile "All" should be listed only in $(BSU);'; \
echo 'it should not be listed in any other profile.'; \
exit 1;\
fi
FRC: