forked from fogus/baysick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
122 lines (96 loc) · 3.45 KB
/
build.xml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<project name="Baysick" default="dist" basedir=".">
<property environment="env"/>
<property name="package.name" value = "fogus.baysick"/>
<property name="module.name" value = "baysick"/>
<property name="dist.home" value="${basedir}/dist"/>
<property name="src.home" value="${basedir}/src"/>
<property name="javadoc.home" value="${basedir}/doc/apidoc"/>
<property name="classes.home" value="${basedir}/classes"/>
<property name="archive.home" value="${dist.home}"/>
<property name="archive.name" value="baysick.jar"/>
<description>
Ant build script for compiling Jaka.
</description>
<!-- Path pointing to the base of the src and deploy directory -->
<path id="src.classpath">
<pathelement location="${src.home}"/>
<pathelement location="${classes.home}"/>
</path>
<path id="scala.classpath">
<fileset dir="${env.SCALA_HOME}/lib" includes="**/*.jar"/>
</path>
<!-- Amalgamation of the above paths -->
<path id="project.classpath">
<path refid="scala.classpath" />
<path refid="src.classpath" />
</path>
<target name="clean">
<echo> Cleaning ${dist.home} </echo>
<echo> Cleaning ${archive.name} </echo>
<echo> Cleaning ${javadoc.home} </echo>
<echo> ${env.SCALA_HOME} </echo>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${dist.home}">
<include name="**/*"/>
</fileset>
<fileset dir="${classes.home}">
<include name="**/*"/>
</fileset>
<fileset dir="${archive.home}">
<include name="${archive.name}"/>
</fileset>
<fileset dir="${javadoc.home}">
<include name="**/*"/>
</fileset>
</delete>
</target>
<target name="prepare" depends="clean">
<mkdir dir="${classes.home}"/>
<mkdir dir="${dist.home}"/>
<copy todir="${dist.home}" includeEmptyDirs="false" preservelastmodified="yes" overwrite="yes" flatten="false">
<fileset dir="${src.home}" includes="test_all.sh"/>
</copy>
<chmod file="${dist.home}/test_all.sh" perm="ugo+rx"/>
</target>
<target name="dist" depends="jar">
<mkdir dir="${dist.home}"/>
<copy todir="${dist.home}" includeEmptyDirs="false" preservelastmodified="yes" overwrite="yes" flatten="false">
<fileset dir="${src.home}" includes="baysick"/>
</copy>
<chmod file="${dist.home}/baysick" perm="ugo+rx"/>
</target>
<target name="jar" depends="compile">
<jar destfile="${archive.home}/${archive.name}" basedir="${classes.home}">
<manifest>
<attribute name="Author" value="Fogus"/>
<attribute name="Main-Class" value="fogus.baysick.Repl"/>
</manifest>
</jar>
</target>
<target name="compile-scala" depends="">
<taskdef resource="scala/tools/ant/antlib.xml">
<classpath>
<path refid="project.classpath" />
</classpath>
</taskdef>
<scalac srcdir="src/fogus"
destdir="${classes.home}"
target="jvm-1.5"
force="changed"
deprecation="on">
<include name="**/*.scala"/>
<classpath>
<path refid="project.classpath" />
</classpath>
</scalac>
</target>
<target name="compile" depends="prepare,compile-scala">
</target>
<target name="apidoc" description="Create API docs for this project">
<mkdir dir="${javadoc.home}"/>
<scaladoc
destdir="${javadoc.home}">
<fileset dir="${basedir}/src" includes="**/*.scala" />
</scaladoc>
</target>
</project>