summaryrefslogtreecommitdiffstats
path: root/doc/manual
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual')
-rw-r--r--doc/manual/example1/function.cfg3
-rw-r--r--doc/manual/example1/gen.sh7
-rw-r--r--doc/manual/example2/function.cfg3
-rw-r--r--doc/manual/example2/gen.sh6
-rw-r--r--doc/manual/example3/gen.sh6
-rw-r--r--doc/manual/example4/function.cfg3
-rw-r--r--doc/manual/example4/gen.sh6
-rw-r--r--doc/manual/example5/function.cfg3
-rw-r--r--doc/manual/example5/gen.sh6
-rw-r--r--doc/manual/example6/gen.sh6
-rw-r--r--doc/manual/example7/gen.sh6
11 files changed, 34 insertions, 21 deletions
diff --git a/doc/manual/example1/function.cfg b/doc/manual/example1/function.cfg
index c604a40..c251261 100644
--- a/doc/manual/example1/function.cfg
+++ b/doc/manual/example1/function.cfg
@@ -3,3 +3,6 @@ Style AllStatic
JavaClass TestFunction
JavaOutputDir gensrc/java
NativeOutputDir gensrc/native
+
+# Include the function.h header in the generated glue code
+CustomCCode #include "function.h"
diff --git a/doc/manual/example1/gen.sh b/doc/manual/example1/gen.sh
index 6fb971e..047b448 100644
--- a/doc/manual/example1/gen.sh
+++ b/doc/manual/example1/gen.sh
@@ -2,16 +2,17 @@
JAVA=java
GLUEGEN_JAR=../../../build/gluegen.jar
-ANTLR_JAR=../../../../../ANTLR/antlr-2.7.4/antlr.jar
+ANTLR_JAR=../../../../../ANTLR/antlr-2.7.5.jar
NAME=`uname`
-if [ $NAME="Windows*" ] ; then
+if [[ $NAME == "Windows*" ]] ; then
SEP=\;
-elif [ $NAME="CYGWIN*" ] ; then
+elif [[ $NAME == "CYGWIN*" ]] ; then
SEP=\;
else
SEP=:
fi
+echo java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h
java -cp $GLUEGEN_JAR$SEP$ANTLR_JAR com.sun.gluegen.GlueGen -I. -Ecom.sun.gluegen.JavaEmitter -Cfunction.cfg function.h
diff --git a/doc/manual/example2/function.cfg b/doc/manual/example2/function.cfg
index 91d379b..d0777a0 100644
--- a/doc/manual/example2/function.cfg
+++ b/doc/manual/example2/function.cfg
@@ -7,3 +7,6 @@ NativeOutputDir gensrc/native
# The semantics of set_global_data imply that
# only direct Buffers are legal
NioDirectOnly set_global_data
+
+# Include the function.h header in the generated glue code
+CustomCCode #include "function.h"
diff --git a/doc/manual/example2/gen.sh b/doc/manual/example2/gen.sh
index 3310b06..99adddd 100644
--- a/doc/manual/example2/gen.sh
+++ b/doc/manual/example2/gen.sh
@@ -2,13 +2,13 @@
JAVA=java
GLUEGEN_JAR=../../../build/gluegen.jar
-ANTLR_JAR=../../../../../ANTLR/antlr-2.7.4/antlr.jar
+ANTLR_JAR=../../../../../ANTLR/antlr-2.7.5.jar
NAME=`uname`
-if [ $NAME="Windows*" ] ; then
+if [[ $NAME == "Windows*" ]] ; then
SEP=\;
-elif [ $NAME="CYGWIN*" ] ; then
+elif [[ $NAME == "CYGWIN*" ]] ; then
SEP=\;
else
SEP=:
diff --git a/doc/manual/example3/gen.sh b/doc/manual/example3/gen.sh
index 6fb971e..c44676f 100644
--- a/doc/manual/example3/gen.sh
+++ b/doc/manual/example3/gen.sh
@@ -2,13 +2,13 @@
JAVA=java
GLUEGEN_JAR=../../../build/gluegen.jar
-ANTLR_JAR=../../../../../ANTLR/antlr-2.7.4/antlr.jar
+ANTLR_JAR=../../../../../ANTLR/antlr-2.7.5.jar
NAME=`uname`
-if [ $NAME="Windows*" ] ; then
+if [[ $NAME == "Windows*" ]] ; then
SEP=\;
-elif [ $NAME="CYGWIN*" ] ; then
+elif [[ $NAME == "CYGWIN*" ]] ; then
SEP=\;
else
SEP=:
diff --git a/doc/manual/example4/function.cfg b/doc/manual/example4/function.cfg
index feee635..26eb3f5 100644
--- a/doc/manual/example4/function.cfg
+++ b/doc/manual/example4/function.cfg
@@ -10,3 +10,6 @@ ReturnValueCapacity custom_allocate {0}
# custom_free will only ever receive a direct Buffer
NioDirectOnly custom_free
+
+# Include the function.h header in the generated glue code
+CustomCCode #include "function.h"
diff --git a/doc/manual/example4/gen.sh b/doc/manual/example4/gen.sh
index 6fb971e..c44676f 100644
--- a/doc/manual/example4/gen.sh
+++ b/doc/manual/example4/gen.sh
@@ -2,13 +2,13 @@
JAVA=java
GLUEGEN_JAR=../../../build/gluegen.jar
-ANTLR_JAR=../../../../../ANTLR/antlr-2.7.4/antlr.jar
+ANTLR_JAR=../../../../../ANTLR/antlr-2.7.5.jar
NAME=`uname`
-if [ $NAME="Windows*" ] ; then
+if [[ $NAME == "Windows*" ]] ; then
SEP=\;
-elif [ $NAME="CYGWIN*" ] ; then
+elif [[ $NAME == "CYGWIN*" ]] ; then
SEP=\;
else
SEP=:
diff --git a/doc/manual/example5/function.cfg b/doc/manual/example5/function.cfg
index cb158ca..35af56f 100644
--- a/doc/manual/example5/function.cfg
+++ b/doc/manual/example5/function.cfg
@@ -7,3 +7,6 @@ NativeOutputDir gensrc/native
# Tell GlueGen that default_screen_depth() returns a pointer to a
# single ScreenInfo
ReturnValueCapacity default_screen_depth sizeof(ScreenInfo)
+
+# Include the function.h header in the generated glue code
+CustomCCode #include "function.h"
diff --git a/doc/manual/example5/gen.sh b/doc/manual/example5/gen.sh
index 6fb971e..c44676f 100644
--- a/doc/manual/example5/gen.sh
+++ b/doc/manual/example5/gen.sh
@@ -2,13 +2,13 @@
JAVA=java
GLUEGEN_JAR=../../../build/gluegen.jar
-ANTLR_JAR=../../../../../ANTLR/antlr-2.7.4/antlr.jar
+ANTLR_JAR=../../../../../ANTLR/antlr-2.7.5.jar
NAME=`uname`
-if [ $NAME="Windows*" ] ; then
+if [[ $NAME == "Windows*" ]] ; then
SEP=\;
-elif [ $NAME="CYGWIN*" ] ; then
+elif [[ $NAME == "CYGWIN*" ]] ; then
SEP=\;
else
SEP=:
diff --git a/doc/manual/example6/gen.sh b/doc/manual/example6/gen.sh
index 6fb971e..c44676f 100644
--- a/doc/manual/example6/gen.sh
+++ b/doc/manual/example6/gen.sh
@@ -2,13 +2,13 @@
JAVA=java
GLUEGEN_JAR=../../../build/gluegen.jar
-ANTLR_JAR=../../../../../ANTLR/antlr-2.7.4/antlr.jar
+ANTLR_JAR=../../../../../ANTLR/antlr-2.7.5.jar
NAME=`uname`
-if [ $NAME="Windows*" ] ; then
+if [[ $NAME == "Windows*" ]] ; then
SEP=\;
-elif [ $NAME="CYGWIN*" ] ; then
+elif [[ $NAME == "CYGWIN*" ]] ; then
SEP=\;
else
SEP=:
diff --git a/doc/manual/example7/gen.sh b/doc/manual/example7/gen.sh
index 6fb971e..c44676f 100644
--- a/doc/manual/example7/gen.sh
+++ b/doc/manual/example7/gen.sh
@@ -2,13 +2,13 @@
JAVA=java
GLUEGEN_JAR=../../../build/gluegen.jar
-ANTLR_JAR=../../../../../ANTLR/antlr-2.7.4/antlr.jar
+ANTLR_JAR=../../../../../ANTLR/antlr-2.7.5.jar
NAME=`uname`
-if [ $NAME="Windows*" ] ; then
+if [[ $NAME == "Windows*" ]] ; then
SEP=\;
-elif [ $NAME="CYGWIN*" ] ; then
+elif [[ $NAME == "CYGWIN*" ]] ; then
SEP=\;
else
SEP=: