build.xml revision ea3b7fa21b9a3f8fcdeee368fce052effc1f9f54
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
The contents of this file are subject to the terms
of the Common Development and Distribution License
(the License). You may not use this file except in
compliance with the License.
You can obtain a copy of the License at
https://opensso.dev.java.net/public/CDDLv1.0.html or
opensso/legal/CDDLv1.0.txt
See the License for the specific language governing
permission and limitations under the License.
When distributing Covered Code, include this CDDL
Header Notice in each file and include the License file
at opensso/legal/CDDLv1.0.txt.
If applicable, add the following below the CDDL Header,
with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
$Id: build.xml,v 1.24 2010/02/05 00:56:01 leiming Exp $
Portions Copyrighted 2010-2015 ForgeRock AS.
-->
<project name="open-source-web-agents" default="usage">
<description>Open Web Single Sign-On Web Agents</description>
<!-- overridable properties -->
<!-- build.debug is used for c code. valid values are: optimize, full -->
<property name="build.debug" value="optimize"/>
<property name="webagents.base.dir" value="."/>
<property name="prd.nightly.dist.dir" value="dist"/>
<property name="target.jdk.set" value="1.6"/>
<property name="build.sysclasspath" value="ignore"/>
<import file="webagents.xml" />
<tstamp>
<format property="nightly.date" pattern="yyyyMMdd" />
</tstamp>
<condition property="build.os" value="Linux">
<os name="linux"/>
</condition>
<condition property="build.os" value="SunOS_sparc">
<and>
<os name="sunos"/>
<and>
<os arch="sparc"/>
</and>
</and>
</condition>
<condition property="build.os" value="SunOS_x86">
<and>
<os name="sunos"/>
<and>
<os arch="x86"/>
</and>
</and>
</condition>
<condition property="build.os.ext" value="Linux">
<os name="linux"/>
</condition>
<condition property="build.os.ext" value="SunOS_i86pc">
<and>
<os name="sunos"/>
<and>
<os arch="x86"/>
</and>
</and>
</condition>
<condition property="build.os" value="WINNT">
<os family="windows"/>
</condition>
<condition property="build.os" value="HP-UX">
<os name="hp-ux"/>
</condition>
<condition property="build.os" value="AIX">
<os name="aix"/>
</condition>
<condition property="build.os" value="MacOSX">
<and>
<os family="mac"/>
<os family="unix"/>
</and>
</condition>
<condition property="iis.build.ok" value="true">
<os family="windows"/>
</condition>
<condition property="winnt.lib.ext" value="_64" else="">
<os family="windows" arch="amd64"/>
</condition>
<condition property="winnt.ext" value="_x64" else="">
<os family="windows" arch="amd64"/>
</condition>
<condition property="build.type.suffix" value="_64" else="">
<equals arg1="${build.type}" arg2="64"/>
</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-SNAPSHOT"/>
<target name="clean">
<echo message="Dispatch to clean"/>
<exec executable="gmake" failonerror="true">
<arg value="clean" />
</exec>
<echo message="Remove product distribution folder"/>
<delete dir="${prd.nightly.dist.dir}"/>
</target>
<target name="all">
<antcall target="apache22" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="apache24" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<!-- <antcall target="varnish" /> -->
</target>
<target name="sjsws">
<echo message="Dispatch to SJSWS"/>
<property name="containername" value="sjsws"/>
<antcall target="gmake" inheritRefs="true"/>
<ant antfile="${webagents.basedir}/build_agent.xml"
target="all" 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="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"/>
<ant antfile="${webagents.basedir}/build_agent.xml"
target="varnish" inheritRefs="true"/>
</target>
<target name="iis6" if="iis.build.ok">
<echo message="Dispatch to iis6"/>
<property name="containername" value="iis6"/>
<antcall target="gmake" inheritRefs="true"/>
<ant antfile="${webagents.basedir}/build_agent.xml"
target="all" inheritRefs="true"/>
</target>
<target name="iis7" if="iis.build.ok">
<echo message="Dispatch to iis7"/>
<property name="containername" value="iis7"/>
<antcall target="gmake" inheritRefs="true"/>
<ant antfile="${webagents.basedir}/build_agent.xml"
target="all" 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="nightly">
<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-v6-${build.os}-${build.type}-build_date.js" append="false">var iis_v6_${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>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/SJSWS-v7.0-${build.os}-${build.type}-build_date.js" append="false">var sjsws_v70_${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" inheritRefs="true"/>
<!--
<copy file="${webagents.docs.dir}/nightly.html"
tofile="${webagents.dist.dir}/index.html" filtering="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 : builds all the Web agents"/>
<echo message=" clean : deletes all the generated files"/>
<echo message=" sjsws : builds the Sun Java System Web Server 6.1/7.0 agent"/>
<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=" iis6 : builds the Microsoft Internet Information Services 6 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>