Skip to content
Snippets Groups Projects
Commit 64fcfff9 authored by Juan Carrano's avatar Juan Carrano
Browse files

examples/javascript: Correctly declare dependency on script files.

Custom targets should be added to BUILDDEPS. Without this patch
`make -j clean all" fails because of weird race condition (trying
to clean while building is kind of contradictory anyways.)
parent b9fa2b5b
No related branches found
No related tags found
No related merge requests found
...@@ -35,21 +35,21 @@ endif ...@@ -35,21 +35,21 @@ endif
# Add the package for Jerryscript # Add the package for Jerryscript
USEPKG += jerryscript USEPKG += jerryscript
include $(RIOTBASE)/Makefile.include JS_PATH = $(BINDIR)/js/$(MODULE)
JS_PATH := $(BINDIR)/js/$(MODULE)
# add directory of generated *.js.h files to include path # add directory of generated *.js.h files to include path
CFLAGS += -I$(JS_PATH) CFLAGS += -I$(JS_PATH)
# generate .js.h header files of .js files # generate .js.h header files of .js files
JS = $(wildcard *.js) JS = $(wildcard *.js)
JS_H := $(JS:%.js=$(JS_PATH)/%.js.h) JS_H = $(JS:%.js=$(JS_PATH)/%.js.h)
$(JS_PATH)/: BUILDDEPS += $(JS_H) $(JS_PATH)/
@mkdir -p $@
$(JS_H): | $(JS_PATH)/ include $(RIOTBASE)/Makefile.include
$(JS_H): $(JS_PATH)/%.js.h: %.js
xxd -i $< | sed 's/^unsigned/const unsigned/g' > $@ $(JS_PATH)/:
$(Q)mkdir -p $@
$(RIOTBUILD_CONFIG_HEADER_C): $(JS_H) $(JS_H): $(JS_PATH)/%.js.h: %.js | $(JS_PATH)/
$(Q)xxd -i $< | sed 's/^unsigned/const unsigned/g' > $@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment