<!--

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="fdb" default="main" basedir=".">

	<target name="main" depends="check_burm,burm" />
    
    <target name="check_burm" >
        <available file="target/generated-sources/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.java"
            property="burmed" value="true" />
    </target>
    
    <target name="echo_burm" if="burmed" >
        <echo>
            AS3DebuggerBURM.java is generated. (If your changes are not reflected, you might want to consider a clean,build)
        </echo>
    </target>
    
    <target name="burm" depends="echo_burm" unless="burmed" >
        <mkdir dir="target/generated-sources/jburg/flash/tools/debugger/expression/" />
        <java classname="jburg.burg.JBurgMain" classpath="../compiler/lib/compiler.jar, ../compiler-jburg-types/target/classes" failonerror="yes" fork="yes" dir="">
            <arg value="src/main/jburg/flash/tools/debugger/expression/AS3DebuggerBURM.jbg" />
            <arg value="-outputdir" />
            <arg value="target/generated-sources/jburg/flash/tools/debugger/expression" />
            <arg value="-outputfile" />
            <arg value="AS3DebuggerBURM.java" />
            <arg value="-g" />
            <classpath>
                <pathelement location="../compiler/lib/external/jburg.jar" />
                <pathelement location="../compiler/lib/external/antlr.jar" />
                <pathelement location="../compiler/lib/compiler.jar" />
                <pathelement location="../compiler-jburg-types/target/classes" />
            </classpath>
        </java>
	</target>
	<target name="clean" description="clean">
		<echo message="Cleaning out generated dir: target/generated-sources/jburg/" />
		<delete failonerror="false" quiet="true" includeemptydirs="true">
			<fileset dir="target/generated-sources/jburg/">
				<include name="**/*" />
				<exclude name="intermediates/eclipse/**/*" />
			</fileset>
		</delete>
	</target>
	<!-- End Debugger targets -->
</project>
