blob: cb410693c82fafb61d2bee40e40ea627fb1ff0ac [file] [log] [blame]
vinayakb59d505d2012-10-29 10:38:02 +00001<?xml version="1.0"?>
2<project name="asterix" default="build" basedir=".">
3
4 <target name="init">
5 <condition property="isWindows">
6 <os family="windows" />
7 </condition>
8 <condition property="isUnix">
9 <os family="unix" />
10 </condition>
11 </target>
12
13 <target name="win" depends="init" if="isWindows">
14 <property name="os.family" value="windows" />
15 <property name="source.ext" value=".cmd" />
16 <property name="target.ext" value=".cmd" />
17 </target>
18
19 <target name="unix" depends="init" if="isUnix">
20 <property name="os.family" value="unix" />
21 <property name="source.ext" value=".sh" />
22 <property name="target.ext" value="" />
23 </target>
24
25 <target name="build" depends="win,unix">
26 <mkdir dir="${target.dir}"/>
27 <pathconvert targetos="${os.family}" property="classpath">
28 <path>
29 <pathelement path="${script.classpath}"/>
30 </path>
31 </pathconvert>
32 <copy file="${source}${source.ext}" tofile="${target.dir}/${target}${target.ext}">
33 <filterset>
34 <filter token="main.class" value="${main.class}"/>
35 <filter token="classpath" value="${classpath}"/>
36 <filter token="jvm.params" value="${jvm.params}"/>
37 <filter token="program.params" value="${program.params}"/>
38 </filterset>
39 </copy>
40 <chmod perm="ugo+x">
41 <fileset dir="${target.dir}"/>
42 </chmod>
43 </target>
44
45</project>