aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Vermeulen <sven.vermeulen@siphos.be>2012-12-04 19:45:20 +0100
committerSven Vermeulen <sven.vermeulen@siphos.be>2012-12-04 19:45:20 +0100
commitcb87afe7517de4f757b4123e4e865dd9aa07c66c (patch)
tree470c3aa60ab0b8b940e34922866ae515e6bed03a /Makefile
parentAllow chromium to create xdg_* directories (diff)
downloadhardened-refpolicy-cb87afe7517de4f757b4123e4e865dd9aa07c66c.tar.gz
hardened-refpolicy-cb87afe7517de4f757b4123e4e865dd9aa07c66c.tar.bz2
hardened-refpolicy-cb87afe7517de4f757b4123e4e865dd9aa07c66c.zip
Include documentation for generated tunables
When tunables are generated through a template, their documentation is not added to the XML file that is parsed by "semanage boolean". As the current method for obtaining the information is not M4-aware, we cannot get the information from the policy sources themselves. As a result, we now add in a gentoo_tunables.xml file that contains static declarations of the booleans.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 39a3d4083..e012cd888 100644
--- a/Makefile
+++ b/Makefile
@@ -119,11 +119,13 @@ docfiles = $(docs)/Makefile.example $(addprefix $(docs)/,example.te example.if e
ifndef LOCAL_ROOT
polxml = $(docs)/policy.xml
tunxml = $(docs)/global_tunables.xml
+gentooxml = $(docs)/gentoo_tunables.xml
boolxml = $(docs)/global_booleans.xml
htmldir = $(docs)/html
else
polxml = $(LOCAL_ROOT)/doc/policy.xml
tunxml = $(LOCAL_ROOT)/doc/global_tunables.xml
+gentooxml = $(LOCAL_ROOT)/doc/gentoo_tunables.xml
boolxml = $(LOCAL_ROOT)/doc/global_booleans.xml
htmldir = $(LOCAL_ROOT)/doc/html
endif
@@ -419,7 +421,7 @@ $(tunxml): $(globaltun)
$(boolxml): $(globalbool)
$(verbose) $(genxml) -w -b $< > $@
-$(polxml): $(layerxml) $(tunxml) $(boolxml)
+$(polxml): $(layerxml) $(tunxml) $(boolxml) $(gentooxml)
@echo "Creating $(@F)"
@test -d $(dir $(polxml)) || mkdir -p $(dir $(polxml))
@test -d $(tmpdir) || mkdir -p $(tmpdir)
@@ -427,7 +429,7 @@ $(polxml): $(layerxml) $(tunxml) $(boolxml)
$(verbose) echo '<!DOCTYPE policy SYSTEM "$(notdir $(xmldtd))">' >> $@
$(verbose) echo '<policy>' >> $@
$(verbose) for i in $(basename $(notdir $(layerxml))); do echo "<layer name=\"$$i\">" >> $@; cat $(tmpdir)/$$i.xml >> $@; echo "</layer>" >> $@; done
- $(verbose) cat $(tunxml) $(boolxml) >> $@
+ $(verbose) cat $(tunxml) $(boolxml) $(gentooxml) >> $@
$(verbose) echo '</policy>' >> $@
$(verbose) if test -x $(XMLLINT) && test -f $(xmldtd); then \
$(XMLLINT) --noout --path $(dir $(xmldtd)) --dtdvalid $(xmldtd) $@ ;\
@@ -507,7 +509,7 @@ $(appdir)/%: $(appconf)/%
#
# Install policy headers
#
-install-headers: $(layerxml) $(tunxml) $(boolxml)
+install-headers: $(layerxml) $(tunxml) $(boolxml) $(gentooxml)
@mkdir -p $(headerdir)
@echo "Installing $(NAME) policy headers."
$(verbose) $(INSTALL) -m 644 $^ $(headerdir)