You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/08/14 15:02:33 UTC

[incubator-nuttx-apps] 01/03: interpreters/duktape: Add console/print/alart support

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 7099bc4b02f4e9c598a9266d2c4fb78a64c4b658
Author: Huang Qi <hu...@xiaomi.com>
AuthorDate: Fri Aug 14 13:51:32 2020 +0800

    interpreters/duktape: Add console/print/alart support
    
    Signed-off-by: Huang Qi <hu...@xiaomi.com>
---
 interpreters/duktape/Makefile | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/interpreters/duktape/Makefile b/interpreters/duktape/Makefile
index 1ed39c1..84f1000 100644
--- a/interpreters/duktape/Makefile
+++ b/interpreters/duktape/Makefile
@@ -27,6 +27,8 @@ DUKTAPE_URL_BASE = https://github.com/svaarala/duktape/releases/download/
 DUKTAPE_URL      = $(DUKTAPE_URL_BASE)v$(DUKTAPE_VERSION)/$(DUKTAPE_TARBALL)
 
 CSRCS = $(DUKTAPE_UNPACK)/src-noline/duktape.c
+CSRCS += $(DUKTAPE_UNPACK)/extras/console/duk_console.c
+CSRCS += $(DUKTAPE_UNPACK)/extras/print-alert/duk_print_alert.c
 
 MAINSRC = $(DUKTAPE_UNPACK)/examples/cmdline/duk_cmdline.c
 
@@ -36,6 +38,10 @@ STACKSIZE = $(CONFIG_INTERPRETERS_DUKTAPE_STACKSIZE)
 MODULE    = $(CONFIG_INTERPRETERS_DUKTAPE)
 
 CFLAGS += -I$(DUKTAPE_UNPACK)/src-noline
+CFLAGS += -I$(DUKTAPE_UNPACK)/extras/console
+CFLAGS += -I$(DUKTAPE_UNPACK)/extras/print-alert
+CFLAGS += -DDUK_CMDLINE_CONSOLE_SUPPORT
+CFLAGS += -DDUK_CMDLINE_PRINTALERT_SUPPORT
 
 $(DUKTAPE_TARBALL):
 	@echo "Downloading $(DUKTAPE_TARBALL)"
@@ -46,8 +52,11 @@ $(DUKTAPE_UNPACK): $(DUKTAPE_TARBALL)
 	@tar xvfJ $(DUKTAPE_TARBALL)
 	@echo "Patching $(DUKTAPE_UNPACK)"
 	@patch -p0 < duk_cmdline.patch
+	@touch $(DUKTAPE_UNPACK)/.patch
 
-context:: $(DUKTAPE_UNPACK)
+$(DUKTAPE_UNPACK)/.patch: $(DUKTAPE_UNPACK)
+
+context:: $(DUKTAPE_UNPACK)/.patch
 
 distclean::
 	$(call DELDIR, $(DUKTAPE_UNPACK))