aboutsummaryrefslogtreecommitdiffstats
path: root/make/build.xml
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-12-30 23:59:08 +0100
committerSven Gothel <[email protected]>2012-12-30 23:59:08 +0100
commitac16df0bab94fab313030ead42644844d1690a82 (patch)
treee972680bbc741c520c1e8ef02191dfd0f12850a5 /make/build.xml
parent0104f0ff35304b0aa416c2caa7b53aadf592f36a (diff)
Add com.jogamp.common.util.PrimitiveStack (FloatStack and IntegerStack), a simple primitive stack implementation.
Currently only FILO put/get operations are implemented using either primitive arrays as I/O itself or <Type>Buffer. Unit tests are included.. Note: Only FloatStack is implemented in a manual, where others (IntegerStack) is derived (generated) from it. Same goes w/ unit tests.
Diffstat (limited to 'make/build.xml')
-rw-r--r--make/build.xml57
1 files changed, 53 insertions, 4 deletions
diff --git a/make/build.xml b/make/build.xml
index d4ec1b7..76187a1 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -602,14 +602,62 @@
</copy>
</target>
+ <target name="generate-primitive-stacks">
+
+ <!-- IntegerStack -->
+ <antcall target="create-pstack" inheritrefs="true">
+ <param name="pstack.name" value="IntegerStack"/>
+ <param name="pstack.testname" value="TestIntegerStack01"/>
+ <param name="pstack.value" value="int"/>
+ <param name="pstack.value2" value="IntBuffer"/>
+ </antcall>
+
+ </target>
+
+ <target name="create-pstack">
+ <copy file="${src.java}/com/jogamp/common/util/FloatStack.java"
+ tofile="${src.generated.java}/com/jogamp/common/util/${pstack.name}.java" overwrite="true">
+ <filterchain>
+ <replaceregex pattern="FloatStack" replace="${pstack.name}"/>
+ <replaceregex pattern="@see ${pstack.name}" replace="@see FloatStack"/>
+ <replaceregex pattern="/\*value\*/float/\*value\*/" replace="${pstack.value}"/>
+ <replaceregex pattern="/\*value2\*/FloatBuffer/\*value2\*/" replace="${pstack.value2}"/>
+ </filterchain>
+ </copy>
+ <mkdir dir="${gluegen.root}/${rootrel.build}/test/build/gensrc/classes"/>
+ <copy file="${gluegen.root}/src/junit/com/jogamp/common/util/TestFloatStack01.java"
+ tofile="${gluegen.root}/${rootrel.build}/test/build/gensrc/classes/com/jogamp/common/util/${pstack.testname}.java" overwrite="true">
+ <filterchain>
+ <replaceregex pattern="FloatStack" replace="${pstack.name}"/>
+ <replaceregex pattern="TestFloatStack01" replace="${pstack.testname}"/>
+ <replaceregex pattern="@see ${pstack.name}" replace="@see FloatStack"/>
+ <replaceregex pattern="/\*value\*/float/\*value\*/" replace="${pstack.value}"/>
+ <replaceregex pattern="/\*value2\*/FloatBuffer/\*value2\*/" replace="${pstack.value2}"/>
+ </filterchain>
+ </copy>
+ </target>
+
<target name="gluegen.build.check.java" depends="init">
- <uptodate property="gluegen.build.skip.java">
+ <uptodate property="gluegen.build.skip.java1">
<srcfiles dir= "." includes="*.xml"/>
<srcfiles dir= "${src.java}" includes="**"/>
<srcfiles dir= "${c.grammar}" includes="**/*.g"/>
<srcfiles dir= "${j.grammar}" includes="**/*.g"/>
<mapper type="merge" to="${build}/gluegen.jar"/>
</uptodate>
+ <uptodate property="gluegen.build.skip.java2">
+ <srcfiles dir= "." includes="*.xml"/>
+ <srcfiles dir= "${src.java}" includes="**"/>
+ <srcfiles dir= "${c.grammar}" includes="**/*.g"/>
+ <srcfiles dir= "${j.grammar}" includes="**/*.g"/>
+ <mapper type="merge" to="${build}/gluegen-rt.jar"/>
+ </uptodate>
+ <condition property="gluegen.build.skip.java" value="true">
+ <or>
+ <isset property="gluegen.build.skip.java1"/>
+ <isset property="gluegen.build.skip.java2"/>
+ </or>
+ </condition>
</target>
<target name="gluegen.build.javase">
@@ -803,9 +851,10 @@
</target>
<target name="gluegen.build.java" depends="gluegen.cpptasks.detect.os,gluegen.build.check.java" unless="gluegen.build.skip.java">
- <antcall target="generate-hash-maps" inheritRefs="true"/>
- <antcall target="gluegen.build.javase" inheritRefs="true"/>
- <antcall target="gluegen.build.android" inheritRefs="true"/>
+ <antcall target="generate-hash-maps" inheritRefs="true"/>
+ <antcall target="generate-primitive-stacks" inheritRefs="true"/>
+ <antcall target="gluegen.build.javase" inheritRefs="true"/>
+ <antcall target="gluegen.build.android" inheritRefs="true"/>
</target>
<target name="gluegen.build.check.android-launcher" depends="init">