Skip to content

Commit

Permalink
Problem: lacking stub for jni binding
Browse files Browse the repository at this point in the history
Fixes #224
  • Loading branch information
awynne committed Sep 9, 2015
1 parent 33bf770 commit 681244f
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
10 changes: 7 additions & 3 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@

# Script to generate all required files from fresh git checkout.

command -v libtool >/dev/null 2>&1
# Debian and Ubuntu do not shipt libtool anymore, but OSX does not ship libtoolize.
command -v libtoolize >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2
exit 1
command -v libtool >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2
exit 1
fi
fi

command -v autoreconf >/dev/null 2>&1
Expand Down
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ case "${host_os}" in
# Define on Linux to enable all library features
CPPFLAGS="-D_GNU_SOURCE -DLINUX $CPPFLAGS"
AC_DEFINE(MYPROJECT_HAVE_LINUX, 1, [Have Linux OS])

case "${host_os}" in
*android*)
AC_DEFINE(MYPROJECT_HAVE_ANDROID, 1, [Have Android OS])
Expand Down Expand Up @@ -216,6 +216,7 @@ AM_CONDITIONAL(BUILD_DOC, test "x$myproject_build_doc" = "xyes")
# Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(perror gettimeofday memset getifaddrs)
AC_CHECK_LIB([uuid], [uuid_generate])

# Set pkgconfigdir
AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
Expand Down
1 change: 1 addition & 0 deletions project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
<bin name = "zproject_bindings_python.gsl" />
<bin name = "zproject_bindings_qml.gsl" />
<bin name = "zproject_bindings_ruby.gsl" />
<bin name = "zproject_bindings_jni.gsl" />
<bin name = "zproject_ci.gsl" />
<bin name = "zproject_class.gsl" />
<bin name = "zproject_cmake.gsl" />
Expand Down
7 changes: 7 additions & 0 deletions src/Makemodule.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ myproject_SCRIPTS = \
zproject_android.gsl \
zproject_autoconf.gsl \
zproject_automake.gsl \
zproject_bench.gsl \
zproject_bindings_python.gsl \
zproject_bindings_qml.gsl \
zproject_bindings_ruby.gsl \
zproject_bindings_jni.gsl \
zproject_ci.gsl \
zproject_class.gsl \
zproject_cmake.gsl \
Expand Down Expand Up @@ -47,6 +49,11 @@ memcheck: src/myproject_selftest
--suppressions=$(srcdir)/src/.valgrind.supp \
$(srcdir)/src/myproject_selftest

# Run the selftest binary under valgrind to check for performance leaks
callcheck: src/myproject_selftest
$(LIBTOOL) --mode=execute valgrind --tool=callgrind \
$(srcdir)/src/myproject_selftest

# Run the selftest binary under gdb for debugging
debug: src/myproject_selftest
$(LIBTOOL) --mode=execute gdb -q \
Expand Down
1 change: 1 addition & 0 deletions zproject.gsl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ project.generated_warning_header ?= "\
.gsl from "zproject_bindings_python.gsl"
.gsl from "zproject_bindings_qml.gsl"
.gsl from "zproject_bindings_ruby.gsl"
.gsl from "zproject_bindings_jni.gsl"
.gsl from "zproject_ci.gsl"
.gsl from "zproject_class.gsl"
.gsl from "zproject_cmake.gsl"
Expand Down
10 changes: 10 additions & 0 deletions zproject_bindings_jni.gsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.# Only build bindings if there is at least one API model
.if count (class, defined (class.api))
.template 0
# Generate minimal JNI language bindings.
if !file.exists ("bindings/jni")
directory.create("bindings/jni")
endif

.endtemplate
.endif

0 comments on commit 681244f

Please sign in to comment.