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 "" > $@ + grep -h -E "^##[[:space:]]" $^ | sed -e 's/^##[[:space:]]//g' >> $@ + echo "" >> $@ + clean: rm -fR tmp + rm -f policy.xml rm -f policy.conf rm -f policy.$(PV) rm -f $(FC)