Skip to content
Snippets Groups Projects
Commit 86e6e2aa authored by Simon Rose's avatar Simon Rose
Browse files

Fixed inconsistent variable naming

parent 17dad862
No related branches found
No related tags found
1 merge request!83E3-752: Fetch dependencies recursively
Pipeline #110039 passed
...@@ -442,18 +442,18 @@ select = $(strip $(call -select,$(strip $2),$1,$3)) ...@@ -442,18 +442,18 @@ select = $(strip $(call -select,$(strip $2),$1,$3))
str-eq = $(if $(subst x$1,,x$2),,t) str-eq = $(if $(subst x$1,,x$2),,t)
_MODULES := MODULES :=
_PROCESSED_MODULES := PROCESSED_MODULES :=
REQ := REQ :=
INSTALLED_MODULES := $(sort $(notdir $(wildcard $(E3_SITEMODS_PATH)/* $(EPICS_MODULES)/*))) INSTALLED_MODULES := $(sort $(notdir $(wildcard $(E3_SITEMODS_PATH)/* $(EPICS_MODULES)/*)))
# Converts all of the X_DEP_VERSIONs to x_VERSION and records them # Converts all of the X_DEP_VERSIONs to x_VERSION and records them
define fetch_module_versions define fetch_module_versions
_lm := $$(shell echo $1 | tr '[:upper:]' '[:lower:]') lm := $$(shell echo $1 | tr '[:upper:]' '[:lower:]')
ifneq ($$(strip $$(filter $(INSTALLED_MODULES),$$(_lm))),) ifneq ($$(strip $$(filter $(INSTALLED_MODULES),$$(lm))),)
$$(_lm)_VERSION := $($1_DEP_VERSION$2) $$(lm)_VERSION := $($1_DEP_VERSION$2)
_MODULES += $$(_lm) MODULES += $$(lm)
REQ += $$(_lm) REQ += $$(lm)
else else
$$(warning Invalid dependency "$1_DEP_VERSION$2"; pruning) $$(warning Invalid dependency "$1_DEP_VERSION$2"; pruning)
endif endif
...@@ -471,16 +471,16 @@ endef ...@@ -471,16 +471,16 @@ endef
# Used to recurse through versions: recursively fetches all of the dependencies from the given module # Used to recurse through versions: recursively fetches all of the dependencies from the given module
define update_dep_versions define update_dep_versions
m := $$(firstword $$(_MODULES)) m := $$(firstword $$(MODULES))
_PROCESSED_MODULES += $$m PROCESSED_MODULES += $$m
$$m_TBL := $$(call fetch_deps,$$m) $$m_TBL := $$(call fetch_deps,$$m)
$$m_DEPS := $$(call select,1,$$($$m_TBL),1) $$m_DEPS := $$(call select,1,$$($$m_TBL),1)
_MODULES := $$(filter-out $$(_PROCESSED_MODULES),$$(_MODULES) $$($$m_DEPS)) MODULES := $$(filter-out $$(PROCESSED_MODULES),$$(MODULES) $$($$m_DEPS))
$$(foreach mm,$$($$m_DEPS),$$(eval $$(mm)_VERSION := $$(call select,2,$$($$m_TBL),$$$$(call str-eq,$$$$1,$$(mm))))) $$(foreach mm,$$($$m_DEPS),$$(eval $$(mm)_VERSION := $$(call select,2,$$($$m_TBL),$$$$(call str-eq,$$$$1,$$(mm)))))
endef endef
$(call while,$$(_MODULES),$(update_dep_versions)) $(call while,$$(MODULES),$(update_dep_versions))
$(foreach m,$(_PROCESSED_MODULES),$(eval export $m_VERSION)) $(foreach m,$(PROCESSED_MODULES),$(eval export $m_VERSION))
debug:: debug::
@echo "===================== Pass 3: T_A = $(T_A) =====================" @echo "===================== Pass 3: T_A = $(T_A) ====================="
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment