From 3040c59ae96c6f83dac1d48e5a5200653d54e4ba Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Mon, 21 Dec 2020 19:48:58 +0800 Subject: [PATCH] Replace all wget with curl wget is missing from some system (like macOS and Windows native), it's better to use curl to simplify build environment. Signed-off-by: Huang Qi --- canutils/libcanard/Makefile | 3 +-- examples/lvgldemo/Makefile | 3 +-- fsutils/inih/Makefile | 3 +-- graphics/lvgl/Makefile | 3 +-- interpreters/duktape/Makefile | 2 +- interpreters/quickjs/Makefile | 2 +- interpreters/wamr/Makefile | 2 +- interpreters/wasm3/Makefile | 2 +- netutils/cjson/Makefile | 3 +-- system/embedlog/Makefile | 3 +-- system/libuv/libuv/Makefile | 5 ++--- system/psmq/Makefile | 3 +-- testing/unity/Makefile | 3 +-- wireless/bluetooth/nimble/Makefile | 2 +- 14 files changed, 15 insertions(+), 24 deletions(-) diff --git a/canutils/libcanard/Makefile b/canutils/libcanard/Makefile index b08ee45df..52919a160 100644 --- a/canutils/libcanard/Makefile +++ b/canutils/libcanard/Makefile @@ -35,7 +35,6 @@ include $(APPDIR)/Make.defs -WGET = wget UNPACK = unzip PACKEXT = .zip @@ -55,7 +54,7 @@ CSRCS = $(LIBCANARD_SRCDIR)$(DELIM)canard.c $(LIBCANARD_DRVDIR)$(DELIM)canard_nu $(LIBCANARD_PACKNAME): @echo "Downloading: $@" - $(Q) $(WGET) -O $@ $(LIBCANARD_URL)$(DELIM)$(LIBCANARD_VERSION)$(PACKEXT) + $(Q) curl -o $@ -L $(LIBCANARD_URL)$(DELIM)$(LIBCANARD_VERSION)$(PACKEXT) $(LIBCANARD_UNPACKNAME): $(LIBCANARD_PACKNAME) @echo "Unpacking: $< -> $@" diff --git a/examples/lvgldemo/Makefile b/examples/lvgldemo/Makefile index c1577afe5..64d609b91 100644 --- a/examples/lvgldemo/Makefile +++ b/examples/lvgldemo/Makefile @@ -42,7 +42,6 @@ CONFIG_LV_EXAMPLES_URL ?= https://github.com/lvgl/lv_examples/archive LVGL_EXAMPLES_VERSION = $(patsubst "%",%,$(strip $(CONFIG_LVGL_VERSION))) LVGL_EXAMPLES_TARBALL = v$(LVGL_EXAMPLES_VERSION).zip -WGET ?= wget LVGL_EXAMPLES_UNPACKNAME = lv_examples UNPACK ?= unzip -o @@ -91,7 +90,7 @@ CXXFLAGS += ${shell $(DEFINE) "$(CC)" LV_LVGL_H_INCLUDE_SIMPLE} -Wno-format $(LVGL_EXAMPLES_TARBALL): @echo "Downloading: $(LVGL_EXAMPLES_TARBALL)" - $(Q) $(WGET) $(CONFIG_LV_EXAMPLES_URL)/$(LVGL_EXAMPLES_TARBALL) + $(Q) curl -O -L $(CONFIG_LV_EXAMPLES_URL)/$(LVGL_EXAMPLES_TARBALL) $(LVGL_EXAMPLES_UNPACKNAME): $(LVGL_EXAMPLES_TARBALL) @echo "Unpacking: $(LVGL_EXAMPLES_TARBALL) -> $(LVGL_EXAMPLES_UNPACKNAME)" diff --git a/fsutils/inih/Makefile b/fsutils/inih/Makefile index cbf028114..49e05b89d 100644 --- a/fsutils/inih/Makefile +++ b/fsutils/inih/Makefile @@ -35,7 +35,6 @@ include $(APPDIR)/Make.defs -WGET = wget CP = cp -R UNPACK = tar -xzf PACKEXT = .tar.gz @@ -81,7 +80,7 @@ CFLAGS += -DINI_HANDLER_LINENO=1 $(INIH_TARBALL): @echo "Downloading: $@" - $(Q) $(WGET) -O $@ $(INIH_URL)/$@ + $(Q) curl -L -o $@ $(INIH_URL)/$@ ${Q} $(NXTOOLSDIR)/check-hash.sh sha256 $(INIH_SRC_SHA256) $@ $(INIH_SOURCES): $(INIH_TARBALL) diff --git a/graphics/lvgl/Makefile b/graphics/lvgl/Makefile index f60afd8d5..fc4061999 100644 --- a/graphics/lvgl/Makefile +++ b/graphics/lvgl/Makefile @@ -65,7 +65,6 @@ CONFIG_GRAPH_LVGL_URL ?= "https://github.com/lvgl/lvgl/archive" LVGL_VERSION = $(patsubst "%",%,$(strip $(CONFIG_LVGL_VERSION))) LVGL_TARBALL = v$(LVGL_VERSION).zip -WGET ?= wget LVGL_UNPACKNAME = lvgl UNPACK ?= unzip -o @@ -74,7 +73,7 @@ LVGL_UNPACKDIR = $(WD)/$(LVGL_UNPACKNAME) $(LVGL_TARBALL): @echo "Downloading: $(LVGL_TARBALL)" - $(Q) $(WGET) $(CONFIG_GRAPH_LVGL_URL)/$(LVGL_TARBALL) + $(Q) curl -O -L $(CONFIG_GRAPH_LVGL_URL)/$(LVGL_TARBALL) $(LVGL_UNPACKNAME): $(LVGL_TARBALL) @echo "Unpacking: $(LVGL_TARBALL) -> $(LVGL_UNPACKNAME)" diff --git a/interpreters/duktape/Makefile b/interpreters/duktape/Makefile index d24344777..eeb8ab35e 100644 --- a/interpreters/duktape/Makefile +++ b/interpreters/duktape/Makefile @@ -50,7 +50,7 @@ CFLAGS += -DDUK_CMDLINE_PRINTALERT_SUPPORT $(DUKTAPE_TARBALL): $(Q) echo "Downloading $(DUKTAPE_TARBALL)" - $(Q) wget $(DUKTAPE_URL) + $(Q) curl -O -L $(DUKTAPE_URL) $(DUKTAPE_UNPACK): $(DUKTAPE_TARBALL) $(Q) echo "Unpacking $(DUKTAPE_TARBALL) to $(DUKTAPE_UNPACK)" diff --git a/interpreters/quickjs/Makefile b/interpreters/quickjs/Makefile index 1a916275c..08de14730 100644 --- a/interpreters/quickjs/Makefile +++ b/interpreters/quickjs/Makefile @@ -49,7 +49,7 @@ MODULE = $(CONFIG_INTERPRETERS_QUICKJS) $(QUICKJS_TARBALL): $(Q) echo "Downloading $(QUICKJS_TARBALL)" - $(Q) wget $(QUICKJS_URL) + $(Q) curl -O -L $(QUICKJS_URL) $(QUICKJS_UNPACK): $(QUICKJS_TARBALL) $(Q) echo "Unpacking $(QUICKJS_TARBALL) to $(QUICKJS_UNPACK)" diff --git a/interpreters/wamr/Makefile b/interpreters/wamr/Makefile index 7d449b720..15c27abf9 100644 --- a/interpreters/wamr/Makefile +++ b/interpreters/wamr/Makefile @@ -49,7 +49,7 @@ MODULE = $(CONFIG_INTERPRETERS_WAMR) $(WAMR_TARBALL): $(Q) echo "Downloading $(WAMR_TARBALL)" - $(Q) wget $(WAMR_URL) + $(Q) curl -O -L $(WAMR_URL) $(WAMR_UNPACK): $(WAMR_TARBALL) $(Q) echo "Unpacking $(WAMR_TARBALL) to $(WAMR_UNPACK)" diff --git a/interpreters/wasm3/Makefile b/interpreters/wasm3/Makefile index 6d44db488..8b3f2786a 100644 --- a/interpreters/wasm3/Makefile +++ b/interpreters/wasm3/Makefile @@ -61,7 +61,7 @@ MODULE = $(CONFIG_INTERPRETERS_WASM3) $(WASM3_TARBALL): $(Q) echo "Downloading $(WASM3_TARBALL)" - $(Q) wget $(WASM3_URL) + $(Q) curl -O -L $(WASM3_URL) $(WASM3_UNPACK): $(WASM3_TARBALL) $(Q) echo "Unpacking $(WASM3_TARBALL) to $(WASM3_UNPACK)" diff --git a/netutils/cjson/Makefile b/netutils/cjson/Makefile index e8185b352..14e194f1a 100644 --- a/netutils/cjson/Makefile +++ b/netutils/cjson/Makefile @@ -46,7 +46,6 @@ CONFIG_NETUTILS_CJSON_VERSION ?= "1.7.10" CJSON_VERSION = $(patsubst "%",%,$(strip $(CONFIG_NETUTILS_CJSON_VERSION))) CJSON_TARBALL = v$(CJSON_VERSION).tar.gz -WGET ?= wget CJSON_UNPACKNAME = cJSON-$(CJSON_VERSION) UNPACK ?= tar -zxf @@ -64,7 +63,7 @@ CSRCS += $(CJSON_SRCDIR)$(DELIM)cJSON_Utils.c $(CJSON_TARBALL): @echo "Downloading: $(CJSON_TARBALL)" - $(Q) $(WGET) $(CONFIG_NETUTILS_CJSON_URL)/$(CJSON_TARBALL) + $(Q) curl -O -L $(CONFIG_NETUTILS_CJSON_URL)/$(CJSON_TARBALL) $(CJSON_UNPACKNAME): $(CJSON_TARBALL) @echo "Unpacking: $(CJSON_TARBALL) -> $(CJSON_UNPACKNAME)" diff --git a/system/embedlog/Makefile b/system/embedlog/Makefile index 7d8548396..19a563112 100644 --- a/system/embedlog/Makefile +++ b/system/embedlog/Makefile @@ -35,7 +35,6 @@ include $(APPDIR)/Make.defs -WGET = wget CP = cp -R UNPACK = tar -xzf PACKEXT = .tar.gz @@ -176,7 +175,7 @@ CFLAGS += -DENABLE_CLOCK=0 $(EMBEDLOG_TARBALL): @echo "Downloading: $@" - $(Q) $(WGET) -O $@ $(EMBEDLOG_URL)/$@ + $(Q) curl -L -o $@ $(EMBEDLOG_URL)/$@ ${Q} $(NXTOOLSDIR)/check-hash.sh sha256 $(EMBEDLOG_SRC_SHA256) $@ $(EMBEDLOG_SOURCES): $(EMBEDLOG_TARBALL) diff --git a/system/libuv/libuv/Makefile b/system/libuv/libuv/Makefile index 4556fdd11..17b8c9981 100644 --- a/system/libuv/libuv/Makefile +++ b/system/libuv/libuv/Makefile @@ -21,13 +21,12 @@ include $(APPDIR)/Make.defs LIBUV_PATCHS ?= $(sort $(wildcard $(LIBUV_DIR)/000*.patch)) -WGET ?= wget UNPACK ?= unzip -q $(LIBUV_DIR)/$(CONFIG_LIBUV_TARBALL): @echo "Downloading: $(CONFIG_LIBUV_TARBALL)" - $(Q) $(WGET) $(CONFIG_LIBUV_URL)/$(CONFIG_LIBUV_TARBALL) \ - -O $(LIBUV_DIR)/$(CONFIG_LIBUV_TARBALL) + $(Q) curl -L $(CONFIG_LIBUV_URL)/$(CONFIG_LIBUV_TARBALL) \ + -o $(LIBUV_DIR)/$(CONFIG_LIBUV_TARBALL) $(LIBUV_UNPACKDIR): $(LIBUV_DIR)/$(CONFIG_LIBUV_TARBALL) @echo "Unpacking: $(CONFIG_LIBUV_TARBALL) -> $(LIBUV_UNPACKDIR)" diff --git a/system/psmq/Makefile b/system/psmq/Makefile index 736277bb6..b8d992045 100644 --- a/system/psmq/Makefile +++ b/system/psmq/Makefile @@ -35,7 +35,6 @@ include $(APPDIR)/Make.defs -WGET = wget CP = cp -R UNPACK = tar -xzf PACKEXT = .tar.gz @@ -108,7 +107,7 @@ endif $(PSMQ_TARBALL): @echo "Downloading: $@" - $(Q) $(WGET) -O $@ $(PSMQ_URL)/$@ + $(Q) curl -L -o $@ $(PSMQ_URL)/$@ $(Q) $(NXTOOLSDIR)/check-hash.sh sha256 $(PSMQ_SRC_SHA256) $@ $(PSMQ_SOURCES): $(PSMQ_TARBALL) diff --git a/testing/unity/Makefile b/testing/unity/Makefile index 613d3dc5d..03c9532f5 100644 --- a/testing/unity/Makefile +++ b/testing/unity/Makefile @@ -46,7 +46,6 @@ CONFIG_TESTING_UNITY_VERSION ?= "2.4.3" UNITY_VERSION = $(patsubst "%",%,$(strip $(CONFIG_TESTING_UNITY_VERSION))) UNITY_TARBALL = v$(UNITY_VERSION).tar.gz -WGET ?= wget UNITY_UNPACKNAME = Unity-$(UNITY_VERSION) UNPACK ?= tar -zxf @@ -63,7 +62,7 @@ CSRCS = $(UNITY_SRCDIR)$(DELIM)unity.c $(UNITY_TARBALL): @echo "Downloading: $(UNITY_TARBALL)" - $(Q) $(WGET) $(CONFIG_TESTING_UNITY_URL)/$(UNITY_TARBALL) + $(Q) curl -L -O $(CONFIG_TESTING_UNITY_URL)/$(UNITY_TARBALL) $(UNITY_UNPACKNAME): $(UNITY_TARBALL) @echo "Unpacking: $(UNITY_TARBALL) -> $(UNITY_UNPACKNAME)" diff --git a/wireless/bluetooth/nimble/Makefile b/wireless/bluetooth/nimble/Makefile index 50e62934f..b5e2eacdd 100644 --- a/wireless/bluetooth/nimble/Makefile +++ b/wireless/bluetooth/nimble/Makefile @@ -33,7 +33,7 @@ NIMBLE_TAR := $(CONFIG_NIMBLE_REF).tar.gz NIMBLE_URL := https://github.com/apache/mynewt-nimble/archive/$(NIMBLE_TAR) $(NIMBLE_TAR): - wget $(NIMBLE_URL) -O $(NIMBLE_TAR) + $(Q) curl -L $(NIMBLE_URL) -o $(NIMBLE_TAR) $(NIMBLE_UNPACKDIR): $(NIMBLE_TAR) $(Q) tar zxf $(NIMBLE_TAR)