From 8a389a06e119e629de1791bf6f5ecc952c4850a6 Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Mon, 27 Feb 2023 09:43:11 +0800 Subject: [PATCH] Don't download tarball if a local git repo found Signed-off-by: Huang Qi --- arch/arm/src/nrf52/Make.defs | 2 ++ arch/risc-v/src/bl602/Make.defs | 2 ++ arch/risc-v/src/esp32c3/Make.defs | 2 ++ arch/risc-v/src/opensbi/Make.defs | 2 ++ arch/xtensa/src/esp32/Make.defs | 2 ++ 5 files changed, 10 insertions(+) diff --git a/arch/arm/src/nrf52/Make.defs b/arch/arm/src/nrf52/Make.defs index 282976f9d7..373494f0f9 100644 --- a/arch/arm/src/nrf52/Make.defs +++ b/arch/arm/src/nrf52/Make.defs @@ -129,11 +129,13 @@ chip/$(NRFXLIB_UNPACK): $(NRFXLIB_TGZ) $(Q) mv chip/$(NRFXLIB_UNPACK)-$(NRFXLIB_VER)* chip/$(NRFXLIB_UNPACK) $(Q) touch chip/$(NRFXLIB_UNPACK) +ifeq ($(wildcard chip/$(NRFXLIB_UNPACK)/.git),) context:: chip/$(NRFXLIB_UNPACK) distclean:: $(call DELFILE, chip/$(NRFXLIB_TGZ)) $(call DELDIR, chip/$(NRFXLIB_UNPACK)) +endif CHIP_CSRCS += nrf52_sdc.c diff --git a/arch/risc-v/src/bl602/Make.defs b/arch/risc-v/src/bl602/Make.defs index 4f0c44b944..635a78c9a7 100644 --- a/arch/risc-v/src/bl602/Make.defs +++ b/arch/risc-v/src/bl602/Make.defs @@ -81,11 +81,13 @@ chip/$(WIRELESS_DRV_UNPACK): $(WIRELESS_DRV_ZIP) $(Q) mv chip/$(WIRELESS_DRV_UNPACK)-$(WIRELESS_DRV_VERSION)/* chip/$(WIRELESS_DRV_UNPACK) $(Q) touch chip/$(WIRELESS_DRV_UNPACK) +ifeq ($(wildcard chip/$(WIRELESS_DRV_UNPACK)/.git),) context:: chip/$(WIRELESS_DRV_UNPACK) distclean:: $(call DELFILE, chip/$(WIRELESS_DRV_ZIP)) $(call DELDIR, chip/$(WIRELESS_DRV_UNPACK)) +endif INCLUDES += $(shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)$(WIRELESS_DRV_UNPACK)$(DELIM)includes$(DELIM)BL602$(DELIM)nuttx) CHIP_CSRCS += bl602_netdev.c diff --git a/arch/risc-v/src/esp32c3/Make.defs b/arch/risc-v/src/esp32c3/Make.defs index 003eeaa42e..da28f746b8 100644 --- a/arch/risc-v/src/esp32c3/Make.defs +++ b/arch/risc-v/src/esp32c3/Make.defs @@ -198,11 +198,13 @@ chip/$(WIRELESS_DRV_UNPACK): $(WIRELESS_DRV_ZIP) $(Q) mv chip/$(WIRELESS_DRV_UNPACK)-$(WIRELESS_DRV_ID)* chip/$(WIRELESS_DRV_UNPACK) $(Q) touch chip/$(WIRELESS_DRV_UNPACK) +ifeq ($(wildcard chip/$(WIRELESS_DRV_UNPACK)/.git),) context:: chip/$(WIRELESS_DRV_UNPACK) distclean:: $(call DELFILE, chip/$(WIRELESS_DRV_ZIP)) $(call DELDIR, chip/$(WIRELESS_DRV_UNPACK)) +endif INCLUDES += $(shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)esp-wireless-drivers-3rdparty$(DELIM)include) INCLUDES += $(shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)esp-wireless-drivers-3rdparty$(DELIM)include$(DELIM)esp32c3) diff --git a/arch/risc-v/src/opensbi/Make.defs b/arch/risc-v/src/opensbi/Make.defs index 1b213d9603..0d51253f4b 100644 --- a/arch/risc-v/src/opensbi/Make.defs +++ b/arch/risc-v/src/opensbi/Make.defs @@ -52,11 +52,13 @@ $(OPENSBI_TARBALL): $(Q) mv opensbi/$(OPENSBI_DIR) opensbi/$(OPENSBI_UNPACK) $(Q) touch opensbi/.opensbi_unpack +ifeq ($(wildcard opensbi/$(OPENSBI_UNPACK)/.git),) context:: .opensbi_unpack distclean:: $(call DELFILE, opensbi/.opensbi_unpack) $(call DELFILE, opensbi/$(OPENSBI_TARBALL)) $(call DELDIR, opensbi/$(OPENSBI_UNPACK)) +endif endif diff --git a/arch/xtensa/src/esp32/Make.defs b/arch/xtensa/src/esp32/Make.defs index a536c78274..cab253b1f8 100644 --- a/arch/xtensa/src/esp32/Make.defs +++ b/arch/xtensa/src/esp32/Make.defs @@ -211,11 +211,13 @@ chip/$(WIRELESS_DRV_UNPACK): $(WIRELESS_DRV_ZIP) $(Q) mv chip/$(WIRELESS_DRV_UNPACK)-$(WIRELESS_DRV_ID)* chip/$(WIRELESS_DRV_UNPACK) $(Q) touch chip/$(WIRELESS_DRV_UNPACK) +ifeq ($(wildcard chip/$(WIRELESS_DRV_UNPACK)/.git),) context:: chip/$(WIRELESS_DRV_UNPACK) distclean:: $(call DELFILE, chip/$(WIRELESS_DRV_ZIP)) $(call DELDIR, chip/$(WIRELESS_DRV_UNPACK)) +endif INCLUDES += $(shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)esp-wireless-drivers-3rdparty$(DELIM)include) INCLUDES += $(shell $(INCDIR) "$(CC)" $(ARCH_SRCDIR)$(DELIM)chip$(DELIM)esp-wireless-drivers-3rdparty$(DELIM)include$(DELIM)esp32)