From a58867402b6aae6b2b6017b00b64cc677e9d98a4 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Sun, 19 May 2024 06:38:29 +0700 Subject: [PATCH] fix(common): track targets when determining built dependencies When multiple modules listed the same dependency, but with different targets, only the first dependency:target would be built, because we were not tracking the targets as well. --- resources/builder.inc.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/builder.inc.sh b/resources/builder.inc.sh index 9aaef9ac718..a7f65aded30 100755 --- a/resources/builder.inc.sh +++ b/resources/builder.inc.sh @@ -1682,11 +1682,6 @@ _builder_do_build_deps() { continue fi - # Only configure and build the dependency once per invocation - if builder_has_module_been_built "$dep"; then - continue - fi - dep_target= if [[ ! -z ${_builder_dep_targets[$dep]+x} ]]; then # TODO: in the future split _builder_dep_targets into comma-separated @@ -1694,14 +1689,19 @@ _builder_do_build_deps() { dep_target=${_builder_dep_targets[$dep]} fi - builder_set_module_has_been_built "$dep" + # Only configure and build the dependency once per invocation + if builder_has_module_been_built "$dep$dep_target"; then + continue + fi + + builder_set_module_has_been_built "$dep$dep_target" "$REPO_ROOT/$dep/build.sh" "configure$dep_target" "build$dep_target" \ $builder_verbose \ $builder_debug \ $_builder_build_deps \ --builder-dep-parent "$THIS_SCRIPT_IDENTIFIER" && ( if $_builder_debug_internal; then - builder_echo success "## Dependency $dep for $_builder_matched_action_name successfully" + builder_echo success "## Dependency $dep$dep_target for $_builder_matched_action_name successfully" fi ) || ( result=$?