-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
69 lines (60 loc) · 2.89 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
<project name="rel" default="jar">
<description>
Build with "ant -Dclojure.jar=<...path to clojure.jar..> -Dlazymap.jar=<...path to lazymap.jar..>"
Get lazymap from: http://bitbucket.org/kotarak/lazymap/
</description>
<property name="src.dir" location="."/>
<property name="classes.dir" location="classes"/>
<property name="jar.file" location="rel.jar"/>
<available property="has-clojure" file="${clojure.jar}"/>
<available property="has-lazymap" file="${lazymap.jar}"/>
<target name="init" description="create build directories">
<tstamp/>
<mkdir dir="${classes.dir}"/>
</target>
<target name="gen-classes"
depends="init"
description="generate classes">
<fail unless="has-clojure">
You have not defined a path to clojure.jar so I can't generate my classes.
Run "ant -Dclojure.jar=<...path to clojure.jar..>" to tell me where clojure is.
</fail>
<fail unless="has-lazymap">
Please download and build lazymap from http://bitbucket.org/kotarak/lazymap/ and then
Run ant with -Dlazymap.jar=<...path to lazymap.jar..>" to tell me where lazymap is.
</fail>
<java classname="clojure.lang.Compile">
<classpath>
<path location="${classes.dir}"/>
<path location="${src.dir}"/>
<path location="${clojure.jar}"/>
<path location="${lazymap.jar}"/>
</classpath>
<sysproperty key="clojure.compile.path" value="${classes.dir}"/>
<arg value="hoeck.magic-map.MagicMap"/>
<arg value="hoeck.value-mapped-map.ValueMappedMap"/>
<arg value="hoeck.rel.Relation"/>
</java>
</target>
<target name="jar" depends="gen-classes"
description="create jar including the clj sources and the custom classes">
<jar jarfile="${jar.file}">
<fileset file="README.txt"/>
<fileset file="LICENSE.txt"/>
<fileset dir="${classes.dir}" includes="hoeck/magic_map/MagicMap.class"/>
<fileset dir="${classes.dir}" includes="hoeck/magic_map/MagicMap__init.class"/>
<fileset dir="${classes.dir}" includes="hoeck/value_mapped_map/ValueMappedMap.class"/>
<fileset dir="${classes.dir}" includes="hoeck/value_mapped_map/ValueMappedMap__init.class"/>
<fileset dir="${classes.dir}" includes="hoeck/rel/Relation.class"/>
<fileset dir="${classes.dir}" includes="hoeck/rel/Relation__init.class"/>
<fileset dir="${src.dir}" includes="**/*.clj"/>
<manifest>
<attribute name="Class-Path" value="."/>
</manifest>
</jar>
</target>
<target name="clean" description="clean generated files (jar and classes)">
<delete dir="${classes.dir}"/>
<delete file="${jar.file}"/>
</target>
</project>