aboutsummaryrefslogtreecommitdiff
path: root/project/QBarInterpreter/build.xml
blob: f86b527167210869820d388e181832e0603d95d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== 
     Apr 5, 2011 10:02:29 PM                                                        

     QBarInterpreter    
     description
                   
     jrahm                                                                
     ====================================================================== -->
<project name="QBarInterpreter" default="build">
    <import file="../JavaCommon/common_build.xml"/>
	
	<property name="prj.src.dir" value="src" />
	<property name="prj.bin.dir" value="bin" />
	
	<path id="project.class.path">
		<fileset dir="${lib.dir}" includes="**/*.jar" />
	</path>
	
	<description>
            description
    </description>

    <!-- ================================= 
          target: build              
         ================================= -->

    <!-- - - - - - - - - - - - - - - - - - 
          target: lib                      
         - - - - - - - - - - - - - - - - - -->
    <target name="lib">
    	<mkdir dir="${lib.dir}"/>
		<copy todir="${lib.dir}" >
			<fileset dir="lib" includes="**/*.jar" />
		</copy>
    </target>

	<target name="compile" depends="lib">
		<mkdir dir="${prj.bin.dir}" />
		<javac srcdir="${prj.src.dir}" destdir="${prj.bin.dir}" includes="**" encoding="utf-8" >
			<classpath refid="project.class.path" />
		</javac>
	</target>
	
	<target name="package" depends="compile">
		<mkdir dir="${lib.dir}"/>
		<copy todir="${lib.dir}">
			<fileset file="qbar" />
		</copy>
		<manifestclasspath property="lib.list" jarfile="${lib.dir}/CommonJava.jar">
			<classpath refid="project.class.path"/>
		</manifestclasspath>


		<jar basedir="${prj.bin.dir}" destfile="${lib.dir}/${ant.project.name}.jar" >
			<manifest>
				<attribute name="Main-Class"
			          value="com.modulus.qbar.core.interpreter.Main"/>
				<attribute name="Class-Path" value="${lib.list}" />
			</manifest>
		</jar>
	</target>
	
	<target name="doc">
		<mkdir dir="${doc.dir}" />
		<javadoc sourcepath="${prj.src.dir}" destdir="${doc.dir}" />
	</target>
	
	<target name="build" depends="package,clean" />
	<target name="clean" >
		<delete dir="bin">
		</delete> 
	</target>
</project>