From: Arnout Vandecappelle Date: Tue, 3 Nov 2015 23:09:35 +0000 (+0100) Subject: toolchain-external: make extraction idempotent X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b731dc7bfb9c8ce7be502711f0b44ccab5515f1d;p=buildroot.git toolchain-external: make extraction idempotent Commit 23ffa7ec first extracts to the toolchain-external build directory and then moves everything to $(HOST_DIR)/opt/ext-toolchain. However, this is not idempotent, because moving directories over existing ones doesn't always work, particularly if the target is on another device. Simply remove the destination contents before moving. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Thomas Petazzoni --- diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk index 18e6808fc7..958ab183c2 100644 --- a/toolchain/toolchain-external/toolchain-external.mk +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -483,6 +483,7 @@ TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/* # since it's actually a fairly special package, we need it to be moved # into TOOLCHAIN_EXTERNAL_INSTALL_DIR. define TOOLCHAIN_EXTERNAL_MOVE + rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/* mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) mv $(@D)/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/ endef