Don't download tarballs if a local git repo found

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-11-27 14:28:07 +08:00 committed by Petro Karashchenko
parent 83c4e7d9b6
commit 4be9ec774b
4 changed files with 37 additions and 8 deletions

View File

@ -44,6 +44,8 @@ ifeq ($(CONFIG_SEGGER_RTT),y)
RTT_VERSION ?= 7.54
# Download and unpack tarball if no git repo found
ifeq ($(wildcard $(SGDIR)/RTT/.git),)
$(SGDIR)/RTT.zip:
$(Q) curl -L https://github.com/SEGGERMicro/RTT/archive/refs/tags/V$(RTT_VERSION).zip -o $(SGDIR)/RTT.zip
$(Q) unzip -o $(SGDIR)/RTT.zip -d $(SGDIR)
@ -51,6 +53,7 @@ $(SGDIR)/RTT.zip:
$(Q) patch -p0 < segger/0001-segger-RTT-include-the-SEGGER_RTT_Conf.h-from-custom.patch
TARGET_ZIP += $(SGDIR)/RTT.zip
endif
endif
@ -72,18 +75,25 @@ ifeq ($(CONFIG_SEGGER_SYSVIEW),y)
SYSVIEW_VERSION ?= 3.30
# Download and unpack tarball if no git repo found
ifeq ($(wildcard $(SGDIR)/SystemView/.git),)
$(SGDIR)/SystemView.zip:
$(Q) curl -L https://github.com/SEGGERMicro/SystemView/archive/refs/tags/V$(SYSVIEW_VERSION).zip -o $(SGDIR)/SystemView.zip
$(Q) unzip -o $(SGDIR)/SystemView.zip -d $(SGDIR)
$(Q) mv $(SGDIR)/SystemView-$(SYSVIEW_VERSION) $(SGDIR)/SystemView
TARGET_ZIP += $(SGDIR)/SystemView.zip
endif
endif
context:: $(TARGET_ZIP)
distclean::
ifeq ($(wildcard $(SGDIR)/SystemView/.git),)
$(call DELDIR, $(SGDIR)/SystemView)
endif
ifeq ($(wildcard $(SGDIR)/RTT/.git),)
$(call DELDIR, $(SGDIR)/RTT)
endif
$(call DELFILE, $(TARGET_ZIP))

View File

@ -23,13 +23,18 @@ ifeq ($(CONFIG_AUDIO_SRC),y)
PACKAGE=libsamplerate
VERSION=0.1.9
# Download and unpack tarball if no git repo found
ifeq ($(wildcard libsamplerate/.git),)
libsamplerate:
$(Q) curl -L https://codeload.github.com/libsndfile/libsamplerate/zip/master -o libsamplerate.zip
$(Q) unzip -o libsamplerate.zip
$(Q) mv libsamplerate-master libsamplerate
endif
$(TOPDIR)/include/nuttx/audio/samplerate.h : libsamplerate
$(Q) cp -rf libsamplerate/include/samplerate.h $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)
context:: libsamplerate
context:: $(TOPDIR)/include/nuttx/audio/samplerate.h
CSRCS += samplerate.c
CSRCS += src_sinc.c
@ -58,7 +63,9 @@ DEPPATH += --dep-path libsamplerate/src
distclean::
$(call DELDIR, $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)audio$(DELIM)samplerate.h)
ifeq ($(wildcard libsamplerate/.git),)
$(call DELDIR, libsamplerate)
$(call DELFILE, libsamplerate.zip)
endif
endif

View File

@ -20,6 +20,8 @@
ETL_VERSION=20.32.1
# Download and unpack tarball if no git repo found
ifeq ($(wildcard etl/.git),)
$(ETL_VERSION).tar.gz:
$(Q) curl -O -L https://github.com/ETLCPP/etl/archive/refs/tags/$(ETL_VERSION).tar.gz
@ -28,6 +30,10 @@ etl: $(ETL_VERSION).tar.gz
$(Q) $(DELFILE) $(ETL_VERSION).tar.gz
$(Q) mv etl-$(ETL_VERSION) etl
$(Q) touch $@
endif
$(TOPDIR)/include/etl: etl
$(Q) $(DIRLINK) $(CURDIR)/etl/include $(TOPDIR)/include/etl
ifeq ($(CONFIG_ARCH_ARMV5M), y)
$(Q) cp $(CURDIR)/etl/include/etl/profiles/armv5_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
else ifeq ($(CONFIG_ARCH_ARMV6M), y)
@ -38,12 +44,11 @@ else
$(Q) cp $(CURDIR)/etl/include/etl/profiles/gcc_generic_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
endif
$(TOPDIR)/include/etl: etl
$(Q) $(DIRLINK) $(CURDIR)/etl/include $(TOPDIR)/include/etl
context:: $(TOPDIR)/include/etl
distclean::
$(Q) $(DELFILE) $(ETL_VERSION).tar.gz
$(Q) $(DIRUNLINK) $(TOPDIR)/include/etl
ifeq ($(wildcard etl/.git),)
$(Q) $(DELFILE) $(ETL_VERSION).tar.gz
$(call DELDIR, etl)
endif

View File

@ -20,22 +20,29 @@
UCLIBCXX_VERSION=0.2.5
$(TOPDIR)/include/uClibc++:
# Download and unpack tarball if no git repo found
ifeq ($(wildcard uClibc++/.git),)
uClibc++:
curl -O -L https://git.busybox.net/uClibc++/snapshot/uClibc++-$(UCLIBCXX_VERSION).tar.bz2
$(Q) tar -xf uClibc++-$(UCLIBCXX_VERSION).tar.bz2
$(Q) $(DELFILE) uClibc++-$(UCLIBCXX_VERSION).tar.bz2
$(Q) mv uClibc++-$(UCLIBCXX_VERSION) uClibc++
$(Q) $(DIRLINK) $(CURDIR)/uClibc++/include $(TOPDIR)/include/uClibc++
$(Q) $(COPYFILE) $(CURDIR)/system_configuration.h $(TOPDIR)/include/uClibc++
$(Q) patch -p0 < 0001-uClibcxx-basic_definitions-fix-GCC-specific-definiti.patch
$(Q) patch -p0 < 0001-uclibxx-use-overload-constructor-of-filebuf-ostream.patch
endif
$(TOPDIR)/include/uClibc++: uClibc++
$(Q) $(DIRLINK) $(CURDIR)/uClibc++/include $(TOPDIR)/include/uClibc++
$(Q) $(COPYFILE) $(CURDIR)/system_configuration.h $(TOPDIR)/include/uClibc++
context:: $(TOPDIR)/include/uClibc++
distclean::
$(Q) $(DELFILE) $(TOPDIR)/include/uClibc++/system_configuration.h
$(Q) $(DIRUNLINK) $(TOPDIR)/include/uClibc++
ifeq ($(wildcard uClibc++/.git),)
$(call DELDIR, uClibc++)
endif
CPPSRCS += algorithm.cpp associative_base.cpp bitset.cpp char_traits.cpp
CPPSRCS += complex.cpp deque.cpp exception.cpp fstream.cpp