summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build-tools/VersionInfo.java69
-rw-r--r--build.xml47
-rw-r--r--src/classes/build.xml8
3 files changed, 83 insertions, 41 deletions
diff --git a/build-tools/VersionInfo.java b/build-tools/VersionInfo.java
index 09c0159..976bbb0 100644
--- a/build-tools/VersionInfo.java
+++ b/build-tools/VersionInfo.java
@@ -78,6 +78,32 @@ class VersionInfo extends Object {
// TCK tests, who are releasing their own implementation of Java 3D
// are permitted to change these constants.
// -------------------------------------------------------------------
+
+ /**
+ * Constant that indicates whether or not this is
+ * a debug build.
+ */
+ static final boolean isDebug = @IS_DEBUG@;
+
+ /**
+ * This static final variable is used to turn on/off debugging,
+ * checking, and initializing codes that may be preferred in
+ * development phase but not necessarily required in the
+ * production release.
+ *
+ * Beside for debugging, use this variable to do initialization,
+ * checking objects existence, and other checks that may help in
+ * uncovering potential bugs during code development. This
+ * variable should be turned off during production release as it
+ * may cause performance hit.
+ */
+ static final boolean devPhase = @DEV_PHASE@;
+
+ /**
+ * This flag is set to true for daily builds and false for stable builds.
+ */
+ private static final boolean dailyBuild = @DAILY_BUILD@;
+
/**
* String identifying the particular build of Java 3D, for
* example, beta1, build47, rc1, etc. This string may only
@@ -87,8 +113,14 @@ class VersionInfo extends Object {
* This will typically by null for final, released builds, but
* should be non-null for all other builds.
*/
- private static final String VERSION_BUILD = "@VERSION_BUILD@";
+ private static final String VERSION_BUILD = devPhase ? "@VERSION_BUILD@" : null;
+ /**
+ * Date stamp
+ *
+ * This is only used for daily builds.
+ */
+ private static final String BUILDTIME = dailyBuild ? "@BUILDTIME@" : null;
/**
* Specification version (major and minor version only). This
@@ -139,34 +171,13 @@ class VersionInfo extends Object {
private static final String VENDOR;
/**
- * Constant that indicates whether or not this is
- * a debug build.
- */
- static final boolean isDebug = @IS_DEBUG@;
-
- /**
- * This static final variable is used to turn on/off debugging,
- * checking, and initializing codes that may be preferred in
- * development phase but not necessarily required in the
- * production release.
- *
- * Beside for debugging, use this variable to do initialization,
- * checking objects existence, and other checks that may help in
- * uncovering potential bugs during code development. This
- * variable should be turned off during production release as it
- * may cause performance hit.
- */
- static final boolean devPhase = @DEV_PHASE@;
-
- /**
- * Time and date stamp appended to the end of the version string.
+ * Verbose time and date stamp appended to the end of the version string.
* This is appended to the version string
* after the build identifier (and after the first space, which
* will automatically be added) and before the optional dev
- * string. This string should be null if no time stamp is desired
- * (it will be null for production builds).
+ * string. This string is only used for non-fcs (non-production) builds.
*/
- private static final String VERSION_TIME_STAMP = devPhase ? "@TIME_STAMP@" : null;
+ private static final String BUILDTIME_VERBOSE = devPhase ? "@BUILDTIME_VERBOSE@" : null;
// The static initializer composes the version and vendor strings
static {
@@ -182,12 +193,16 @@ class VersionInfo extends Object {
tmpVersion += "-" + VERSION_BUILD;
}
+ if (BUILDTIME != null) {
+ tmpVersion += "-" + BUILDTIME;
+ }
+
if (VERSION_SUFFIX != null) {
tmpVersion += "-" + VERSION_SUFFIX;
}
- if (VERSION_TIME_STAMP != null) {
- tmpVersion += " " + VERSION_TIME_STAMP;
+ if (BUILDTIME_VERBOSE != null) {
+ tmpVersion += " " + BUILDTIME_VERBOSE;
}
if (VERSION_DEV_STRING != null) {
diff --git a/build.xml b/build.xml
index b7b2194..a59621d 100644
--- a/build.xml
+++ b/build.xml
@@ -28,9 +28,6 @@
<!-- End of Build Specific properties -->
<!-- ******************************** -->
- <!-- True for all non FCS builds -->
- <property name="dev_phase" value="true"/>
-
<!-- Set global properties for this build -->
<property name="vecmath_home" location="../vecmath"/>
<property name="core_utils_home" location="../j3d-core-utils"/>
@@ -41,8 +38,6 @@
<property name="build-tools" location="build-tools"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
- <property name="version" value="${version_base}_${version_build}"/>
- <property name="docname" value="java3d-${version}-doc"/>
<property name="build.comp" value="gcc"/>
<property name="build.rend" value="ogl"/>
@@ -59,27 +54,56 @@
<echo message="core_utils_home = ${core_utils_home}"/>
<echo message="ostype = ${ostype}"/>
<echo message="platform = ${platform}"/>
+ <echo message="version = ${version}"/>
+ <echo message="daily_build = ${daily_build}"/>
+ <echo message="dev_phase = ${dev_phase}"/>
</target>
- <target name="setupSolaris" depends="init" if="isSolarisOnSparc">
+ <target name="setupSolaris" if="isSolarisOnSparc">
<property name="ostype" value="solaris"/>
<property name="platform" value="solaris-sparc-${build.comp}"/>
</target>
- <target name="setupLinux" depends="init" if="isLinuxOnX86">
+ <target name="setupLinux" if="isLinuxOnX86">
<property name="ostype" value="linux"/>
<property name="platform" value="linux-i586"/>
</target>
<!-- win32 should be rename as windows -->
- <target name="setupWindows" depends="init" if="isWindowsOnX86">
+ <target name="setupWindows" if="isWindowsOnX86">
<property name="ostype" value="win32"/>
<property name="platform" value="windows-i586-${build.comp}"/>
</target>
- <target name="setupPlatform" depends="setupSolaris, setupLinux, setupWindows">
+ <target name="setupDaily" unless="build.stable">
+ <echo message="setupDaily"/>
+ <property name="daily_build" value="true"/>
+ <property name="version" value="${version_base}_${version_build}_${buildtime}"/>
+ </target>
+
+ <target name="setupStable" if="build.stable">
+ <echo message="setupStable"/>
+ <property name="daily_build" value="false"/>
+ <property name="version" value="${version_base}_${version_build}"/>
+ </target>
+
+ <target name="setupProduction" if="build.production">
+ <echo message="setupProduction"/>
+ <property name="daily_build" value="false"/>
+ <property name="version" value="${version_base}"/>
+ <property name="dev_phase" value="false"/>
+ </target>
+
+ <target name="setupDevPhase" unless="build.production" depends="setupDaily,setupStable">
+ <echo message="setupDevPhase"/>
+ <property name="dev_phase" value="true"/>
+ </target>
+
+ <target name="setupPlatform"
+ depends="init, setupProduction, setupDevPhase ,setupSolaris, setupLinux, setupWindows">
<property name="build-debug-gen" location="${build}/${platform}/debug/gen"/>
<property name="build-opt-gen" location="${build}/${platform}/opt/gen"/>
+ <property name="docname" value="java3d-${version}-doc"/>
</target>
@@ -88,8 +112,6 @@
<tstamp>
<format property="buildtime_verbose" pattern="dd MMM yyyy HH:mm:ss z"/>
<format property="buildtime" pattern="yyMMddHHmm"/>
- <format property="buildtime_old"
- pattern="yyyy-MM-dd'T'HH:mm:ss"/>
</tstamp>
<echo message="buildtime = ${buildtime_verbose}"/>
@@ -164,7 +186,8 @@
<mkdir dir="${build}/rpm/RPMS"/>
<copy file="build-tools/java3d-rpm.spec"
- todir="${build}/rpm/SPECS">
+ todir="${build}/rpm/SPECS"
+ overwrite="true">
<filterset>
<filter token="VERSION" value="${version}"/>
</filterset>
diff --git a/src/classes/build.xml b/src/classes/build.xml
index d538822..b960504 100644
--- a/src/classes/build.xml
+++ b/src/classes/build.xml
@@ -43,7 +43,9 @@
<filter token="VERSION_BASE" value="${version_base}"/>
<filter token="IS_DEBUG" value="true"/>
<filter token="DEV_PHASE" value="true"/>
- <filter token="TIME_STAMP" value="${buildtime_verbose}"/>
+ <filter token="DAILY_BUILD" value="${daily_build}"/>
+ <filter token="BUILDTIME" value="${buildtime}"/>
+ <filter token="BUILDTIME_VERBOSE" value="${buildtime_verbose}"/>
</filterset>
</copy>
@@ -82,7 +84,9 @@
<filter token="VERSION_BASE" value="${version_base}"/>
<filter token="IS_DEBUG" value="false"/>
<filter token="DEV_PHASE" value="${dev_phase}"/>
- <filter token="TIME_STAMP" value="${buildtime_verbose}"/>
+ <filter token="DAILY_BUILD" value="${daily_build}"/>
+ <filter token="BUILDTIME" value="${buildtime}"/>
+ <filter token="BUILDTIME_VERBOSE" value="${buildtime_verbose}"/>
</filterset>
</copy>