summaryrefslogtreecommitdiffstats
path: root/config/recurse.mk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /config/recurse.mk
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'config/recurse.mk')
-rw-r--r--config/recurse.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/config/recurse.mk b/config/recurse.mk
index 6afad04c2e..7956578ac0 100644
--- a/config/recurse.mk
+++ b/config/recurse.mk
@@ -208,9 +208,18 @@ $(addprefix build/unix/stdc++compat/,target host) build/clang-plugin/host: confi
# prior to Make running. So we also set it as a dependency of pre-export, which
# ensures it exists before recursing the rust targets and the export targets
# that run cbindgen, tricking Make into keeping them early.
-$(rust_targets): $(DEPTH)/.cargo/config.toml
+# When $topobjdir/.cargo/config exists from an old build, we also remove it because
+# cargo will prefer to use it rather than config.toml.
+CARGO_CONFIG_DEPS = $(DEPTH)/.cargo/config.toml
+ifneq (,$(wildcard $(DEPTH)/.cargo/config))
+CARGO_CONFIG_DEPS += $(MDDEPDIR)/cargo-config-cleanup.stub
+endif
+$(rust_targets): $(CARGO_CONFIG_DEPS)
ifndef TEST_MOZBUILD
-recurse_pre-export: $(DEPTH)/.cargo/config.toml
+recurse_pre-export: $(CARGO_CONFIG_DEPS)
endif
+$(MDDEPDIR)/cargo-config-cleanup.stub:
+ rm $(DEPTH)/.cargo/config
+ touch $@
endif