[selinux-policy: 184/3172] add xml doc generation

Daniel J Walsh dwalsh at fedoraproject.org
Thu Oct 7 19:20:53 UTC 2010


commit 6d314fd3c127bb0f7ffa498cc05771d9d1996477
Author: Chris PeBenito <cpebenito at tresys.com>
Date:   Wed May 18 20:58:13 2005 +0000

    add xml doc generation

 refpolicy/Makefile |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)
---
diff --git a/refpolicy/Makefile b/refpolicy/Makefile
index 0f5c115..580ca62 100644
--- a/refpolicy/Makefile
+++ b/refpolicy/Makefile
@@ -185,14 +185,6 @@ tmp/all_attrs_types.conf tmp/only_te_rules.conf tmp/all_post.conf: tmp/all_te_fi
 
 ########################################
 #
-# Construct file_contexts
-#
-$(FC): $(ALL_FC_FILES)
-	@test -d tmp || mkdir -p tmp
-	$(QUIET) m4 $(M4PARAM) $^ > $@
-
-########################################
-#
 # Remove the dontaudit rules from the policy.conf
 #
 enableaudit: policy.conf
@@ -203,6 +195,14 @@ enableaudit: policy.conf
 
 ########################################
 #
+# Construct file_contexts
+#
+$(FC): kernel/global.if $(ALL_FC_FILES)
+	@test -d tmp || mkdir -p tmp
+	$(QUIET) m4 $(M4PARAM) $^ > $@
+
+########################################
+#
 # Filesystem labeling
 #
 FILESYSTEMS := `mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[23]| xfs| jfs).*rw/{print $$3}';`
@@ -228,8 +228,21 @@ relabel:  $(FC) $(SETFILES)
 	fi
 	$(QUIET) $(SETFILES) $(FC) $(FILESYSTEMS)
 
+########################################
+#
+# Documentation generation
+#
+
+xml: policy.xml
+
+policy.xml: $(ALL_INTERFACES) tmp/generated_definitions.conf
+	echo "<policy>" > $@
+	grep -h -E "^##[[:space:]]" $^ | sed -e 's/^##[[:space:]]//g' >> $@
+	echo "</policy>" >> $@
+
 clean:
 	rm -fR tmp
+	rm -f policy.xml
 	rm -f policy.conf
 	rm -f policy.$(PV)
 	rm -f $(FC)


More information about the scm-commits mailing list