PERFORCE change 76397 for review
Scott Long
scottl at FreeBSD.org
Tue May 3 02:34:35 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=76397
Change 76397 by scottl at scottl-x64 on 2005/05/03 02:34:30
Remove much of the GNU Make specific contructs.
Affected files ...
.. //depot/projects/trustedbsd/sebsd/contrib/sebsd/libsepol/src/Makefile#2 edit
.. //depot/projects/trustedbsd/sebsd/contrib/sebsd/policy/Makefile#17 edit
Differences ...
==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/libsepol/src/Makefile#2 (text+ko) ====
@@ -8,11 +8,11 @@
# Set to y for MLS
MLS=n
-ifeq ($(MLS),y)
+.if $(MLS) == "y"
OPTIONS = -DCONFIG_SECURITY_SELINUX_MLS
-else
+.else
OPTIONS =
-endif
+.endif
LIBA=libsepol.a
TARGET=libsepol.so
==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/policy/Makefile#17 (text+ko) ====
@@ -20,7 +20,8 @@
LOADPOLICY = $(DESTDIR)/sbin/sebsd_loadpolicy
CHECKPOLICY = $(DESTDIR)/sbin/sebsd_checkpolicy
SETFILES = $(DESTDIR)/sbin/sebsd_setfiles
-POLICYVER := policy.$(shell $(CHECKPOLICY) $(POLICYCOMPAT) -V |cut -f 1 -d ' ')
+POLICYVERTMP != ($(CHECKPOLICY) $(POLICYCOMPAT) -V |cut -f 1 -d ' ')
+POLICYVER := policy.$(POLICYVERTMP)
INSTALLDIR = $(DESTDIR)/etc/security/sebsd
POLICYPATH = $(INSTALLDIR)/policy
SRCPATH = $(INSTALLDIR)/src
@@ -28,18 +29,19 @@
LOADPATH = $(POLICYPATH)/$(POLICYVER)
FCPATH = $(CONTEXTPATH)/files/file_contexts
-ALL_PROGRAM_MACROS := $(wildcard macros/program/*.te)
-ALL_MACROS := $(ALL_PROGRAM_MACROS) $(wildcard macros/*.te)
-ALL_TYPES := $(wildcard types/*.te)
-ALL_DOMAINS := $(wildcard domains/*.te domains/misc/*.te domains/program/*.te)
+ALL_PROGRAM_MACROS := macros/program/*.te
+ALL_MACROS := $(ALL_PROGRAM_MACROS) macros/*.te
+ALL_TYPES := types/*.te
+ALL_DOMAINS := domains/*.te domains/misc/*.te domains/program/*.te
ALLTEFILES := attrib.te tmp/program_used_flags.te $(ALL_MACROS) $(ALL_TYPES) $(ALL_DOMAINS) assert.te
TE_RBAC_FILES := $(ALLTEFILES) rbac
-ALL_TUNABLES := $(wildcard tunables/*.tun )
+ALL_TUNABLES := tunables/*.tun
+ALL_TUNABLES =
-POLICYFILES = $(addprefix $(FLASKDIR),security_classes initial_sids access_vectors)
-ifeq ($(MLS),y)
+POLICYFILES = $(FLASKDIR)/security_classes $(FLASKDIR)/initial_sids $(FLASKDIR)/access_vectors
+.if $(MLS) == "y"
POLICYFILES += mls
-endif
+.endif
POLICYFILES += $(ALL_TUNABLES) $(TE_RBAC_FILES)
POLICYFILES += users serviceusers
POLICYFILES += constraints initial_sid_contexts fs_use genfs_contexts net_contexts
@@ -48,43 +50,47 @@
INSTALLCMD = install -c -o root -g wheel -m 400
APPCONFDIR = $(DESTDIR)/etc/security
-MULTILABELMOUNTS = $(shell /sbin/mount -t ufs -p | \
+MULTILABELMOUNTS != ( /sbin/mount -t ufs -p | \
/usr/bin/awk '{if (match($$4, "multilabel")) {print $$2}}')
-UNUSED_TE_FILES := $(wildcard domains/program/unused/*.te)
+UNUSED_TE_FILES := domains/program/unused/*.te
+
+PROGRAMFILES := domains/program/*.te
FC = file_contexts/file_contexts
-FCFILES=file_contexts/types.fc $(wildcard file_contexts/misc/*.fc) $(patsubst domains/program/%.te,file_contexts/program/%.fc, $(wildcard domains/program/*.te))
+FCTEFILES := $(PROGRAMFILES:S/^domains\/program\//file_contexts\/program\//)
+FCFILES = file_contexts/*.fc file_contexts/program/*.fc
+FCFILES += $(FCTEFILES:.te=.fc)
APPDIR=$(CONTEXTPATH)
-APPFILES = $(addprefix $(APPDIR)/,default_contexts default_type initrc_context failsafe_context userhelper_context)
-ROOTFILES = $(addprefix $(APPDIR)/users/,root)
+APPFILES = $(APPDIR)/default_contexts $(APPDIR)/default_type $(APPDIR)/initrc_context # $(APPDIR)/userhelper_context $(APPDIR)/failsafe_context
+ROOTFILES = # $(APPDIR)/users/root
install: $(APPFILES) $(ROOTFILES) $(LOADPATH) $(FCPATH)
$(APPDIR)/default_contexts: appconfig/default_contexts
mkdir -p $(APPDIR)
- install -m 644 $< $@
+ install -m 644 appconfig/default_contexts $@
$(APPDIR)/default_type: appconfig/default_type
mkdir -p $(APPDIR)
- install -m 644 $< $@
+ install -m 644 appconfig/default_type $@
$(APPDIR)/userhelper_context: appconfig/userhelper_context
mkdir -p $(APPDIR)
- install -m 644 $< $@
+ install -m 644 appconfig/userhelper_context $@
$(APPDIR)/initrc_context: appconfig/initrc_context
mkdir -p $(APPDIR)
- install -m 644 $< $@
+ install -m 644 appconfig/initrc_context $@
$(APPDIR)/failsafe_context: appconfig/failsafe_context
mkdir -p $(APPDIR)
- install -m 644 $< $@
+ install -m 644 appconfig/failsafe_context $@
$(APPDIR)/users/root: appconfig/root_default_contexts
mkdir -p $(APPDIR)/users
- install -m 644 $< $@
+ install -m 644 appconfig/root_default_contexts $@
$(LOADPATH): policy.conf $(CHECKPOLICY)
@@ -110,7 +116,7 @@
policy.conf: $(POLICYFILES)
mkdir -p tmp
- m4 $(M4PARAM) -Imacros -s $^ > $@.tmp
+ m4 $(M4PARAM) -Imacros -s $(POLICYFILES) > $@.tmp
mv $@.tmp $@
install-src: /etc/security/sebsd
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list