swig/Examples/test-suite/javascript/Makefile.in
Karl Wette 7cd9063b52 Remove execute permissions from various non-executable files
- source files and Makefiles need never be executable
- scripts are run directly by their interpreters in the
  test suites, so also do not need to be executable
2014-05-02 20:06:11 +02:00

114 lines
2.7 KiB
Makefile

#######################################################################
# Makefile for javascript test-suite
#######################################################################
LANGUAGE = javascript
NODEGYP = @NODEGYP@
SCRIPTSUFFIX = _runme.js
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
SWIG = $(top_builddir)/preinst_swig
ifneq (, $(ENGINE))
JSENGINE=$(ENGINE)
else
JSENGINE=node
endif
include $(srcdir)/../common.mk
_setup = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
echo "$(ACTION)ing $(LANGUAGE) ($(JSENGINE)) testcase $* (with run test)" ; \
else \
echo "$(ACTION)ing $(LANGUAGE) ($(JSENGINE)) testcase $*" ; \
fi;
ifneq (jsc,$(ENGINE))
# This test can not be run with v8 as it uses v8 API incompatible output typemaps
typemap_variables.cpptest:
echo "skipping $(LANGUAGE) ($(JSENGINE)) testcase typemap_variables" ;
endif
ifeq (node,$(JSENGINE))
SWIGOPT += -v8 -DBUILDING_NODE_EXTENSION=1
# shut up some warnings
# contract macro has an empty 'else' at the end...
aggregate.cpptest: GYP_CFLAGS = \"-Wno-empty-body\"
contract.cpptest: GYP_CFLAGS = \"-Wno-empty-body\"
# dunno... ignoring generously
apply_signed_char.cpptest: GYP_CFLAGS = \"-Wno-ignored-qualifiers\"
constant_pointers.cpptest: GYP_CFLAGS = \"-Wno-ignored-qualifiers\"
enum_thorough.cpptest: GYP_CFLAGS = \"-Wno-ignored-qualifiers\"
# Note: we need to use swig in C parse mode, but make node-gyp believe it is c++ (via file extension)
swig_and_compile_c = \
sh ./setup_test.sh $* $(GYP_CFLAGS); \
$(SWIG) -javascript $(SWIGOPT) -o $*_wrap.cxx ../$*.i; \
$(NODEGYP) --loglevel=silent --directory $* configure build 1>>/dev/null
swig_and_compile_cpp = \
sh ./setup_test.sh $* $(GYP_CFLAGS); \
$(SWIG) -c++ -javascript $(SWIGOPT) ../$*.i; \
$(NODEGYP) --loglevel=silent --directory $* configure build 1>>/dev/null
run_testcase = \
if [ -f $(srcdir)/$*$(SCRIPTSUFFIX) ]; then \
node $(srcdir)/$*$(SCRIPTSUFFIX); \
fi
%.ctest:
$(_setup)
$(swig_and_compile_c)
$(run_testcase)
%.cpptest:
$(_setup)
$(swig_and_compile_cpp)
$(run_testcase)
%.multicpptest:
$(_setup)
else
SWIGOPT += -$(JSENGINE)
run_testcase = \
if [ -f $(srcdir)/$*$(SCRIPTSUFFIX) ]; then \
$(top_srcdir)/Tools/javascript/javascript -$(JSENGINE) $(srcdir)/$*$(SCRIPTSUFFIX); \
fi
%.ctest:
$(_setup)
+$(swig_and_compile_c)
$(run_testcase)
%.cpptest:
$(_setup)
+$(swig_and_compile_cpp)
$(run_testcase)
%.multicpptest:
$(_setup)
+$(swig_and_compile_multi_cpp)
$(run_testcase)
endif
%.clean:
rm -rf $*
clean:
rm -f *_wrap.cxx
rm -f *_wrap.c
rm -f *.so
rm -f *.o