<?xml version="1.0" encoding="utf-8" ?>
 <!--
 * Licensed to the Apache Software Foundation (ASF) under one   *
 * or more contributor license agreements.  See the NOTICE file *
 * distributed with this work for additional information        *
 * regarding copyright ownership.  The ASF licenses this file   *
 * to you under the Apache License, Version 2.0 (the            *
 * "License"); you may not use this file except in compliance   *
 * with the License.  You may obtain a copy of the License at   *
 *                                                              *
 *   http://www.apache.org/licenses/LICENSE-2.0                 *
 *                                                              *
 * Unless required by applicable law or agreed to in writing,   *
 * software distributed under the License is distributed on an  *
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
 * KIND, either express or implied.  See the License for the    *
 * specific language governing permissions and limitations      *
 * under the License.                                           *
 -->
<project name="etch-helloworld-example" basedir="." default="help" >
    <description>HelloWorld Example</description>
    <property name="Etch.basedir" location="${basedir}/../.." />
    <import file="${Etch.basedir}/build-support/etch.includes.xml" />

    <property name="dist"   location="${Etch.basedir}/target/Installers/dist" />

    <target name="dist-src">
        <copy file="dist-build.xml" tofile="${dist}/examples/helloworld/build.xml" overwrite="true" >
            <filterset refid="Etch.buildTokens" />
        </copy>
        <copy file="dist-README.txt" tofile="${dist}/examples/helloworld/README.txt" overwrite="true" />
    </target>

    <target name="do-clean">
        <build_component dir="java" />
        <build_component dir="csharp" />
        <build_component dir="c" />
        <build_component dir="cpp" />
        <delete dir="target" quiet="true" />
    </target>

    <target name="do-init">
    </target>

    <target name="do-build" depends="dist-src">
        <build_component dir="java" />
        <build_component dir="csharp" />
        <build_component dir="c" />
        <antcall target="component-bindings-experimental" />
    </target>

    <target name="do-postbuild">
    </target>

    <target name="do-help">
    </target>
    
    <!-- Experimental Binding examples -->
    <target name="component-bindings-experimental" depends="component-bindings-experimental-if, component-bindings-experimental-then">
    </target>
    <target name="component-bindings-experimental-if">
        <condition property="is-build-type-experimental">
            <equals arg1="${build.type}" arg2="experimental" />
        </condition>
    </target>
    <target name="component-bindings-experimental-then" if="is-build-type-experimental">
        <build_component dir="cpp" />
    </target>

</project>

