mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-17 18:43:50 +01:00
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.)
This commit is contained in:
parent
b9fa2b5bf6
commit
64fcfff9e2
@ -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)
|
||||||
|
|
||||||
|
BUILDDEPS += $(JS_H) $(JS_PATH)/
|
||||||
|
|
||||||
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
|
||||||
$(JS_PATH)/:
|
$(JS_PATH)/:
|
||||||
@mkdir -p $@
|
$(Q)mkdir -p $@
|
||||||
|
|
||||||
$(JS_H): | $(JS_PATH)/
|
$(JS_H): $(JS_PATH)/%.js.h: %.js | $(JS_PATH)/
|
||||||
$(JS_H): $(JS_PATH)/%.js.h: %.js
|
$(Q)xxd -i $< | sed 's/^unsigned/const unsigned/g' > $@
|
||||||
xxd -i $< | sed 's/^unsigned/const unsigned/g' > $@
|
|
||||||
|
|
||||||
$(RIOTBUILD_CONFIG_HEADER_C): $(JS_H)
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user