
<project name="ebuild workspace interface">
	<property name="ebuild.home" location=".."/>
	<property file="${ebuild.home}/interface/build.properties"/>

	<property name="classpath.import" value="classpath.ent"/>
	<import file="${ebuild.home}/interface/${classpath.import}" />
	<property name="ebuild.core.path" value="${ebuild.home}/system/ebuild-core.jar"/>
	
	<!-- property defaults -->
	<property name="confs" value=""/>
	<property name="verbose" value=""/>
	<property name="debug" value=""/>
	
	<macrodef name="DoWorkspace">
		<attribute name="task"/>
		<sequential>
		    <java classname="ebuild.launch.DoWorkspace" fork="true">
		    	<arg value="home=${ebuild.home}"/>
		    	<arg value="task=@{task}"/>
		    	<arg value="confs=${confs}"/>
		    	<arg value="verbose=${verbose}"/>
		    	<arg value="debug=${debug}"/>
		    	<sysproperty key="ebuild.core.path" value="${ebuild.core.path}"/>
		     	<classpath refid="ebuild.launch.path"/> 
		    </java> 
		</sequential> 
	</macrodef> 
	
	<target name="refresh" if="eclipse.running">
		<echo message="refreshing eclipse workspace"/>
		<eclipse.refreshLocal resource="/" depth="infinite"/>
	</target>
	
	
	<target name="build_release"> <DoWorkspace task="build_release"/>  </target>	
	<target name="build_clean">   <DoWorkspace task="build_clean"/></target>	
	<target name="eclipse_setup">  <DoWorkspace task="eclipse_setup"/>	<antcall target="refresh" /> </target>	
	<target name="eclipse_unsetup"> <DoWorkspace task="eclipse_unsetup"/> <antcall target="refresh" /> </target>	
</project>
