From owner-p4-projects@FreeBSD.ORG Sat Jan 22 20:24:18 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0ED7216A4D0; Sat, 22 Jan 2005 20:24:18 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C358016A4CE for ; Sat, 22 Jan 2005 20:24:17 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D1AE43D2F for ; Sat, 22 Jan 2005 20:24:17 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j0MKOH98087540 for ; Sat, 22 Jan 2005 20:24:17 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j0MKOHAx087537 for perforce@freebsd.org; Sat, 22 Jan 2005 20:24:17 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 22 Jan 2005 20:24:17 GMT Message-Id: <200501222024.j0MKOHAx087537@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 69487 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2005 20:24:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=69487 Change 69487 by rwatson@rwatson_paprika on 2005/01/22 20:23:39 Revert to Apple vendor Makefile, as libbsm is now built using lib/libbsm/Makefile. With this reversion, there are no FreeBSD-local changes necessary in the bsm source drop. Affected files ... .. //depot/projects/trustedbsd/audit3/contrib/bsm/Makefile#2 edit Differences ... ==== //depot/projects/trustedbsd/audit3/contrib/bsm/Makefile#2 (text+ko) ==== @@ -1,11 +1,89 @@ -DIRS=lib bin etc test +## +## Apple top-level Makefile for bsm, containing Apple-specific rules. +## + +Project = bsm +Extra_CC_Flags = -fno-common -Wall +## XXX This probably doesn't do anything and should be removed +# Extra_CPP_Includes = -I$(OBJROOT)/usr/include -I../lib -I. + +## MAKEFILEPATH == /Developer/Makefiles/ +include $(MAKEFILEPATH)/CoreOS/ReleaseControl/Common.make + +## +## These must be kept in sync with the build products, et al., at the +## subproject levels. We can't use the "install" targets in those +## Makefiles since that would mean adding Apple-specific dependencies to +## them. +## +BSMSbinFiles = praudit auditreduce +BSMSbinDst = $(DSTROOT)/$(USRSBINDIR) +BSMEtcOpenFiles = audit_class audit_event +BSMEtcRestrictedFiles = audit_control audit_user +BSMEtcExecFiles = audit_warn +BSMEtcDst = $(DSTROOT)/$(ETCDIR)/security +BSMLib = libbsm.dylib +BSMLibDst = $(DSTROOT)/$(USRLIBDIR) +BSMLibHdrs = libbsm.h audit_uevents.h +BSMLibHdrsDst = $(DSTROOT)/$(USRINCLUDEDIR)/bsm +BSMMan1Pages = auditreduce.1 praudit.1 +BSMMan1Dst = $(DSTROOT)/$(MANDIR)/man1 +BSMMan5Pages = audit_class.5 audit_control.5 audit_event.5 audit_user.5 audit_warn.5 +BSMMan5Dst = $(DSTROOT)/$(MANDIR)/man5 + +## +## Admins are free to use another log directory, but this one will be +## unconditionally created. XXX Not created by lower-level Makefiles +## +AuditLogDir = $(DSTROOT)/$(VARDIR)/audit + +## +## shadow_source symlinks into SRCROOT so make can build in OBJROOT. +## +## The "all" target sidesteps the lower-level Makefiles' "install" target +## so this target can take its own, Apple-specific installation steps. +## +install:: bsm + $(INSTALL) -g wheel -d $(BSMSbinDst) $(BSMEtcDst) $(BSMLibDst) $(BSMLibHdrsDst) $(BSMMan1Dst) $(BSMMan5Dst) $(AuditLogDir) + + $(_v) for bsmfile in $(BSMSbinFiles) ; do \ + $(INSTALL) $(OBJROOT)/$(Project)/bin/$${bsmfile} $(BSMSbinDst) ; \ + $(STRIP) -S $(BSMSbinDst)/$${bsmfile} ; \ + $(INSTALL) $(OBJROOT)/$(Project)/bin/$${bsmfile} $(SYMROOT) ; \ + done + + $(_v) for bsmfile in $(BSMEtcOpenFiles) ; do \ + $(INSTALL) -m 0444 $(OBJROOT)/$(Project)/etc/$${bsmfile} $(BSMEtcDst) ; \ + done + + $(_v) for bsmfile in $(BSMEtcRestrictedFiles) ; do \ + $(INSTALL) -m 0400 $(OBJROOT)/$(Project)/etc/$${bsmfile} $(BSMEtcDst) ; \ + done + + $(_v) for bsmfile in $(BSMEtcExecFiles) ; do \ + $(INSTALL) -m 0555 $(OBJROOT)/$(Project)/etc/$${bsmfile} $(BSMEtcDst) ; \ + done + + $(INSTALL) $(OBJROOT)/$(Project)/lib/$(BSMLib) $(BSMLibDst) + $(_v) for bsmfile in $(BSMLibHdrs) ; do \ + $(INSTALL) -m 0644 $(OBJROOT)/$(Project)/lib/$${bsmfile} $(BSMLibHdrsDst) ; \ + done + + $(_v) for bsmfile in $(BSMMan1Pages) ; do \ + $(INSTALL) -m 0444 $(OBJROOT)/$(Project)/man/$${bsmfile} $(BSMMan1Dst) ; \ + done -all: - for i in $(DIRS); do echo " "; echo Building $$i:; cd $$i ; make $(MAKE_ARGS) $@ ; cd .. ; done + $(_v) for bsmfile in $(BSMMan5Pages) ; do \ + $(INSTALL) -m 0444 $(OBJROOT)/$(Project)/man/$${bsmfile} $(BSMMan5Dst) ; \ + done -install: - for i in $(DIRS); do echo " "; echo Installing $$i:; cd $$i ; make install $@; cd .. ; done + ## XXX Why is the chgrp not working? + $(CHGRP) -v admin $(BSMLibDst)/$(BSMLib) + $(STRIP) -S $(BSMLibDst)/$(BSMLib) + $(INSTALL) $(OBJROOT)/$(Project)/lib/$(BSMLib) $(SYMROOT) -clean: - for i in $(DIRS); do echo " "; echo Cleaning $$i:; cd $$i ; make $(MAKE_ARGS) $@; cd .. ; done + $(CHMOD) 0750 $(AuditLogDir) + $(CHGRP) -v admin $(AuditLogDir) +bsm:: shadow_source + $(_v) $(MAKE) -C $(OBJROOT)/$(Project) $(Environment) all