M4 ?= m4
PYTHON ?= python
SED ?= sed
-SH ?= sh
CFLAGS += -Wall
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
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.
$(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 ;\
$(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),)
$(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),)
--- /dev/null
+# 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"')"
+}
+++ /dev/null
-#!/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