summaryrefslogtreecommitdiff
path: root/content/handlers/javascript/duktape/Makefile
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2020-06-03 23:32:54 +0100
committerVincent Sanders <vince@kyllikki.org>2020-06-03 23:34:57 +0100
commit154a6b69870f215ae05f98daa4e2713aac706d36 (patch)
tree77184db9e85fa4a4ae75102064cbdf6f6e4fc3fb /content/handlers/javascript/duktape/Makefile
parented84f7a0188d8c983db4a186b1240d955ee08705 (diff)
downloadnetsurf-154a6b69870f215ae05f98daa4e2713aac706d36.tar.gz
netsurf-154a6b69870f215ae05f98daa4e2713aac706d36.tar.bz2
implement a minimal xxd for builds to remove external dependancy
Diffstat (limited to 'content/handlers/javascript/duktape/Makefile')
-rw-r--r--content/handlers/javascript/duktape/Makefile14
1 files changed, 10 insertions, 4 deletions
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