aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bigonville <bigon@bigon.be>2019-07-21 15:45:23 +0200
committerJason Zaman <perfinion@gentoo.org>2019-08-18 18:17:35 +0800
commit3008ceb72dee8fab483c7a25cf431e2ec5d2b83a (patch)
treed885a8aba15a55787f24bc63949190ea5670a02d /Makefile
parentdevices: Add types for trusted execution environment interfaces. (diff)
downloadhardened-refpolicy-3008ceb72dee8fab483c7a25cf431e2ec5d2b83a.tar.gz
hardened-refpolicy-3008ceb72dee8fab483c7a25cf431e2ec5d2b83a.tar.bz2
hardened-refpolicy-3008ceb72dee8fab483c7a25cf431e2ec5d2b83a.zip
Makefile: Avoid regenerating the iftemplates at everyrun
Fixes: #26 Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 28bc1a52f..0c7be6723 100644
--- a/Makefile
+++ b/Makefile
@@ -417,15 +417,17 @@ $(fcsort) : $(support)/fc_sort.c
#
# Documentation generation
#
-iftemplates:
+iftemplates: $(tmpdir)/iftemplates
+$(tmpdir)/iftemplates:
@echo "Generating interface templates into $(tmpdir)/iftemplates"
@test -d $(tmpdir)/iftemplates || mkdir -p $(tmpdir)/iftemplates
$(verbose) $(gentemplates) -g -s $(moddir) -t $(tmpdir)/iftemplates
ifdef LOCAL_ROOT
$(verbose) $(gentemplates) -g -s $(local_moddir) -t $(tmpdir)/iftemplates
endif
+ @touch $(tmpdir)/iftemplates
-$(layerxml): %.xml: iftemplates $(all_metaxml) $(filter $(addprefix $(moddir)/, $(notdir $*))%, $(detected_mods)) $(subst .te,.if, $(filter $(addprefix $(moddir)/, $(notdir $*))%, $(detected_mods)))
+$(layerxml): %.xml: $(tmpdir)/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 -T $(tmpdir)/iftemplates -m $$i >> $@; done