blob: 58739bc1889d9b2889e57b6585f8dd38962b90cd [file] [log] [blame]
vinayakb0c860392012-10-06 18:47:20 +00001<?xml version="1.0"?>
Till Westmann276bbc22013-06-05 18:56:27 -07002<!--
3 ! Copyright 2009-2013 by The Regents of the University of California
4 ! Licensed under the Apache License, Version 2.0 (the "License");
5 ! you may not use this file except in compliance with the License.
6 ! you may obtain a copy of the License from
7 !
8 ! http://www.apache.org/licenses/LICENSE-2.0
9 !
10 ! Unless required by applicable law or agreed to in writing, software
11 ! distributed under the License is distributed on an "AS IS" BASIS,
12 ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ! See the License for the specific language governing permissions and
14 ! limitations under the License.
15 !-->
vinayakb0c860392012-10-06 18:47:20 +000016<project name="asterix" default="build" basedir=".">
17
18 <target name="init">
19 <condition property="isWindows">
20 <os family="windows" />
21 </condition>
22 <condition property="isUnix">
23 <os family="unix" />
24 </condition>
25 </target>
26
27 <target name="win" depends="init" if="isWindows">
28 <property name="os.family" value="windows" />
29 <property name="source.ext" value=".cmd" />
30 <property name="target.ext" value=".cmd" />
31 </target>
32
33 <target name="unix" depends="init" if="isUnix">
34 <property name="os.family" value="unix" />
35 <property name="source.ext" value=".sh" />
36 <property name="target.ext" value="" />
37 </target>
38
39 <target name="build" depends="win,unix">
40 <mkdir dir="${target.dir}"/>
41 <pathconvert targetos="${os.family}" property="classpath">
42 <path>
43 <pathelement path="${script.classpath}"/>
44 </path>
45 </pathconvert>
46 <copy file="${source}${source.ext}" tofile="${target.dir}/${target}${target.ext}">
47 <filterset>
48 <filter token="main.class" value="${main.class}"/>
49 <filter token="classpath" value="${classpath}"/>
50 <filter token="jvm.params" value="${jvm.params}"/>
51 <filter token="program.params" value="${program.params}"/>
52 </filterset>
53 </copy>
54 <chmod perm="ugo+x">
55 <fileset dir="${target.dir}"/>
56 </chmod>
57 </target>
58
59</project>