0N/A<!--
1879N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0N/A
0N/A Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
0N/A
0N/A The contents of this file are subject to the terms
0N/A of the Common Development and Distribution License
0N/A (the License). You may not use this file except in
0N/A compliance with the License.
0N/A
0N/A You can obtain a copy of the License at
0N/A https://opensso.dev.java.net/public/CDDLv1.0.html or
0N/A opensso/legal/CDDLv1.0.txt
0N/A See the License for the specific language governing
0N/A permission and limitations under the License.
0N/A
0N/A When distributing Covered Code, include this CDDL
0N/A Header Notice in each file and include the License file
1472N/A at opensso/legal/CDDLv1.0.txt.
1472N/A If applicable, add the following below the CDDL Header,
1472N/A with the fields enclosed by brackets [] replaced by
0N/A your own identifying information:
0N/A "Portions Copyrighted [year] [name of copyright owner]"
0N/A
1879N/A $Id: build.xml,v 1.24 2010/02/05 00:56:01 leiming Exp $
1879N/A
1879N/A Portions Copyrighted 2010-2015 ForgeRock AS.
1879N/A-->
1879N/A
1879N/A<project name="open-source-web-agents" default="usage">
1879N/A
0N/A <description>Open Web Single Sign-On Web Agents</description>
0N/A
0N/A <!-- overridable properties -->
0N/A <!-- build.debug is used for c code. valid values are: optimize, full -->
0N/A <property name="build.debug" value="optimize"/>
0N/A <property name="webagents.base.dir" value="."/>
0N/A <property name="webagents.built.dir" value="${webagents.base.dir}/build"/>
0N/A <property name="prd.nightly.dist.dir" value="${webagents.base.dir}/dist"/>
0N/A <property name="target.jdk.set" value="1.6"/>
0N/A <property name="build.sysclasspath" value="ignore"/>
0N/A
0N/A <tstamp>
0N/A <format property="nightly.date" pattern="yyyyMMdd" />
0N/A </tstamp>
0N/A
0N/A <condition property="build.os" value="Linux">
0N/A <os name="linux"/>
0N/A </condition>
0N/A
0N/A <condition property="build.os" value="SunOS_sparc">
0N/A <and>
0N/A <os name="sunos"/>
0N/A <and>
0N/A <os arch="sparc"/>
0N/A </and>
0N/A </and>
0N/A </condition>
0N/A
0N/A <condition property="build.os" value="SunOS_x86">
0N/A <and>
0N/A <os name="sunos"/>
0N/A <and>
0N/A <os arch="x86"/>
0N/A </and>
0N/A </and>
0N/A </condition>
0N/A
0N/A <condition property="build.os.ext" value="Linux">
0N/A <os name="linux"/>
0N/A </condition>
0N/A
0N/A <condition property="build.os.ext" value="SunOS_i86pc">
0N/A <and>
0N/A <os name="sunos"/>
0N/A <and>
0N/A <os arch="x86"/>
0N/A </and>
0N/A </and>
0N/A </condition>
0N/A
0N/A <condition property="build.os" value="WINNT">
0N/A <os family="windows"/>
0N/A </condition>
0N/A
0N/A <condition property="build.os" value="HP-UX">
0N/A <os name="hp-ux"/>
0N/A </condition>
0N/A
0N/A <condition property="build.os" value="AIX">
0N/A <os name="aix"/>
0N/A </condition>
0N/A
0N/A <condition property="build.os" value="MacOSX">
0N/A <and>
0N/A <os family="mac"/>
0N/A <os family="unix"/>
0N/A </and>
0N/A </condition>
0N/A
0N/A <condition property="iis.build.ok" value="true">
3863N/A <os family="windows"/>
3863N/A </condition>
0N/A
0N/A <condition property="winnt.lib.ext" value="_64" else="">
0N/A <os family="windows" arch="amd64"/>
0N/A </condition>
0N/A
0N/A <condition property="winnt.ext" value="_x64" else="">
0N/A <os family="windows" arch="amd64"/>
0N/A </condition>
0N/A
0N/A <condition property="build.type.suffix" value="_64" else="">
1879N/A <equals arg1="${build.type}" arg2="64"/>
1879N/A </condition>
<condition property="build.type.is64Bit" value="1" else="">
<equals arg1="${build.type}" arg2="64"/>
</condition>
<condition property="build.type.isDebug" value="1" else="">
<equals arg1="${DEBUG}" arg2="1"/>
</condition>
<condition property="target.jdk.set" value="${target.jdk}">
<isset property="target.jdk"/>
</condition>
<condition property="target.jdk.set" value="1.5">
<not>
<isset property="target.jdk"/>
</not>
</condition>
<!-- agent version number appended to end of agent zip file name -->
<property name="agentversion" value="4.0.0"/>
<target name="clean">
<antcall target="cleandispatch" />
<antcall target="cleandistribution" />
</target>
<target name="cleandispatch">
<echo message="Dispatch to clean"/>
<exec executable="gmake" failonerror="true">
<arg value="clean" />
</exec>
</target>
<target name="cleandistribution">
<echo message="Remove product distribution folder"/>
<delete dir="${prd.nightly.dist.dir}"/>
</target>
<target name="all_Linux">
<antcall target="apache22" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="apache24" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<!-- <antcall target="varnish" /> -->
</target>
<target name="all_AIX">
<antcall target="apache22" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="apache24" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
</target>
<target name="all_Solaris">
<antcall target="apache22" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="apache24" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
</target>
<target name="all_Windows">
<antcall target="apache22" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="apache24" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="iis7" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
</target>
<target name="apache22">
<echo message="Dispatch to Apache 22"/>
<property name="containername" value="apache22zip"/>
<antcall target="gmake" inheritRefs="true"/>
</target>
<target name="apache24">
<echo message="Dispatch to Apache 24"/>
<property name="containername" value="apachezip"/>
<antcall target="gmake" inheritRefs="true"/>
</target>
<target name="iis7">
<echo message="Dispatch to IIS7"/>
<property name="containername" value="iiszip"/>
<antcall target="gmake" inheritRefs="true"/>
</target>
<target name="check.build.varnish">
<condition property="build.varnish">
<and>
<os name="linux"/>
<equals arg1="${build.type}" arg2="64"/>
</and>
</condition>
</target>
<target name="varnish" depends="check.build.varnish" if="build.varnish">
<echo message="Dispatch to Varnish"/>
<property name="containername" value="varnish"/>
<antcall target="gmake" inheritRefs="true"/>
</target>
<target name="gmake">
<echo message="Dispatch to compile of agent c code"/>
<exec executable="gmake" failonerror="true">
<arg value="64=${build.type.is64Bit}" />
<arg value="DEBUG=${build.type.isDebug}" />
<arg value="${containername}" />
</exec>
</target>
<target name="upgradesvn">
<echo message="Run 'svn upgrade' so 'svn info' won't fail horribly because of 'working copy is too old' messages"/>
<exec executable="svn" failonerror="false">
<arg value="upgrade" />
</exec>
</target>
<target name="nightly_Linux">
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.2-${build.os}-${build.type}-build_date.js" append="false">var apache_v22_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.4-${build.os}-${build.type}-build_date.js" append="false">var apache_v24_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Varnish-v3.0.3-${build.os}-${build.type}-build_date.js" append="false">var varnish_v303_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<antcall target="all_Linux" inheritRefs="true"/>
</target>
<target name="nightly_Solaris">
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.2-${build.os}-${build.type}-build_date.js" append="false">var apache_v22_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.4-${build.os}-${build.type}-build_date.js" append="false">var apache_v24_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<antcall target="all_Solaris" inheritRefs="true"/>
</target>
<target name="nightly_AIX6">
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.2-${build.os}6-${build.type}-build_date.js" append="false">var apache_v22_${build.os}6${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.4-${build.os}6-${build.type}-build_date.js" append="false">var apache_v24_${build.os}6${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<antcall target="all_AIX" inheritRefs="true"/>
</target>
<target name="nightly_AIX7">
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.2-${build.os}7-${build.type}-build_date.js" append="false">var apache_v22_${build.os}7${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.4-${build.os}7-${build.type}-build_date.js" append="false">var apache_v24_${build.os}7${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<antcall target="all_AIX" inheritRefs="true"/>
</target>
<target name="nightly_Windows">
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.2-${build.os}-${build.type}-build_date.js" append="false">var apache_v22_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.4-${build.os}-${build.type}-build_date.js" append="false">var apache_v24_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/IIS-v7-${build.os}-${build.type}-build_date.js" append="false">var iis_v7_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<antcall target="all_Windows" inheritRefs="true"/>
</target>
<target name="postNightlyBuildStep">
<copy todir="${prd.nightly.dist.dir}/webagents/${nightly.date}">
<fileset dir="${webagents.built.dir}" >
<include name="*.zip"/>
</fileset>
</copy>
</target>
<target name="usage">
<echo message=" "/>
<echo message=" Following targets are available for Web Agents:"/>
<echo message=" "/>
<echo message=" all_Linux : builds all the Linux Web agents"/>
<echo message=" all_AIX : builds all the AIX Web agents"/>
<echo message=" all_Windows : builds all the Windows Web agents"/>
<echo message=" all_Solaris : builds all the relevant Solaris Web agents"/>
<echo message=" clean : deletes all the generated files"/>
<echo message=" upgradesvn : this is a fudge to avoid 'workspace is too old' messages when 'svn info' is run"/>
<echo message=" apache22 : builds the Apache Web Server 2.2.x agent"/>
<echo message=" apache24 : builds the Apache Web Server 2.4.x agent"/>
<echo message=" iis7 : builds the Microsoft Internet Information Services 7 agent"/>
<echo message=" varnish : builds the Varnish Cache Server 3.0.3 agent"/>
<echo message=" usage : displays this usage message"/>
<echo message=" "/>
<echo message=" To run a target, issue the following command:"/>
<echo message=" "/>
<echo message=" ant &lt;target-name&gt;"/>
<echo message=" "/>
</target>
</project>