forked from rosado/clj-processing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
62 lines (53 loc) · 1.8 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
<project name="clojure-processing" default="jar">
<description>
Pack all rosado.processing sources into a JAR. If clojure.jar
and Processing's core.jar are given -- either as
-Dclojure.jar=path/to/clojure.jar or in a local.properties
file -- compile the ns, too.
</description>
<!-- The JAR file to create. -->
<property name="src" location="."/>
<property name="build" location="classes"/>
<property name="jarfile" location="rosado.processing.jar"/>
<property file="local.properties"/>
<available property="hasclojure" file="${clojure.jar}"/>
<available property="hascore" file="${core.jar}"/>
<target name="checkforjars" depends="init">
<condition property="hasjars">
<and>
<isset property="hasclojure"/>
<isset property="hascore"/>
</and>
</condition>
</target>
<target name="init" depends="clean">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="clean"
description="Remove generated files and directories.">
<delete dir="${build}"/>
</target>
<target name="compile" depends="checkforjars"
description="Compile sources."
if="hasjars">
<java classname="clojure.lang.Compile">
<classpath>
<path location="${build}"/>
<path location="${src}"/>
<path location="${clojure.jar}"/>
<path location="${core.jar}"/>
</classpath>
<sysproperty key="clojure.compile.path" value="${build}"/>
<arg value="rosado.processing"/>
</java>
</target>
<target name="jar" depends="compile"
description="Create jar file.">
<jar jarfile="${jarfile}">
<fileset dir="." includes="CPL.TXT"/>
<fileset dir="." includes="rosado/**/*.clj"/>
<fileset dir="${build}" includes="**/*.class"/>
</jar>
</target>
</project>