2015-10-12 19:40:35 +03:00
|
|
|
#
|
|
|
|
# NetSurf javascript source file inclusion
|
|
|
|
#
|
|
|
|
# Included by javascript/Makefile
|
|
|
|
#
|
|
|
|
|
2019-05-05 01:06:14 +03:00
|
|
|
content/handlers/javascript/duktape/dukky.c: $(OBJROOT)/duktape/binding.h $(OBJROOT)/duktape/generics.js.inc
|
2015-10-12 19:40:35 +03:00
|
|
|
|
2016-06-07 18:01:04 +03:00
|
|
|
BINDINGS := $(wildcard content/handlers/javascript/duktape/*.bnd)
|
2015-10-12 19:40:35 +03:00
|
|
|
|
2019-05-05 01:06:14 +03:00
|
|
|
# Generator for the C include representing the generics.js
|
|
|
|
$(OBJROOT)/duktape/generics.js.inc: content/handlers/javascript/duktape/generics.js
|
|
|
|
$(Q)$(MKDIR) -p $(OBJROOT)/duktape
|
|
|
|
$(VQ)echo " XXD: $<"
|
2019-05-05 18:07:01 +03:00
|
|
|
$(Q)xxd -i $< $@.tmp
|
|
|
|
$(Q)sed -e 's/content_handlers_javascript_duktape_generics_js/generics_js/' $@.tmp > $@
|
2019-05-05 01:06:14 +03:00
|
|
|
|
2015-10-12 22:33:11 +03:00
|
|
|
# ensure genbind generates debugging files
|
|
|
|
GBFLAGS+=-D
|
2015-10-12 22:25:15 +03:00
|
|
|
|
2016-06-07 18:01:04 +03:00
|
|
|
$(OBJROOT)/duktape/binding.h $(OBJROOT)/duktape/Makefile: content/handlers/javascript/duktape/netsurf.bnd $(BINDINGS)
|
2017-01-07 16:21:25 +03:00
|
|
|
$(Q)$(MKDIR) -p $(OBJROOT)/duktape
|
2015-10-12 19:40:35 +03:00
|
|
|
$(VQ)echo " GENBIND: $<"
|
2016-06-07 18:01:04 +03:00
|
|
|
$(Q)nsgenbind $(GBFLAGS) -I content/handlers/javascript/WebIDL $< $(OBJROOT)/duktape
|
2015-10-12 19:40:35 +03:00
|
|
|
|
|
|
|
# create unimplemented report for doxygen
|
2019-05-31 21:40:10 +03:00
|
|
|
docs/UnimplementedJavascript.md: content/handlers/javascript/duktape/netsurf.bnd $(BINDINGS)
|
2017-01-07 16:21:25 +03:00
|
|
|
$(Q)$(MKDIR) -p $(OBJROOT)/duktape
|
2019-05-31 21:40:10 +03:00
|
|
|
$(VQ)echo "Unimplemented javascript bindings {#unimplemented}" > $@
|
|
|
|
$(VQ)echo "=================================" >> $@
|
|
|
|
$(VQ)echo "" >> $@
|
2015-10-12 19:40:35 +03:00
|
|
|
$(VQ)echo "This is a list of all the binding methods, getters and setters without an implementation in a binding." >> $@
|
|
|
|
$(VQ)echo "" >> $@
|
2019-05-31 21:40:10 +03:00
|
|
|
$(VQ)echo "Type | Unimplemented binding" >> $@
|
|
|
|
$(VQ)echo "---- | ---------------------" >> $@
|
2015-10-12 19:40:35 +03:00
|
|
|
$(VQ)echo " GENBIND: $<"
|
2019-05-31 21:40:10 +03:00
|
|
|
$(Q)nsgenbind $(GBFLAGS) -Wunimplemented -I content/handlers/javascript/WebIDL $< $(OBJROOT)/duktape 2>&1 >/dev/null | awk 'BEGIN{count=0} /.*Unimplemented.*/{count++; out=$$4" |"; for(i=5;i<=NF;i++){out=out" "$$i}; print out} END{print "\n",count,"unimplemented bindings"}' >> $@
|
|
|
|
$(VQ)echo "" >> $@
|
2015-10-12 19:40:35 +03:00
|
|
|
|
|
|
|
ifeq ($(filter $(MAKECMDGOALS),clean test coverage),)
|
|
|
|
-include $(OBJROOT)/duktape/Makefile
|
|
|
|
endif
|
|
|
|
|
|
|
|
S_JAVASCRIPT_BINDING:=$(addprefix $(OBJROOT)/duktape/,$(NSGENBIND_SOURCES))
|
|
|
|
|
|
|
|
$(S_JAVASCRIPT_BINDING): $(BINDINGS)
|
|
|
|
|
|
|
|
S_JAVASCRIPT += content.c duktape/dukky.c duktape/duktape.c
|
|
|
|
|
|
|
|
CFLAGS += -DDUK_OPT_HAVE_CUSTOM_H
|