Skip to content

Commit

Permalink
interpreters/quickjs/Makefile: fix the build with Make
Browse files Browse the repository at this point in the history
QUICKJS_URL_BASE in Cmakefile and Makefile was not the same.
Updated the correct url in Makefile.

fix apache/nuttx#15712
  • Loading branch information
simbit18 committed Feb 13, 2025
1 parent fb0c1e1 commit 226286c
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions interpreters/quickjs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@

include $(APPDIR)/Make.defs

QUICKJS_VERSION = 2020-11-08
QUICKJS_VERSION = master
QUICKJS_UNPACK = quickjs
QUICKJS_TARBALL = quickjs-$(QUICKJS_VERSION).tar.xz
QUICKJS_URL_BASE = https://bellard.org/quickjs/
QUICKJS_URL = $(QUICKJS_URL_BASE)/$(QUICKJS_TARBALL)
QUICKJS_ZIP = quickjs-$(QUICKJS_VERSION).zip
QUICKJS_URL_BASE = https://github.com/bellard/quickjs/archive/refs/heads
QUICKJS_URL = $(QUICKJS_URL_BASE)/$(QUICKJS_VERSION).zip
UNPACK ?= unzip -q -o

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

VERSION=\"$(QUICKJS_VERSION)\"
VERSION=\"2020-11-08\"

CFLAGS += -Dmp_add=qjs_mp_add -Dmp_sub=qjs_mp_sub -Dmp_mul=qjs_mp_mul
CFLAGS += -DCONFIG_VERSION=$(VERSION) -Wno-shadow
Expand Down Expand Up @@ -63,13 +64,13 @@ STACKSIZE = $(CONFIG_INTERPRETERS_QUICKJS_STACKSIZE)
MODULE = $(CONFIG_INTERPRETERS_QUICKJS)
endif

$(QUICKJS_TARBALL):
$(Q) echo "Downloading $(QUICKJS_TARBALL)"
$(Q) curl -O -L $(QUICKJS_URL)
$(QUICKJS_ZIP):
$(Q) echo "Downloading $(QUICKJS_ZIP)"
$(Q) curl -L $(QUICKJS_URL) -o $(QUICKJS_ZIP)

$(QUICKJS_UNPACK): $(QUICKJS_TARBALL)
$(Q) echo "Unpacking $(QUICKJS_TARBALL) to $(QUICKJS_UNPACK)"
$(Q) tar -Jxf $(QUICKJS_TARBALL)
$(QUICKJS_UNPACK): $(QUICKJS_ZIP)
$(Q) echo "Unpacking $(QUICKJS_ZIP) to $(QUICKJS_UNPACK)"
$(Q) $(UNPACK) $(QUICKJS_ZIP)
$(Q) mv quickjs-$(QUICKJS_VERSION) $(QUICKJS_UNPACK)
$(Q) patch -d $(QUICKJS_UNPACK) -p1 < 0001-Disabled-unsupported-feature-on-NuttX.patch

Expand All @@ -81,7 +82,7 @@ ifeq ($(wildcard $(QUICKJS_UNPACK)/.git),)
QUICKJS_DOWNLOAD=$(QUICKJS_UNPACK)/.patch
distclean::
$(call DELDIR, $(QUICKJS_UNPACK))
$(call DELFILE, $(QUICKJS_TARBALL))
$(call DELFILE, $(QUICKJS_ZIP))
endif

ifeq ($(CONFIG_INTERPRETERS_QUICKJS_MINI),y)
Expand Down

0 comments on commit 226286c

Please sign in to comment.