From 154a6b69870f215ae05f98daa4e2713aac706d36 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 3 Jun 2020 23:32:54 +0100 Subject: implement a minimal xxd for builds to remove external dependancy --- content/handlers/javascript/duktape/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'content/handlers/javascript/duktape/Makefile') diff --git a/content/handlers/javascript/duktape/Makefile b/content/handlers/javascript/duktape/Makefile index d15b71291..096bd2c3e 100644 --- a/content/handlers/javascript/duktape/Makefile +++ b/content/handlers/javascript/duktape/Makefile @@ -11,18 +11,24 @@ content/handlers/javascript/duktape/dukky.c: \ BINDINGS := $(wildcard content/handlers/javascript/duktape/*.bnd) +# Host tool to convert file to comiled data +# +$(TOOLROOT)/xxd: utils/xxd.c $(TOOLROOT)/created + $(VQ)echo "BUILD CC: $@" + $(Q)$(BUILD_CC) $(BUILD_CFLAGS) -o $@ $< $(BUILD_LDFLAGS) + # Generator for the C include representing the generics.js -$(OBJROOT)/duktape/generics.js.inc: content/handlers/javascript/duktape/generics.js +$(OBJROOT)/duktape/generics.js.inc: content/handlers/javascript/duktape/generics.js $(TOOLROOT)/xxd $(Q)$(MKDIR) -p $(OBJROOT)/duktape $(VQ)echo " XXD: $<" - $(Q)xxd -i $< $@.tmp + $(Q)$(TOOLROOT)/xxd -i $< $@.tmp $(Q)sed -e 's/content_handlers_javascript_duktape_generics_js/generics_js/' $@.tmp > $@ # Generator for the C include representing the polyfill.js -$(OBJROOT)/duktape/polyfill.js.inc: content/handlers/javascript/duktape/polyfill.js +$(OBJROOT)/duktape/polyfill.js.inc: content/handlers/javascript/duktape/polyfill.js $(TOOLROOT)/xxd $(Q)$(MKDIR) -p $(OBJROOT)/duktape $(VQ)echo " XXD: $<" - $(Q)xxd -i $< $@.tmp + $(Q)$(TOOLROOT)/xxd -i $< $@.tmp $(Q)sed -e 's/content_handlers_javascript_duktape_polyfill_js/polyfill_js/' $@.tmp > $@ # ensure genbind generates debugging files -- cgit v1.2.3