diff --git a/require-ess/tools/driver.makefile b/require-ess/tools/driver.makefile index 90fa67b58fc3792306495d93812f5dafacd4695d..fe1d97cf738f257a5dd51298bc6f213114eb5d67 100644 --- a/require-ess/tools/driver.makefile +++ b/require-ess/tools/driver.makefile @@ -441,6 +441,23 @@ $(foreach a,${CROSS_COMPILER_TARGET_ARCHS},$(foreach l,$(LINK_$a),$(eval $(call SRCS_Linux = ${SOURCES_Linux} export SRCS_Linux +# Perform default database expansion of .substitions/.templates into $(COMMON_DIR) +db_internal: $(COMMON_DIR) + +define SUBS_EXPAND +vpath $(notdir $2) $(dir $2) +db_internal: $(COMMON_DIR)/$(notdir $(basename $2).db) + +$(COMMON_DIR)/$(notdir $(basename $2).db): $(notdir $2) + @printf "Inflating database ... %44s >>> %40s \n" "$$^" "$$@" + $(QUIET)$(MSI) -D $$(USR_DBFLAGS) -o $(COMMON_DIR)/$$(notdir $$(basename $2).db) $1 $$^ > $(COMMON_DIR)/$$(notdir $$(basename $2).db).d + $(QUIET)$(MSI) $$(USR_DBFLAGS) -o $(COMMON_DIR)/$$(notdir $$(basename $2).db) $1 $$^ +endef + +$(foreach file,$(SUBS),$(eval $(call SUBS_EXPAND,-S,$(file)))) +$(foreach file,$(TMPS),$(eval $(call SUBS_EXPAND,,$(file)))) + + install build debug:: $(MAKE_FIRST) @echo "MAKING EPICS VERSION ${EPICSVERSION}" @@ -463,21 +480,6 @@ install build debug:: $(COMMON_DIR) ((failed_builds == 0)) -db_internal: $(COMMON_DIR) - -define SUBS_EXPAND -vpath $(notdir $2) $(dir $2) -db_internal: $(COMMON_DIR)/$(notdir $(basename $2).db) - -$(COMMON_DIR)/$(notdir $(basename $2).db): $(notdir $2) - @printf "Inflating database ... %44s >>> %40s \n" "$$^" "$$@" - $(QUIET)$(MSI) -D $$(USR_DBFLAGS) -o $(COMMON_DIR)/$$(notdir $$(basename $2).db) $1 $$^ > $(COMMON_DIR)/$$(notdir $$(basename $2).db).d - $(QUIET)$(MSI) $$(USR_DBFLAGS) -o $(COMMON_DIR)/$$(notdir $$(basename $2).db) $1 $$^ -endef - -$(foreach file,$(SUBS),$(eval $(call SUBS_EXPAND,-S,$(file)))) -$(foreach file,$(TMPS),$(eval $(call SUBS_EXPAND,,$(file)))) - else # T_A ifeq ($(filter O.%,$(notdir ${CURDIR})),)