diff options
author | 2018-03-25 13:56:37 +0200 | |
---|---|---|
committer | 2018-06-14 17:37:51 +0800 | |
commit | f42ea96bbfb376ca738206a0bd9bdc68c4826264 (patch) | |
tree | f2309adadff433ba6c6264cf110a4752c0c78ddb /Makefile | |
parent | Update segenxml to include support for templated booleans and tunables (diff) | |
download | hardened-refpolicy-f42ea96bbfb376ca738206a0bd9bdc68c4826264.tar.gz hardened-refpolicy-f42ea96bbfb376ca738206a0bd9bdc68c4826264.tar.bz2 hardened-refpolicy-f42ea96bbfb376ca738206a0bd9bdc68c4826264.zip |
Generate template code and update genxml call for documentation generation
Update the Makefile to first build the template files (template code
definitions) and then have all segenxml calls use these files.
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -110,6 +110,7 @@ m4terminate := $(support)/fatal_error.m4 # use our own genhomedircon to make sure we have a known usable one, # so policycoreutils updates are not required (RHEL4) genhomedircon := $(PYTHON) $(support)/genhomedircon.py +gentemplates := $(support)/gentemplates.sh # documentation paths docs := doc @@ -416,12 +417,20 @@ $(fcsort) : $(support)/fc_sort.c # # Documentation generation # -$(layerxml): %.xml: $(all_metaxml) $(filter $(addprefix $(moddir)/, $(notdir $*))%, $(detected_mods)) $(subst .te,.if, $(filter $(addprefix $(moddir)/, $(notdir $*))%, $(detected_mods))) +iftemplates: + @echo "generating interface templates into $(tmpdir)/iftemplates" + @test -d $(tmpdir)/iftemplates || mkdir -p $(tmpdir)/iftemplates + $(gentemplates) -g -s $(moddir) -t $(tmpdir)/iftemplates +ifdef LOCAL_ROOT + $(gentemplates) -g -s $(local_moddir) -t $(tmpdir)/iftemplates +endif + +$(layerxml): %.xml: iftemplates $(all_metaxml) $(filter $(addprefix $(moddir)/, $(notdir $*))%, $(detected_mods)) $(subst .te,.if, $(filter $(addprefix $(moddir)/, $(notdir $*))%, $(detected_mods))) @test -d $(tmpdir) || mkdir -p $(tmpdir) $(verbose) cat $(filter %$(notdir $*)/$(metaxml), $(all_metaxml)) > $@ - $(verbose) for i in $(basename $(filter $(addprefix $(moddir)/, $(notdir $*))%, $(detected_mods))); do $(genxml) -w -m $$i >> $@; done + $(verbose) for i in $(basename $(filter $(addprefix $(moddir)/, $(notdir $*))%, $(detected_mods))); do $(genxml) -w -T $(tmpdir)/iftemplates -m $$i >> $@; done ifdef LOCAL_ROOT - $(verbose) for i in $(basename $(filter $(addprefix $(local_moddir)/, $(notdir $*))%, $(detected_mods))); do $(genxml) -w -m $$i >> $@; done + $(verbose) for i in $(basename $(filter $(addprefix $(local_moddir)/, $(notdir $*))%, $(detected_mods))); do $(genxml) -w -T $(tmpdir)/iftemplates -m $$i >> $@; done endif $(tunxml): $(globaltun) |