Makefile: Avoid regenerating the iftemplates at everyrun

Fixes: #26
This commit is contained in:
Laurent Bigonville 2019-07-21 15:45:23 +02:00
parent 921eb37a97
commit d90860861f
1 changed files with 4 additions and 2 deletions

View File

@ -415,15 +415,17 @@ $(fcsort) : $(support)/fc_sort.c
# #
# Documentation generation # Documentation generation
# #
iftemplates: iftemplates: $(tmpdir)/iftemplates
$(tmpdir)/iftemplates:
@echo "Generating interface templates into $(tmpdir)/iftemplates" @echo "Generating interface templates into $(tmpdir)/iftemplates"
@test -d $(tmpdir)/iftemplates || mkdir -p $(tmpdir)/iftemplates @test -d $(tmpdir)/iftemplates || mkdir -p $(tmpdir)/iftemplates
$(verbose) $(gentemplates) -g -s $(moddir) -t $(tmpdir)/iftemplates $(verbose) $(gentemplates) -g -s $(moddir) -t $(tmpdir)/iftemplates
ifdef LOCAL_ROOT ifdef LOCAL_ROOT
$(verbose) $(gentemplates) -g -s $(local_moddir) -t $(tmpdir)/iftemplates $(verbose) $(gentemplates) -g -s $(local_moddir) -t $(tmpdir)/iftemplates
endif 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) @test -d $(tmpdir) || mkdir -p $(tmpdir)
$(verbose) cat $(filter %$(notdir $*)/$(metaxml), $(all_metaxml)) > $@ $(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 $(verbose) for i in $(basename $(filter $(addprefix $(moddir)/, $(notdir $*))%, $(detected_mods))); do $(genxml) -w -T $(tmpdir)/iftemplates -m $$i >> $@; done