configure: add assemblies to RULES_EXPAND

This commit is contained in:
Ralph Lange
2015-10-10 18:55:17 +02:00
parent 88cb33a04d
commit 8596dc41f2

View File

@@ -2,6 +2,9 @@
vpath %@ $(USR_VPATH) $(ALL_SRC_DIRS)
#---------------------------------------------------------------
# Variable expansion
# Default settings
EXPAND_TOOL ?= $(PERL) $(TOOLS)/expandVars.pl
@@ -24,3 +27,27 @@ expand_clean:
@$(RM) $(EXPANDED)
.PHONY : expand_clean
#---------------------------------------------------------------
# Assemblies (files assembled from snippets)
ASSEMBLE_TOOL ?= $(PERL) $(TOOLS)/assembleSnippets.pl
define COMMON_ASSEMBLY_template
$(COMMON_DIR)/$1: $($1_SNIPPETS)
@echo "Assembling file $$@ from snippets"
@$(RM) $1
$(ASSEMBLE_TOOL) -o $1 $($1_SNIPPETS)
@$(MV) $1 $$@
endef
$(foreach asy, $(COMMON_ASSEMBLIES), \
$(eval $(call COMMON_ASSEMBLY_template,$(strip $(asy)))))
define ASSEMBLY_template
$1: $($1_SNIPPETS)
@echo "Assembling file $$@ from snippets"
@$(RM) $$@
$(ASSEMBLE_TOOL) -o $$@ $($1_SNIPPETS)
endef
$(foreach asy, $(ASSEMBLIES), \
$(eval $(call ASSEMBLY_template,$(strip $(asy)))))