streamline build scripts
diff --git a/releng.control/cc_project_build.xml b/releng.control/cc_project_build.xml
index 98da6c0..2f5e89b 100644
--- a/releng.control/cc_project_build.xml
+++ b/releng.control/cc_project_build.xml
@@ -1,93 +1,127 @@
-<project name="cc_project_build" default="Build" basedir=".">
+<project
+ name="cc_project_build"
+ default="Build"
+ basedir=".">
- <!-- = = = standard properties pattern = = = -->
- <!--
- Note to be cross-platform, "environment variables" are only appropriate for
+ <!-- = = = standard properties pattern = = = -->
+ <!--
+ Note to be cross-platform, "environment variables" are only appropriate for
some variables, e.g. ones we set, since properties are case sensitive, even if
the environment variables on your operating system are not, e.g. it will
be ${env.Path} not ${env.PATH} on Windows -->
- <property environment="env" />
+ <property
+ environment="env" />
- <!--
- Let users override standard properties, if desired.
- If directory, file, or some properties do not exist,
- then standard properties will be used.
+ <!--
+ Let users override standard properties, if desired.
+ If directory, file, or some properties do not exist,
+ then standard properties will be used.
-->
- <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
+ <property
+ file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
- <!-- = = = end standard properties pattern = = = -->
+ <!-- = = = end standard properties pattern = = = -->
+ <!-- if not otherwise set, build clean -->
+ <property
+ name="build.clean"
+ value="true" />
- <!--
- If not set yet, by "caller", then we set checkoutprojectname here.
- Normally this is literally the project name from CruiseControl, but
- if running "standalone", we make this simplifying assumption.
+ <!--
+ If not set yet, by "caller", then we set checkoutprojectname here.
+ Normally this is literally the project name from CruiseControl, but
+ if running "standalone", we make this simplifying assumption.
-->
- <property name="build.distribution" value="wtp" />
- <property name="buildBranch" value="R3.0" />
- <property name="buildType" value="I" />
- <property name="checkoutprojectname" value="${build.distribution}-${buildBranch}-${buildType}" />
+ <property
+ name="checkoutprojectname"
+ value="${projectname}" />
- <target name="Build">
+ <!-- if not otherwise set, the following are good default values -->
+ <property
+ name="mapVersionTag"
+ value="HEAD" />
+ <target
+ name="Build">
- <!-- set main builder file name, based on distribution, buildBranch and build type -->
- <property name="wtpBuilder" value="${env.BUILD_HOME}/projectBuilders/${checkoutprojectname}/${env.RELENG_BUILDER}/build.xml" />
+ <!-- set main builder file name, based on distribution, buildBranch and build type -->
+ <property
+ name="builder"
+ value="${env.PROJECT_BUILDERS}/${checkoutprojectname}/${env.RELENG_BUILDER}/build.xml" />
+ <antcall
+ target="doCleanBuild" />
- <antcall target="doCleanBuild" />
-
- <!-- and create preliminary download site files -->
- <ant antfile="${wtpBuilder}" target="site" />
- <!-- upload what we have so far -->
- <ant antfile="${wtpBuilder}" target="upload" />
-
- <antcall target="doTestPhase" />
+ <!-- and create preliminary download site files -->
+ <ant
+ antfile="${builder}"
+ target="site" />
+ <!-- upload what we have so far -->
+ <ant
+ antfile="${builder}"
+ target="upload" />
+ <antcall
+ target="doTestPhase" />
+ </target>
+ <target
+ name="doCleanBuild"
+ unless="skipCleanBuild">
+ <!-- clean previous build -->
+ <antcall
+ target="clean" />
- </target>
-
- <target name="doCleanBuild" unless="skipCleanBuild">
- <!-- clean previous build -->
- <antcall target="clean" />
-
- <!-- check out fresh set of appropriate files -->
- <!-- this is to make sure maps and builders are correct, but also to
- make sure the cruisecontrol triggered "diffs" are accurate next
- time around -->
- <ant antfile="checkout.xml">
- <property name="checkoutprojectname" value="${checkoutprojectname}" />
- </ant>
- <!-- build -->
- <ant antfile="${wtpBuilder}" target="build" />
-
- </target>
-
- <target name="doTestPhase" unless="skipUnitTests">
- <!-- test and create test summary files -->
- <ant antfile="${wtpBuilder}" target="test" />
-
- <ant antfile="${wtpBuilder}" target="site" />
- <!-- upload what we have so far -->
- <ant antfile="${wtpBuilder}" target="upload" />
- </target>
-
- <!-- TODO: projects and tests should be variables, see build.properties in wtpBuilder -->
- <target name="clean" depends="check.clean" if="doClean">
- <delete dir="${env.BUILD_HOME}/projects/${checkoutprojectname}" failonerror="false" />
- <delete dir="${env.BUILD_HOME}/tests/${checkoutprojectname}" failonerror="false" />
- </target>
-
- <!-- if build.clean does not exist, set doClean to true -->
- <target name="check.clean">
- <condition property="doClean">
- <or>
- <not>
- <isset property="build.clean"/>
- </not>
- <equals arg1="${build.clean}" arg2="true" />
- </or>
- </condition>
- </target>
-</project>
+ <!-- check out fresh set of appropriate files for the builder -->
+ <ant
+ antfile="checkout.xml" />
+
+ <!-- build and create preliminary download site files -->
+ <ant
+ antfile="${builder}"
+ target="build" />
+ </target>
+ <target
+ name="doTestPhase"
+ unless="skipUnitTests">
+ <!-- test and create test summary files -->
+ <ant
+ antfile="${builder}"
+ target="test" />
+ <ant
+ antfile="${builder}"
+ target="site" />
+ <!-- upload what we have so far -->
+ <ant
+ antfile="${builder}"
+ target="upload" />
+ </target>
+ <target
+ name="clean"
+ depends="check.clean"
+ if="doClean">
+ <delete
+ dir="${env.PROJECT_PROJECTS}/${checkoutprojectname}"
+ failonerror="false" />
+ <delete
+ dir="${env.PROJECT_TESTS}/${checkoutprojectname}"
+ failonerror="false" />
+ </target>
+
+ <!-- if build.clean does not exist, set doClean to true -->
+ <target
+ name="check.clean">
+ <condition
+ property="doClean">
+ <or>
+ <not>
+ <isset
+ property="build.clean" />
+ </not>
+ <equals
+ arg1="${build.clean}"
+ arg2="true" />
+ </or>
+ </condition>
+ </target>
+</project>
\ No newline at end of file