From 64fcfff9e264a9be0f757314587042d428dd794f Mon Sep 17 00:00:00 2001 From: Juan Carrano <j.carrano@fu-berlin.de> Date: Thu, 22 Nov 2018 16:30:29 +0100 Subject: [PATCH] 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.) --- examples/javascript/Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/javascript/Makefile b/examples/javascript/Makefile index da8971c909..144850489f 100644 --- a/examples/javascript/Makefile +++ b/examples/javascript/Makefile @@ -35,21 +35,21 @@ endif # Add the package for 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 CFLAGS += -I$(JS_PATH) # generate .js.h header files of .js files JS = $(wildcard *.js) -JS_H := $(JS:%.js=$(JS_PATH)/%.js.h) +JS_H = $(JS:%.js=$(JS_PATH)/%.js.h) -$(JS_PATH)/: - @mkdir -p $@ +BUILDDEPS += $(JS_H) $(JS_PATH)/ -$(JS_H): | $(JS_PATH)/ -$(JS_H): $(JS_PATH)/%.js.h: %.js - xxd -i $< | sed 's/^unsigned/const unsigned/g' > $@ +include $(RIOTBASE)/Makefile.include + +$(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' > $@ -- GitLab