Skip to content

Commit 8da3dde

Browse files
committed
treewide: silent download, unpack and others
This introduces changes from NuttX commit 03b164f. The only left out is 'Register:' as that provides pretty handly list of applications in the firmware. The download is unified to handle it always the same way.
1 parent 02d293d commit 8da3dde

File tree

22 files changed

+82
-79
lines changed

22 files changed

+82
-79
lines changed

Make.defs

+8
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ define REGISTER
100100
endef
101101
endif
102102

103+
# Download
104+
105+
define DOWNLOAD
106+
$(ECHO_BEGIN)"Downloading: $3$2 "
107+
$(Q) curl -L $(if $(V),,-Ss) -O $(1)/$(2)
108+
$(ECHO_END)
109+
endef
110+
103111
# Standard include path
104112

105113
CFLAGS += ${INCDIR_PREFIX}"$(APPDIR)$(DELIM)include"

Makefile

+6-3
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,21 @@ HEAD_OBJ += $(wildcard $(APPDIR)$(DELIM)import$(DELIM)startup$(DELIM)*$(OBJEXT))
139139
HEAD_OBJ += $(wildcard $(APPDIR)$(DELIM)builtin$(DELIM)*$(OBJEXT))
140140

141141
.import: $(BIN) install
142-
$(Q) echo "LD: nuttx"
142+
$(ECHO_BEGIN)"LD: nuttx "
143143
$(Q) $(LD) --entry=__start $(LDFLAGS) $(LDLIBPATH) $(EXTRA_LIBPATHS) \
144144
-L$(APPDIR)$(DELIM)import$(DELIM)scripts -T$(LDNAME) \
145145
-o nuttx$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) $(LDSTARTGROUP) \
146146
$(BIN) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
147+
$(ECHO_END)
147148
ifeq ($(CONFIG_INTELHEX_BINARY),y)
148-
$(Q) echo "CP: nuttx.hex"
149+
$(ECHO_BEGIN)"CP: nuttx.hex "
149150
$(Q) $(OBJCOPY) $(OBJCOPYARGS) -O ihex nuttx$(EXEEXT) nuttx.hex
151+
$(ECHO_END)
150152
endif
151153
ifeq ($(CONFIG_RAW_BINARY),y)
152-
$(Q) echo "CP: nuttx.bin"
154+
$(ECHO_BEGIN)"CP: nuttx.bin "
153155
$(Q) $(OBJCOPY) $(OBJCOPYARGS) -O binary nuttx$(EXEEXT) nuttx.bin
156+
$(ECHO_END)
154157
endif
155158
$(call POSTBUILD, $(APPDIR))
156159

boot/mcuboot/Makefile

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
include $(APPDIR)/Make.defs
2222

2323
MCUBOOT_VERSION := $(patsubst "%",%,$(CONFIG_MCUBOOT_VERSION))
24+
MCUBOOT_URL_BASE = https://github.com/mcu-tools/mcuboot/archive
2425
MCUBOOT_TARBALL = $(MCUBOOT_VERSION).tar.gz
2526
MCUBOOT_UNPACK = mcuboot
2627
MCUBOOT_SRCDIR = $(MCUBOOT_UNPACK)$(DELIM)boot$(DELIM)bootutil$(DELIM)src
@@ -77,14 +78,14 @@ CXXFLAGS += ${INCDIR_PREFIX}mcuboot/ext/tinycrypt/lib/include
7778
endif
7879

7980
$(MCUBOOT_TARBALL):
80-
$(Q) echo "Downloading MCUboot-$(MCUBOOT_VERSION)"
81-
$(Q) curl -O -L https://github.com/mcu-tools/mcuboot/archive/$(MCUBOOT_TARBALL)
81+
$(call DOWNLOAD,$(MCUBOOT_URL_BASE),$(MCUBOOT_TARBALL),MCUBoot-)
8282

8383
$(MCUBOOT_UNPACK): $(MCUBOOT_TARBALL)
84-
$(Q) echo "Unpacking: $(MCUBOOT_TARBALL) -> $(MCUBOOT_UNPACK)"
84+
$(ECHO_BEGIN)"Unpacking: $(MCUBOOT_TARBALL) -> $(MCUBOOT_UNPACK) "
8585
$(Q) tar zxf $(MCUBOOT_TARBALL)
8686
$(Q) mv mcuboot-$(MCUBOOT_VERSION) $(MCUBOOT_UNPACK)
8787
$(Q) touch $(MCUBOOT_UNPACK)
88+
$(ECHO_END)
8889

8990
# Download and unpack tarball if no git repo found
9091
ifeq ($(wildcard $(MCUBOOT_UNPACK)/.git),)

canutils/lely-canopen/Makefile

+6-5
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,16 @@ endif
170170
# Download and unpack tarball if no git repo found
171171
ifeq ($(wildcard $(LELYCANOPEN_SRCNAME)/.git),)
172172
$(LELYCANOPEN_TARBALL):
173-
@echo "Downloading: $(LELYCANOPEN_TARBALL)"
174-
$(Q) curl -L -O $(CONFIG_CANUTILS_LELYCANOPEN_URL)/$(LELYCANOPEN_TARBALL)
173+
$(call DOWNLOAD,$(CONFIG_CANUTILS_LELYCANOPEN_URL),$(LELYCANOPEN_TARBALL))
175174

176175
$(LELYCANOPEN_SRCNAME): $(LELYCANOPEN_TARBALL)
177-
@echo "Unpacking: $(LELYCANOPEN_TARBALL) -> $(LELYCANOPEN_UNPACKNAME)"
176+
$(ECHO_BEGIN)"Unpacking: $(LELYCANOPEN_TARBALL) -> $(LELYCANOPEN_UNPACKNAME) "
178177
$(Q) $(UNPACK) $(LELYCANOPEN_TARBALL)
179178
$(Q) mv $(LELYCANOPEN_UNPACKNAME) $(LELYCANOPEN_SRCNAME)
180-
$(Q) cat 0001-NuttX-port.patch | patch -s -N -d $(LELYCANOPEN_SRCNAME) -p1
181-
$(Q) echo "Patching $(LELYCANOPEN_SRCNAME)"
179+
$(ECHO_END)
180+
$(ECHO_BEGIN)"Patching $(LELYCANOPEN_SRCNAME) "
181+
$(Q) patch -s -N -d $(LELYCANOPEN_SRCNAME) -p1 < 0001-NuttX-port.patch
182+
$(ECHO_END)
182183
endif
183184

184185
context:: $(LELYCANOPEN_SRCNAME)

crypto/libtomcrypt/Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -464,17 +464,18 @@ endif
464464
endif
465465

466466
$(LIBTOMCRYPT_ZIP):
467-
@echo "Downloading: $(LIBTOMCRYPT_ZIP)"
468-
$(Q) curl -O -L $(CONFIG_LIBTOMCRYPT_URL)/$(LIBTOMCRYPT_ZIP)
467+
$(call DOWNLOAD,$(CONFIG_LIBTOMCRYPT_URL),$(LIBTOMCRYPT_ZIP))
469468

470469
$(LIBTOMCRYPT_UNPACKNAME): $(LIBTOMCRYPT_ZIP)
471-
@echo "Unpacking: $(LIBTOMCRYPT_ZIP) -> $(LIBTOMCRYPT_UNPACKNAME)"
470+
$(ECHO_BEGIN)"Unpacking: $(LIBTOMCRYPT_ZIP) -> $(LIBTOMCRYPT_UNPACKNAME) "
472471
$(Q) $(UNPACK) $(LIBTOMCRYPT_ZIP)
473472
$(Q) mv libtomcrypt-$(LIBTOMCRYPT_VERSION) $(LIBTOMCRYPT_UNPACKNAME)
474-
$(Q) echo "Patching $(LIBTOMCRYPT_UNPACKNAME)"
473+
$(ECHO_END)
474+
$(ECHO_BEGIN)"Patching $(LIBTOMCRYPT_UNPACKNAME) "
475475
$(Q) patch -p0 < digit-bit.patch # Update deprecated macro from ltm
476476
$(Q) patch -p0 < ltcrypt-flush.patch # Missing stdout flush in demo app
477477
$(Q) touch $(LIBTOMCRYPT_UNPACKNAME)
478+
$(ECHO_END)
478479

479480
# Download and unpack tarball if no git repo found
480481
ifeq ($(wildcard $(LIBTOMCRYPT_UNPACKNAME)/.git),)

graphics/lvgl/Makefile

+2-5
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,14 @@ LVGL_TARBALL = v$(LVGL_VERSION).zip
9595

9696
LVGL_UNPACKNAME = lvgl
9797
UNPACK ?= unzip -o $(if $(V),,-q)
98-
CURL ?= curl -L -O $(if $(V),,-Ss)
9998

10099
LVGL_UNPACKDIR = $(WD)/$(LVGL_UNPACKNAME)
101100

102101
$(LVGL_TARBALL):
103-
$(ECHO_BEGIN)"Downloading: $(LVGL_TARBALL)"
104-
$(Q) $(CURL) $(CONFIG_GRAPH_LVGL_URL)/$(LVGL_TARBALL)
105-
$(ECHO_END)
102+
$(call DOWNLOAD,$(CONFIG_GRAPH_LVGL_URL),$(LVGL_TARBALL))
106103

107104
$(LVGL_UNPACKNAME): $(LVGL_TARBALL)
108-
$(ECHO_BEGIN)"Unpacking: $(LVGL_TARBALL) -> $(LVGL_UNPACKNAME)"
105+
$(ECHO_BEGIN)"Unpacking: $(LVGL_TARBALL) -> $(LVGL_UNPACKNAME) "
109106
$(Q) $(UNPACK) $(LVGL_TARBALL)
110107
$(Q) mv lvgl-$(LVGL_VERSION) $(LVGL_UNPACKNAME)
111108
$(Q) touch $(LVGL_UNPACKNAME)

industry/scpi/Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ SCPI_VERSION = 2.2
2424
SCPI_UNPACK = scpi-parser
2525
SCPI_TARBALL = v$(SCPI_VERSION).tar.gz
2626
SCPI_URL_BASE = https://github.com/j123b567/scpi-parser/archive/refs/tags
27-
SCPI_URL = $(SCPI_URL_BASE)/$(SCPI_TARBALL)
2827

2928
CSRCS += error.c fifo.c ieee488.c
3029
CSRCS += minimal.c parser.c units.c utils.c
@@ -51,11 +50,11 @@ VPATH += $(SCPI_UNPACK)/examples/common
5150
endif # CONFIG_SCPI_PARSER_DEMO
5251

5352
$(SCPI_TARBALL):
54-
$(Q) echo "Downloading $(SCPI_TARBALL)"
55-
$(Q) curl -O -L $(SCPI_URL)
56-
$(Q) echo "Unpacking $(SCPI_TARBALL) to $(SCPI_UNPACK)"
53+
$(call DOWNLOAD,$(SCPI_URL_BASE),$(SCPI_TARBALL),SCPI-)
54+
$(ECHO_BEGIN)"Unpacking $(SCPI_TARBALL) to $(SCPI_UNPACK) "
5755
$(Q) tar xzvf $(SCPI_TARBALL)
5856
$(Q) mv scpi-parser-$(SCPI_VERSION) $(SCPI_UNPACK)
57+
$(ECHO_END)
5958

6059
# Download and unpack tarball if no git repo found
6160
ifeq ($(wildcard $(SCPI_UNPACK)/.git),)

interpreters/duktape/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ DUKTAPE_VERSION = 2.5.0
2424
DUKTAPE_UNPACK = duktape
2525
DUKTAPE_TARBALL = duktape-$(DUKTAPE_VERSION).tar.xz
2626
DUKTAPE_URL_BASE = https://github.com/svaarala/duktape/releases/download/
27-
DUKTAPE_URL = $(DUKTAPE_URL_BASE)v$(DUKTAPE_VERSION)/$(DUKTAPE_TARBALL)
2827

2928
CSRCS = duktape.c
3029
CSRCS += duk_console.c
@@ -49,15 +48,16 @@ CFLAGS += -DDUK_CMDLINE_CONSOLE_SUPPORT
4948
CFLAGS += -DDUK_CMDLINE_PRINTALERT_SUPPORT
5049

5150
$(DUKTAPE_TARBALL):
52-
$(Q) echo "Downloading $(DUKTAPE_TARBALL)"
53-
$(Q) curl -O -L $(DUKTAPE_URL)
51+
$(call DOWNLOAD,$(DUKTAPE_URL_BASE),$(DUKTAPE_TARBALL))
5452

5553
$(DUKTAPE_UNPACK): $(DUKTAPE_TARBALL)
56-
$(Q) echo "Unpacking $(DUKTAPE_TARBALL) to $(DUKTAPE_UNPACK)"
54+
$(ECHO_BEGIN)"Unpacking $(DUKTAPE_TARBALL) to $(DUKTAPE_UNPACK) "
5755
$(Q) tar xfJ $(DUKTAPE_TARBALL)
5856
$(Q) mv duktape-$(DUKTAPE_VERSION) $(DUKTAPE_UNPACK)
59-
$(Q) echo "Patching $(DUKTAPE_UNPACK)"
57+
$(ECHO_END)
58+
$(ECHO_BEGIN)"Patching $(DUKTAPE_UNPACK) "
6059
$(Q) patch -p0 < duk_cmdline.patch
60+
$(ECHO_END)
6161

6262
$(DUKTAPE_UNPACK)/.patch: $(DUKTAPE_UNPACK)
6363
$(Q) touch $(DUKTAPE_UNPACK)/.patch

interpreters/lua/Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ LUA_VERSION = $(patsubst "%",%,$(strip $(CONFIG_INTERPRETER_LUA_VERSION)))
3333
LUA_TARBALL = lua-$(LUA_VERSION).tar.gz
3434
LUA_UNPACK = lua-$(LUA_VERSION)
3535
LUA_URL_BASE = http://www.lua.org/ftp
36-
LUA_URL = $(LUA_URL_BASE)/$(LUA_TARBALL)
3736
LUA_SRC = $(LUA_UNPACK)$(DELIM)src
3837

3938
MAINSRC = $(LUA_SRC)$(DELIM)lua.c
@@ -68,10 +67,10 @@ endif
6867
# Lua download and unpack
6968

7069
$(LUA_TARBALL):
71-
$(Q) echo "Downloading $(LUA_TARBALL)"
72-
$(Q) curl -O -L $(LUA_URL)
73-
$(Q) echo "Unpacking $(LUA_TARBALL) to $(LUA_UNPACK)"
70+
$(call DOWNLOAD,$(LUA_URL_BASE),$(LUA_TARBALL))
71+
$(ECHO_BEGIN)"Unpacking $(LUA_TARBALL) to $(LUA_UNPACK) "
7472
$(Q) tar -xvzf $(LUA_TARBALL)
73+
$(ECHO_END)
7574

7675
# Download and unpack tarball if no git repo found
7776
ifeq ($(wildcard $(LUA_UNPACK)/.git),)

interpreters/lua/Module.mk

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
LUAMOD_REGISTRY = $(APPDIR)$(DELIM)interpreters$(DELIM)lua$(DELIM)registry
2222

2323
define LUAMOD_REGISTER
24-
$(Q) echo Register Lua Module: $1
24+
$(ECHO_BEGIN)"Register Lua Module: $1 "
2525
$(Q) echo { \"$1\", $2 }, > "$(LUAMOD_REGISTRY)$(DELIM)$1.bdat"
26-
$(Q) echo "int $2(lua_State *L);" > "$(LUAMOD_REGISTRY)$(DELIM)$1.pdat"
26+
$(ECHO_END)
27+
$(ECHO_BEGIN)"int $2(lua_State *L);" > "$(LUAMOD_REGISTRY)$(DELIM)$1.pdat "
2728
$(Q) touch "$(LUAMOD_REGISTRY)$(DELIM).updated"
29+
$(ECHO_END)
2830
endef
2931

3032
ifneq ($(LUAMODNAME),)

interpreters/luamodules/cjson/Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,20 @@ LUACJSON_VERSION = $(patsubst "%",%,$(strip $(CONFIG_LUA_CJSON_VERSION)))
2424
LUACJSON_TARBALL = $(LUACJSON_VERSION).tar.gz
2525
LUACJSON_UNPACK = lua-cjson
2626
LUACJSON_URL_BASE = https://github.com/openresty/lua-cjson/archive/refs/tags
27-
LUACJSON_URL = $(LUACJSON_URL_BASE)/$(LUACJSON_TARBALL)
2827
LUACJSON_SRC = $(LUACJSON_UNPACK)
2928

3029
VPATH += lua-cjson
3130
CSRCS = lua_cjson.c strbuf.c fpconv.c
3231

3332
$(LUACJSON_TARBALL):
34-
$(Q) echo "Downloading $(LUACJSON_TARBALL) from $(LUACJSON_URL)"
35-
$(Q) curl -O -L $(LUACJSON_URL)
33+
$(call DOWNLOAD,$(LUACJSON_URL_BASE),$(LUACJSON_TARBALL),lua-cjson-)
3634

3735
$(LUACJSON_UNPACK): $(LUACJSON_TARBALL)
38-
$(Q) echo "Unpacking $(LUACJSON_TARBALL) to $(LUACJSON_UNPACK)"
36+
$(ECHO_BEGIN)"Unpacking $(LUACJSON_TARBALL) to $(LUACJSON_UNPACK) "
3937
$(Q) tar -xvzf $(LUACJSON_TARBALL)
4038
$(Q) mv lua-cjson-$(LUACJSON_VERSION) $(LUACJSON_UNPACK)
4139
$(Q) patch -d $(LUACJSON_UNPACK) -p1 < 0001-fix-compile-warnings.patch
40+
$(ECHO_END)
4241

4342
$(LUACJSON_UNPACK)/.patch: $(LUACJSON_UNPACK)
4443
touch $(LUACJSON_UNPACK)/.patch

interpreters/luamodules/lfs/Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,20 @@ LFS_VERSION = $(patsubst "%",%,$(strip $(CONFIG_LUA_LFS_VERSION)))
2424
LFS_TARBALL = v$(LFS_VERSION).tar.gz
2525
LFS_UNPACK = lfs
2626
LFS_URL_BASE = https://github.com/lunarmodules/luafilesystem/archive/refs/tags
27-
LFS_URL = $(LFS_URL_BASE)/$(LFS_TARBALL)
2827
LFS_SRC = $(LFS_UNPACK)$(DELIM)src
2928

3029
VPATH += $(LFS_SRC)
3130
CSRCS = lfs.c
3231

3332
$(LFS_TARBALL):
34-
$(Q) echo "Downloading $(LFS_TARBALL) from $(LFS_URL)"
35-
$(Q) curl -O -L $(LFS_URL)
33+
$(call DOWNLOAD,$(LFS_URL_BASE),$(LFS_TARBALL),lsf-)
3634

3735
$(LFS_UNPACK): $(LFS_TARBALL)
38-
$(Q) echo "Unpacking $(LFS_TARBALL) to $(LFS_UNPACK)"
36+
$(ECHO_BEGIN)"Unpacking $(LFS_TARBALL) to $(LFS_UNPACK) "
3937
$(Q) tar -xvzf $(LFS_TARBALL)
4038
$(Q) mv luafilesystem-$(LFS_VERSION) $(LFS_UNPACK)
4139
$(Q) patch -d $(LFS_UNPACK) -p1 < 0001-call-symlink-or-link-directly.patch
40+
$(ECHO_END)
4241

4342
$(LFS_UNPACK)/.patch: $(LFS_UNPACK)
4443
touch $(LFS_UNPACK)/.patch

interpreters/luamodules/luasyslog/Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ LSYSLOG_VERSION = $(patsubst "%",%,$(strip $(CONFIG_LUA_LSYSLOG_VERSION)))
2424
LSYSLOG_TARBALL = $(LSYSLOG_VERSION).tar.gz
2525
LSYSLOG_UNPACK = lsyslog
2626
LSYSLOG_URL_BASE = https://github.com/lunarmodules/luasyslog/archive/refs/tags
27-
LSYSLOG_URL = $(LSYSLOG_URL_BASE)/$(LSYSLOG_TARBALL)
2827
LSYSLOG_SRC = $(LSYSLOG_UNPACK)
2928

3029
VPATH += $(LSYSLOG_SRC)
@@ -34,13 +33,13 @@ CFLAGS += -D'openlog(a,b,c)={(void)a; (void)c;}'
3433
CFLAGS += -D'closelog()={}'
3534

3635
$(LSYSLOG_TARBALL):
37-
$(Q) echo "Downloading $(LSYSLOG_TARBALL) from $(LSYSLOG_URL)"
38-
$(Q) curl -O -L $(LSYSLOG_URL)
36+
$(call DOWNLOAD,$(LSYSLOG_URL_BASE),$(LSYSLOG_TARBALL),lsyslog-)
3937

4038
$(LSYSLOG_UNPACK): $(LSYSLOG_TARBALL)
41-
$(Q) echo "Unpacking $(LSYSLOG_TARBALL) to $(LSYSLOG_UNPACK)"
39+
$(ECHO_BEGIN)"Unpacking $(LSYSLOG_TARBALL) to $(LSYSLOG_UNPACK) "
4240
$(Q) tar -xvzf $(LSYSLOG_TARBALL)
4341
$(Q) mv luasyslog-$(LSYSLOG_VERSION) $(LSYSLOG_UNPACK)
42+
$(ECHO_END)
4443

4544
$(LSYSLOG_UNPACK)/.patch: $(LSYSLOG_UNPACK)
4645
touch $(LSYSLOG_UNPACK)/.patch

interpreters/luamodules/luv/Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ LUV_VERSION = $(patsubst "%",%,$(strip $(CONFIG_LUA_LUV_VERSION)))
2626
LUV_TARBALL = luv-$(LUV_VERSION).tar.gz
2727
LUV_UNPACK = luv
2828
LUV_URL_BASE = https://github.com/luvit/luv/releases/download/
29-
LUV_URL = $(LUV_URL_BASE)/$(LUV_VERSION)/$(LUV_TARBALL)
3029
LUV_SRC = $(LUV_UNPACK)$(DELIM)src
3130

3231
VPATH += $(LUV_SRC)
@@ -35,14 +34,14 @@ CSRCS = luv.c
3534
# Luv download and unpack
3635

3736
$(LUV_TARBALL):
38-
$(Q) echo "Downloading $(LUV_TARBALL)"
39-
$(Q) curl -O -L $(LUV_URL)
37+
$(call DOWNLOAD,$(LUV_URL_BASE),$(LUV_TARBALL))
4038

4139
$(LUV_UNPACK): $(LUV_TARBALL)
42-
$(Q) echo "Unpacking $(LUV_TARBALL) to $(LUV_UNPACK)"
40+
$(ECHO_BEGIN)"Unpacking $(LUV_TARBALL) to $(LUV_UNPACK) "
4341
$(Q) tar -xvzf $(LUV_TARBALL)
4442
$(Q) mv luv-$(LUV_VERSION) $(LUV_UNPACK)
4543
$(Q) patch -d $(LUV_UNPACK) -p1 < 0001-fix-compile-warnings.patch
44+
$(ECHO_END)
4645

4746
$(LUV_UNPACK)/.patch: $(LUV_UNPACK)
4847
touch $(LUV_UNPACK)/.patch

interpreters/quickjs/Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ QUICKJS_VERSION = 2020-11-08
2424
QUICKJS_UNPACK = quickjs
2525
QUICKJS_TARBALL = quickjs-$(QUICKJS_VERSION).tar.xz
2626
QUICKJS_URL_BASE = https://bellard.org/quickjs/
27-
QUICKJS_URL = $(QUICKJS_URL_BASE)/$(QUICKJS_TARBALL)
2827

2928
CSRCS = quickjs.c libregexp.c libbf.c libunicode.c cutils.c
3029

@@ -60,14 +59,14 @@ MODULE = $(CONFIG_INTERPRETERS_QUICKJS)
6059
endif
6160

6261
$(QUICKJS_TARBALL):
63-
$(Q) echo "Downloading $(QUICKJS_TARBALL)"
64-
$(Q) curl -O -L $(QUICKJS_URL)
62+
$(call DOWNLOAD,$(QUICKJS_URL_BASE),$(QUICKJS_TARBALL))
6563

6664
$(QUICKJS_UNPACK): $(QUICKJS_TARBALL)
67-
$(Q) echo "Unpacking $(QUICKJS_TARBALL) to $(QUICKJS_UNPACK)"
65+
$(ECHO_BEGIN)"Unpacking $(QUICKJS_TARBALL) to $(QUICKJS_UNPACK) "
6866
$(Q) tar -Jxf $(QUICKJS_TARBALL)
6967
$(Q) mv quickjs-$(QUICKJS_VERSION) $(QUICKJS_UNPACK)
7068
$(Q) patch -d $(QUICKJS_UNPACK) -p1 < 0001-Disabled-unsupported-feature-on-NuttX.patch
69+
$(ECHO_END)
7170

7271
$(QUICKJS_UNPACK)/.patch: $(QUICKJS_UNPACK)
7372
$(Q) touch $(QUICKJS_UNPACK)/.patch

interpreters/toywasm/Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,20 @@ TOYWASM_VERSION = 5a1d6bf349571e0b63a9d02d73e01b8e212fb8c0
7373
TOYWASM_UNPACK = toywasm
7474
TOYWASM_TARBALL = $(TOYWASM_VERSION).zip
7575
TOYWASM_URL_BASE = https://github.com/yamt/toywasm/archive/
76-
TOYWASM_URL = $(TOYWASM_URL_BASE)/$(TOYWASM_TARBALL)
7776

7877
VPATH += $(TOYWASM_UNPACK)/cli
7978
VPATH += $(TOYWASM_UNPACK)/lib
8079
VPATH += src
8180

8281
$(TOYWASM_TARBALL):
83-
$(Q) echo "Downloading $(TOYWASM_TARBALL)"
84-
$(Q) curl -O -L $(TOYWASM_URL)
82+
$(call DOWNLOAD,$(TOYWASM_URL_BASE),$(TOYWASM_TARBALL),toywasm-)
8583

8684
$(TOYWASM_UNPACK): $(TOYWASM_TARBALL)
87-
$(Q) echo "Unpacking $(TOYWASM_TARBALL) to $(TOYWASM_UNPACK)"
85+
$(ECHO_BEGIN)"Unpacking $(TOYWASM_TARBALL) to $(TOYWASM_UNPACK) "
8886
$(Q) unzip $(TOYWASM_TARBALL)
8987
$(Q) mv toywasm-$(TOYWASM_VERSION) $(TOYWASM_UNPACK)
9088
$(Q) touch $(TOYWASM_UNPACK)
89+
$(ECHO_END)
9190

9291
# Download and unpack tarball if no git repo found
9392
ifeq ($(wildcard $(TOYWASM_UNPACK)/.git),)

interpreters/wamr/Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ WAMR_UNPACK = wamr
2525

2626
WAMR_TARBALL = $(WAMR_VERSION).zip
2727
WAMR_URL_BASE = https://github.com/bytecodealliance/wasm-micro-runtime/archive/
28-
WAMR_URL = $(WAMR_URL_BASE)/$(WAMR_TARBALL)
2928

3029
-include $(WAMR_UNPACK)/product-mini/platforms/nuttx/wamr.mk
3130

@@ -41,14 +40,14 @@ MODULE = $(CONFIG_INTERPRETERS_WAMR)
4140
endif
4241

4342
$(WAMR_TARBALL):
44-
$(Q) echo "Downloading $(WAMR_TARBALL)"
45-
$(Q) curl -O -L $(WAMR_URL)
43+
$(call DOWNLOAD,$(WAMR_URL_BASE),$(WAMR_TARBALL),wamr-)
4644

4745
$(WAMR_UNPACK): $(WAMR_TARBALL)
48-
$(Q) echo "Unpacking $(WAMR_TARBALL) to $(WAMR_UNPACK)"
46+
$(ECHO_BEGIN)"Unpacking $(WAMR_TARBALL) to $(WAMR_UNPACK) "
4947
$(Q) unzip $(WAMR_TARBALL)
5048
$(Q) mv wasm-micro-runtime-$(WAMR_VERSION) $(WAMR_UNPACK)
5149
$(Q) touch $(WAMR_UNPACK)
50+
$(ECHO_END)
5251

5352
# Download and unpack tarball if no git repo found
5453
ifeq ($(wildcard $(WAMR_UNPACK)/.git),)

0 commit comments

Comments
 (0)