<target name="build-opt" unless="done.build-opt">

<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->

    <property environment="env"/>

    <!-- make sure we have a working LPS_HOME -->
    <property name="LPS_HOME" value="${env.LPS_HOME}" />
    <fail unless="LPS_HOME" message="LPS_HOME is not set."/>
    
    <basename property="lps.branch" file="${LPS_HOME}"/>

    <!-- make sure we have a working LZ_VENDOR_ROOT -->
    <available property="have_LZ_VENDOR_ROOT" file="${env.LZ_VENDOR_ROOT}" />
    <fail unless="have_LZ_VENDOR_ROOT" message="LZ_VENDOR_ROOT is not available (${env.LZ_VENDOR_ROOT})"/>
    <property name="LZ_VENDOR_ROOT" value="${env.LZ_VENDOR_ROOT}" />

    <available property="have_LZ_TOOLS_ROOT" file="${env.LZ_TOOLS_ROOT}" />
    <fail unless="have_LZ_TOOLS_ROOT" message="LZ_TOOLS_ROOT is not set"/> 

    <property name="build.tools" value="" />
    <property name="build.qa" value="" />
    
    <condition property="isautomatedbuild">
         <equals arg1="${user.name}" arg2="laszlo" />
    </condition>

    <!-- Determine value of platform -->
    <condition property="build.platform" value="windows" >
        <os family="windows" />
    </condition>
    <condition property="build.platform" value="macosx" >
         <os name="Mac OS X" />
    </condition>
    <condition property="build.platform" value="unix" >
        <os family="unix" />
    </condition>
    
    <!-- Determine value of filesystem casesensitivity -->
    <condition property="filesystem.casesensitive" value="false" >
        <os family="windows" />
    </condition>
    <condition property="filesystem.casesensitive" value="false" >
         <os name="Mac OS X" />
    </condition>
    <condition property="filesystem.casesensitive" value="true" >
        <os family="unix" />
    </condition>

    <!-- Set script extension for platform -->
    <condition property="sh" value="bat" >
         <os family="windows" />
    </condition>
    <condition property="sh" value="sh" >
         <os name="Mac OS X" />
    </condition>
    <condition property="sh" value="sh" >
         <os family="unix" />
    </condition>
    
    <!-- Remove these property definitions if you want the associated
        ant target to run. [bshine 8.25.06] -->     
    <property name="skip.prefetch" value="true" />
    <!-- property name="skip.wrappertest" value="true" -->
    <!-- <property name="skip.runlzunit" value="true" -->
    
    <!-- currently unable to generate the reference on Windows -->
    <condition property="skip.doc.reference" value="true">
        <os family="windows"/>
    </condition>
    <!-- property name="skip.doc.reference" value="true" / -->

	<property name="build.doc.index" value="1" />

    <property name="done.build-opt" value="true" />
</target>
