From 52a1b51d7281640ed525d07fe22d14de54b398d0 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Sat, 25 Jan 2014 16:21:15 +0100
Subject: Add '-b${joal.build.number}' to joal.version / archive.name ; Produce
 jar and apk files in ${build}/jar (as it was before new build system)

---
 make/build-test.xml | 18 ++++++++++--------
 make/build.xml      | 19 +++++++++----------
 2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/make/build-test.xml b/make/build-test.xml
index ae3c93b5..3725de1d 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -57,6 +57,8 @@
         <property name="project.root"         value=".." />
         <property name="build"                value="${project.root}/${rootrel.build}" />
 
+        <property name="gluegen-rt-android.jar" value="${gluegen.build}/gluegen-rt-android.jar" />
+
         <property name="rootrel.src.test"     value="test" />
         <property name="src.test"             value="${project.root}/${rootrel.src.test}" />
 
@@ -73,11 +75,11 @@
         <property name="java.dir.junit"       value="${java.dir.test}"/>
         <property name="java.dir.manual"      value="${java.dir.test}/manual"/>
 
-        <property name="gluegen-rt-android.jar" value="${gluegen.build}/gluegen-rt-android.jar" />
+        <property name="jocl-test.jar"        value="${build}/jar/jocl-test.jar" />
 
         <property name="obj.all.paths"        value="${gluegen.build}/obj${path.separator}${jogl.build}/lib${path.separator}${obj}${path.separator}lib/${os.and.arch}"/>
-        <property name="classpath.test"       value="${junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl-all.jar}${path.separator}${build}/jocl.jar${path.separator}${build}/jocl-test.jar"/>
-        <property name="classpath.test.remote" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${gluegen-rt.jar}${path.separator}${build}/jocl.jar${path.separator}${build}/jocl-test.jar"/>
+        <property name="classpath.test"       value="${junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl-all.jar}${path.separator}${jocl.jar}${path.separator}${jocl-test.jar}"/>
+        <property name="classpath.test.remote" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${gluegen-rt.jar}${path.separator}${jocl.jar}${path.separator}${jocl-test.jar}"/>
 
         <property name="test.archive.name"    value="${archive.name}-test-results-${build.node.name}"/>
 
@@ -92,7 +94,7 @@
                fork="yes"
                includeantruntime="false"
                srcdir="${src.test}" 
-               classpath="${gluegen-rt.jar};${build}/jocl.jar;${junit.jar};${jogl-all.jar}"
+               classpath="${gluegen-rt.jar};${jocl.jar};${junit.jar};${jogl-all.jar}"
                memoryMaximumSize="${javac.memorymax}"
                encoding="UTF-8"
                source="${target.sourcelevel}" 
@@ -110,7 +112,7 @@
                 <filter token="BASEVERSION" value="${jogamp.version.base}"/>
             </filterset>
         </copy>
-        <jar manifest="${build.test}/manifest-test.mf" destfile="${build}/jocl-test.jar">
+        <jar manifest="${build.test}/manifest-test.mf" destfile="${jocl-test.jar}">
             <!-- get all class files, but skip any resource files that external tools
                  might have copied into the class directory (otherwise, it's possible
                  to get the same resource file twice in the jar) -->
@@ -125,7 +127,7 @@
         <javac destdir="${classes.test}" 
                fork="yes"
                includeAntRuntime="false"
-               classpath="${android.jar};${gluegen-rt-android.jar};${build}/jocl.jar;${junit.jar}"
+               classpath="${android.jar};${gluegen-rt-android.jar};${jocl.jar};${junit.jar}"
                memoryMaximumSize="${javac.memorymax}"
                encoding="UTF-8"
                source="${target.sourcelevel}" 
@@ -145,7 +147,7 @@
                 <filter token="BASEVERSION" value="${jogamp.version.base}"/>
             </filterset>
         </copy>
-        <jar manifest="${build.test}/manifest-test-android.mf" destfile="${build}/jocl-test-android.jar" filesonly="true">
+        <jar manifest="${build.test}/manifest-test-android.mf" destfile="${build}/jar/jocl-test-android.jar" filesonly="true">
             <!-- get all class files, but skip any resource files that external tools
                  might have copied into the class directory (otherwise, it's possible
                  to get the same resource file twice in the jar) -->
@@ -158,7 +160,7 @@
         <aapt.signed 
             assetsdir="resources/assets-test"
             jarsrcdir="${src.test}"
-            jarbuilddir="${build}"
+            jarbuilddir="${build}/jar"
             jarbasename="jocl-test-android"
             nativebuilddir="../${rootrel.build}/obj"
             nativebasename="non-existing"
diff --git a/make/build.xml b/make/build.xml
index 2e5126de..8a5f6596 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -44,7 +44,6 @@
     <property name="gluegen.build" value="${gluegen.root}/${rootrel.build}" />
 
     <!-- This is the version of JOCL you are building -->
-    <property name="jocl.build.number" value="manual-build"/>
     <mkdir dir="${build}" />
     <exec dir="." executable="git" logError="true" failonerror="false" failifexecutionfails="false"
               output="${build}/localbranch.raw">
@@ -86,8 +85,9 @@
       -->
     <target name="init" depends="jogamp.env.init, gluegen.cpptasks.detect.os">
 
+        <property name="jocl.build.number" value="manual"/>
         <property name="jocl.build.id"     value="${version.timestamp}"/>
-        <property name="jocl.version"      value="${jogamp.version.base}-${version.timestamp}" />
+        <property name="jocl.version"      value="${jogamp.version.base}-b${jocl.build.number}-${version.timestamp}" />
 
         <!-- The location and name of the configuration ANT file that will
            - validate to ensure that all user-define variables are set. -->
@@ -180,9 +180,9 @@
         <property name="stub.includes.gluegen.cc"  value="${gluegen.root}/make/stub_includes/platform" />
 
         <!-- The resulting jocl.jar. -->
-        <property name="jocl.jar" value="${build}/jocl.jar" />
-        <property name="jocl-android.jar" value="${build}/jocl-android.jar" />
-        <property name="jocl-android.apk" value="${build}/jocl-android-${android.abi}.apk" />
+        <property name="jocl.jar" value="${build}/jar/jocl.jar" />
+        <property name="jocl-android.jar" value="${build}/jar/jocl-android.jar" />
+        <property name="jocl-android.apk" value="${build}/jar/jocl-android-${android.abi}.apk" />
 
         <path id="jocl_all.classpath">
             <pathelement location="${gluegen-rt.jar}" />
@@ -624,7 +624,7 @@
         </antcall>
 
         <!-- Create Java Web Start jar file from built file -->
-        <jar destfile="${build}/jocl-natives-${os.and.arch}.jar">
+        <jar destfile="${build}/jar/jocl-natives-${os.and.arch}.jar">
             <fileset dir="../${rootrel.build}/obj">
                 <include name="*jocl.${native.library.suffix}" />
                 <include name="*soft_oal.${native.library.suffix}" />
@@ -656,7 +656,6 @@
         <!-- Build the jar excluding any build specific classes. -->
         <jar manifest="tempversion" destfile="${jocl.jar}">
             <fileset dir="${classes}">
-                <include name="com/jogamp/common/**" />
                 <include name="com/jogamp/opencl/**" />
             </fileset>
         </jar>
@@ -670,7 +669,7 @@
     <target name="android.package" depends="init" if="isAndroid">
         <aapt.signed 
             jarsrcdir="${src.java}"
-            jarbuilddir="${build}"
+            jarbuilddir="${build}/jar"
             jarbasename="jocl-android"
             nativebuilddir="../${rootrel.build}/obj"
             nativebasename=""
@@ -807,8 +806,8 @@
         <copy file="${build}/artifact.properties" todir="${archive}"/>
         <mkdir dir="${archive}/jar" />
         <copy todir="${archive}/jar">
-            <fileset dir="${build}" includes="jocl*.jar"/>
-            <fileset dir="${build}" includes="jocl*.apk"/>
+            <fileset dir="${build}/jar" includes="jocl*.jar"/>
+            <fileset dir="${build}/jar" includes="jocl*.apk"/>
         </copy>
         <mkdir dir="${archive}/lib" />
         <copy todir="${archive}/lib">
-- 
cgit v1.2.3