]> git.ipfire.org Git - people/stevee/selinux-policy.git/commitdiff
fix headers install path problem, segenxml.py variable problem, change set_tunables...
authorChris PeBenito <cpebenito@tresys.com>
Wed, 15 Feb 2006 18:27:23 +0000 (18:27 +0000)
committerChris PeBenito <cpebenito@tresys.com>
Wed, 15 Feb 2006 18:27:23 +0000 (18:27 +0000)
refpolicy/Makefile
refpolicy/Rules.modular
refpolicy/Rules.monolithic
refpolicy/support/set_bools_tuns.awk [new file with mode: 0644]
refpolicy/support/set_tunables [deleted file]

index 750187005f1e913164657db8f095f5c613b38e73..2fe65e1e28b5ec2c736237d770f487709b6bcc39 100644 (file)
@@ -67,7 +67,6 @@ GREP ?= egrep
 M4 ?= m4
 PYTHON ?= python
 SED ?= sed
-SH ?= sh
 
 CFLAGS += -Wall
 
@@ -91,7 +90,7 @@ GENXML := $(PYTHON) $(SUPPORT)/segenxml.py
 GENDOC := $(PYTHON) $(SUPPORT)/sedoctool.py
 GENPERM := $(PYTHON) $(SUPPORT)/genclassperms.py
 FCSORT := $(TMPDIR)/fc_sort
-SETTUN := $(SH) $(SUPPORT)/set_tunables
+SETBOOLS := $(AWK) -f $(SUPPORT)/set_bools_tuns.awk
 
 # documentation paths
 DOCS = $(ROOT)/doc
@@ -134,7 +133,7 @@ CONTEXTPATH = $(INSTALLDIR)/contexts
 FCPATH = $(CONTEXTPATH)/files/file_contexts
 SHAREDIR = $(PREFIX)/share/selinux
 MODPKGDIR = $(SHAREDIR)/$(NAME)
-HEADERDIR = $(SHAREDIR)/refpolicy/include
+HEADERDIR = $(MODPKGDIR)/include
 DOCSDIR = $(PREFIX)/share/doc/$(PKGNAME)
 
 # compile strict policy if requested.
@@ -433,7 +432,7 @@ install-headers: $(POLXML)
        $(verbose) install -m 644 $(TMPDIR)/global_{tunables,booleans}.xml $(HEADERDIR)
        $(verbose) m4 $(M4PARAM) $(ROLEMAP) > $(HEADERDIR)/$(notdir $(ROLEMAP))
        $(verbose) mkdir -p $(HEADERDIR)/support
-       $(verbose) install -m 644 $(M4SUPPORT) $(GENXML) $(XMLDTD) $(HEADERDIR)/support
+       $(verbose) install -m 644 $(M4SUPPORT) $(word $(words $(GENXML)),$(GENXML)) $(XMLDTD) $(HEADERDIR)/support
        $(verbose) $(GENPERM) $(AVS) $(SECCLASS) > $(HEADERDIR)/support/all_perms.spt
        $(verbose) for i in $(notdir $(ALL_LAYERS)); do \
                mkdir -p $(HEADERDIR)/$$i ;\
index 5ac2fe412bca3a4aacc688c2072d94c08c3d0d42..f534a955fb2800885650a8e1ff7e6a914f8ca44a 100644 (file)
@@ -130,7 +130,7 @@ $(TMPDIR)/generated_definitions.conf: $(BASE_TE_FILES)
        $(verbose) for i in $(notdir $(BASE_TE_FILES)); do \
                echo "define(\`$$i')" >> $@ ;\
        done
-       $(verbose) $(SETTUN) $(BOOLEANS) >> $@
+       $(verbose) test -f $(BOOLEANS) && $(SETBOOLS) $(BOOLEANS) >> $@
 
 $(TMPDIR)/all_interfaces.conf: $(M4SUPPORT) $(ALL_INTERFACES)
 ifeq ($(ALL_INTERFACES),)
index b345ed4f671d069089d6178178081802ccd9d359..b04723fc0b7e8fce3db810e11d5a207b73cbb375 100644 (file)
@@ -118,7 +118,7 @@ $(TMPDIR)/generated_definitions.conf: $(ALL_LAYERS) $(ALL_TE_FILES)
        $(verbose) for i in $(notdir $(ALL_MODULES)); do \
                echo "define(\`$$i')" >> $@ ;\
        done
-       $(verbose) $(SETTUN) $(BOOLEANS) >> $@
+       $(verbose) test -f $(BOOLEANS) && $(SETBOOLS) $(BOOLEANS) >> $@
 
 $(TMPDIR)/all_interfaces.conf: $(M4SUPPORT) $(ALL_INTERFACES)
 ifeq ($(ALL_INTERFACES),)
diff --git a/refpolicy/support/set_bools_tuns.awk b/refpolicy/support/set_bools_tuns.awk
new file mode 100644 (file)
index 0000000..cedc19b
--- /dev/null
@@ -0,0 +1,11 @@
+# Read booleans.conf and output M4 directives to
+# override default settings in global_booleans
+
+BEGIN {
+       FS="="
+}
+
+/^[[:blank:]]*[[:alpha:]]+/{ 
+       gsub(/[[:blank:]]*/,"")
+       print "define(`"$1"_conf',`"$2"')"
+}
diff --git a/refpolicy/support/set_tunables b/refpolicy/support/set_tunables
deleted file mode 100755 (executable)
index 0adbc1a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-# this file exists because this line is
-# too hard to escape correctly in a makefile
-
-if test -f $1; then
-       awk -F = '/^[[:blank:]]*[[:alpha:]]+/{ gsub(/[[:blank:]]*/,"") ; print "define(`"$1"_conf'\'',`"$2"'\'')" }' $1
-fi