Fix configuration for nodejs based tests.
- use $(SWIGOPT) - less verbose
This commit is contained in:
parent
dd84e6f9e0
commit
c53e3e4dab
2 changed files with 11 additions and 14 deletions
|
|
@ -10,9 +10,9 @@ top_builddir = @top_builddir@
|
||||||
SWIG = $(top_builddir)/preinst_swig
|
SWIG = $(top_builddir)/preinst_swig
|
||||||
|
|
||||||
ifneq (, $(ENGINE))
|
ifneq (, $(ENGINE))
|
||||||
JSENGINE = $(ENGINE)
|
JSENGINE=$(ENGINE)
|
||||||
else
|
else
|
||||||
JSENGINE = "node"
|
JSENGINE=node
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Note: the javascript generator is not ready yet for the real game.
|
# Note: the javascript generator is not ready yet for the real game.
|
||||||
|
|
@ -74,8 +74,6 @@ endif
|
||||||
|
|
||||||
include $(srcdir)/../common.mk
|
include $(srcdir)/../common.mk
|
||||||
|
|
||||||
SWIGOPT += -$(JSENGINE)
|
|
||||||
|
|
||||||
_setup = \
|
_setup = \
|
||||||
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
|
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
|
||||||
echo "$(ACTION)ing testcase $* (with run test) under javascript ($(JSENGINE))" ; \
|
echo "$(ACTION)ing testcase $* (with run test) under javascript ($(JSENGINE))" ; \
|
||||||
|
|
@ -83,19 +81,16 @@ _setup = \
|
||||||
echo "$(ACTION)ing testcase $* under javascript ($(JSENGINE))" ; \
|
echo "$(ACTION)ing testcase $* under javascript ($(JSENGINE))" ; \
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
ifeq ("node",$(JSENGINE))
|
ifeq (node,$(JSENGINE))
|
||||||
|
|
||||||
|
SWIGOPT += -v8 -DBUILDING_NODE_EXTENSION=1
|
||||||
|
|
||||||
__setup = \
|
__setup = \
|
||||||
if [ ! -f $(srcdir)/$*/binding.gyp ]; then \
|
sh ./setup_test.sh $*; \
|
||||||
sh ./setup_test.sh $*; \
|
$(SWIG) -c++ -javascript $(SWIGOPT) ../$*.i;
|
||||||
$(SWIG) -c++ -javascript -v8 -DBUILDING_NODE_EXTENSION=1 -I$(top_srcdir)/Examples/test-suite -includeall -o $*/$*_wrap.cxx ../$*.i; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
nodejs_swig_and_compile = \
|
nodejs_swig_and_compile = \
|
||||||
if [ ! -f $(srcdir)/$*/build/Makefile ]; then \
|
node-gyp --loglevel=silent --directory $* configure build 1>>/dev/null
|
||||||
node-gyp --loglevel=silent --directory $* configure; \
|
|
||||||
fi; \
|
|
||||||
node-gyp --loglevel=silent --directory $* build; \
|
|
||||||
|
|
||||||
run_testcase = \
|
run_testcase = \
|
||||||
if [ -f $(srcdir)/$*$(SCRIPTSUFFIX) ]; then \
|
if [ -f $(srcdir)/$*$(SCRIPTSUFFIX) ]; then \
|
||||||
|
|
@ -122,6 +117,8 @@ ifeq ("node",$(JSENGINE))
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
SWIGOPT += -$(JSENGINE)
|
||||||
|
|
||||||
run_testcase = \
|
run_testcase = \
|
||||||
if [ -f $(srcdir)/$*$(SCRIPTSUFFIX) ]; then \
|
if [ -f $(srcdir)/$*$(SCRIPTSUFFIX) ]; then \
|
||||||
$(top_srcdir)/Tools/javascript/javascript -$(JSENGINE) $(srcdir)/$*$(SCRIPTSUFFIX); \
|
$(top_srcdir)/Tools/javascript/javascript -$(JSENGINE) $(srcdir)/$*$(SCRIPTSUFFIX); \
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"target_name": "$testcase",
|
"target_name": "$testcase",
|
||||||
"sources":[ "$testcase_wrap.cxx" ],
|
"sources":[ "../$testcase_wrap.cxx" ],
|
||||||
"include_dirs": ["../.."],
|
"include_dirs": ["../.."],
|
||||||
'defines': [
|
'defines': [
|
||||||
'BUILDING_NODE_EXTENSION=1',
|
'BUILDING_NODE_EXTENSION=1',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue