From 41864d8ecd3de46267467a0067787fabb4c2fe50 Mon Sep 17 00:00:00 2001 From: Simon Rose <simon.rose@ess.eu> Date: Wed, 9 Jun 2021 09:48:21 +0200 Subject: [PATCH] Moved the db_interal rule earlier to look nicer --- require-ess/tools/driver.makefile | 32 ++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/require-ess/tools/driver.makefile b/require-ess/tools/driver.makefile index 90fa67b5..fe1d97cf 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})),) -- GitLab