blob: 2f5e89bad458aa9ea0e025d3fd60ef722c52b869 [file] [log] [blame]
<project
name="cc_project_build"
default="Build"
basedir=".">
<!-- = = = 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" />
<!--
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" />
<!-- = = = 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.
-->
<property
name="checkoutprojectname"
value="${projectname}" />
<!-- 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="builder"
value="${env.PROJECT_BUILDERS}/${checkoutprojectname}/${env.RELENG_BUILDER}/build.xml" />
<antcall
target="doCleanBuild" />
<!-- 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" />
<!-- 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>