forked from cgrand/enlive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
80 lines (69 loc) · 2.56 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
<project name="enlive" default="jar">
<description>
Pack all enlive sources into a JAR. Compile those that can
be compiled standalone if the clojure.jar property points us to
clojure.jar.
</description>
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="build" location="classes"/>
<available property="hasclojure" file="${clojure.jar}"/>
<!-- The JAR file to create. -->
<property name="jarfile" location="enlive.jar"/>
<property name="slimjarfile" location="enlive-slim.jar"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="clean" description="Remove generated files and directories.">
<delete file="${jarfile}"/>
<delete file="${slimjarfile}"/>
<delete dir="${build}"/>
</target>
<target name="check_hasclojure"
description="Print a warning message if clojure.jar is undefined"
unless="hasclojure">
<echo>WARNING: You have not defined a path to clojure.jar so I can't compile files.
This won't break anything.
To enable compiling, run "ant -Dclojure.jar=<...path to clojure.jar..>"
</echo>
</target>
<target name="compile_clojure" depends="init,check_hasclojure"
description="Compile Clojure sources."
if="hasclojure">
<java classname="clojure.lang.Compile">
<classpath>
<path location="${build}"/>
<path location="${src}"/>
<path location="${clojure.jar}"/>
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<sysproperty key="clojure.compile.path" value="${build}"/>
<arg value="net.cgrand.enlive-html"/>
<arg value="net.cgrand.insertion-point"/>
<arg value="net.cgrand.xml"/>
<arg value="net.cgrand.enlive-html.state-machine"/>
</java>
</target>
<target name="jar" description="Create jar files." depends="compile_clojure">
<jar jarfile="${jarfile}">
<fileset file="epl-v10.html"/>
<fileset dir="${src}" includes="**/*.clj"/>
<fileset dir="${build}" includes="**/*.class"/>
<manifest>
<attribute name="Class-Path" value="."/>
</manifest>
</jar>
<jar jarfile="${slimjarfile}">
<fileset file="epl-v10.html"/>
<fileset dir="${src}" includes="**/*.clj"/>
<manifest>
<attribute name="Class-Path" value="."/>
</manifest>
</jar>
</target>
<target name="clean-build" depends="clean,compile_clojure,jar"
description="Builds clojure-contrib from scratch and runs all tests."/>
</project>