build.xml 3.03 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?xml version="1.0"?>
<!-- 
	* This library is free software; you can redistribute it and/or
	* modify it under the terms of the GNU Lesser General Public
	* License as published by the Free Software Foundation; either
	* version 2 of the License, or (at your option) any later version.
	*
	* This library is distributed in the hope that it will be useful,
	* but WITHOUT ANY WARRANTY; without even the implied warranty of
	* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
	* Lesser General Public License for more details.
	*
	* You should have received a copy of the GNU Lesser General Public
	* License along with this library; if not, write to the Free Software
	* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-->

<project name="Fractal HelloWorld example" default="execute">

20
21
22
	<property name="lib"     location="../../lib" />
	<property name="build"   location="target" />
	<property name="classes" location="${build}/classes" />
23
24
25
26
27
28
	
	<path id="classpath.compile">
		<fileset dir="${lib}">
			<include name="**/*.jar" />
		</fileset>
		<pathelement location="src/main/resources" />
29
		<pathelement location="${classes}" />
30
31
32
33
34
	</path>
	
	<path id="classpath.execute">
		<pathelement location="${lib}/fractal-api-2.0.2.jar" />
		<pathelement location="${lib}/julia-runtime-2.5.2.jar" />
Lionel Seinturier's avatar
Lionel Seinturier committed
35
		<fileset dir="${lib}" includes="juliac-runtime-*.jar" />
36
		<pathelement location="${classes}" />
37
38
39
40
41
42
43
	</path>
	
	<!-- ==================================================== -->
	<!-- Compile the project                                  -->
	<!-- ==================================================== -->
	<target name="compile">
		<!-- mkdir needed else the directory in not included in classpath -->
44
		<mkdir dir="${classes}" />
Lionel Seinturier's avatar
Lionel Seinturier committed
45
        <java fork="yes" classname="org.objectweb.fractal.juliac.Juliac">
46
            <classpath refid="classpath.compile" />
47
48
            <arg value="--compileInput" />
            <arg value="--compileGenerated" />
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
            <arg value="--srcs" />
            <arg value="src/main/java" />
            <arg value="--opt" />
            <arg value="OO" />
            <arg value="--mixins" />
            <arg value="${lib}/julia-mixins-2.5.2-sources.jar" />
            <arg value="example.hw.HelloWorld" />
        </java>
	</target>

	<!-- ==================================================== -->
	<!-- Execute the project                                  -->
	<!-- ==================================================== -->
	<target name="execute" depends="compile">
		<java
			fork="yes"
Lionel Seinturier's avatar
Lionel Seinturier committed
65
			classname="org.objectweb.fractal.juliac.runtime.Launcher"
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
			classpathref="classpath.execute">
            
			<arg value="example.hw.HelloWorld" />
            <arg value="r" />
		</java>
	</target>

	<!-- ==================================================== -->
	<!-- Clean the project                                    -->
	<!-- ==================================================== -->
	<target name="clean">
		<delete dir="${build}" />
	</target>

</project>