aboutsummaryrefslogtreecommitdiff
path: root/build.xml
blob: 524cfb578c01e33e7b79c0ec745af845e4e883c9 (plain)
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<project name="clojure-contrib" default="jar">

  <description>
    Pack all clojure-contrib 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="build" location="classes"/>

  <available property="hasclojure" file="${clojure.jar}"/>

  <!-- The JAR file to create. -->
  <property name="jarfile" location="clojure-contrib.jar"/>

  <target name="init">
    <tstamp/>
    <mkdir dir="${build}"/>
  </target>

  <target name="clean" description="Remove generated files and directories.">
    <delete file="${jarfile}"/>
    <delete dir="${build}"/>
  </target>

  <target name="test_clojure"
	  description = "Run clojure tests"
	  if="hasclojure">
    <java classname="clojure.main">
      <classpath>
        <path location="${build}"/>
        <path location="${src}"/>
        <path location="${clojure.jar}"/>
      </classpath>
      <arg value="-e"/>
      <arg value="(require '(clojure.contrib [test-clojure :as main])) (main/run)"/>
    </java>
  </target>

  <target name="test_contrib"
	  description = "Run contrib tests"
	  if="hasclojure">
    <java classname="clojure.main">
      <classpath>
        <path location="${build}"/>
        <path location="${src}"/>
        <path location="${clojure.jar}"/>
      </classpath>
      <arg value="src/clojure/contrib/test_contrib.clj"/>
    </java>
  </target>

  <target name="test_datalog"
	  description = "Run datalog tests"
	  if="hasclojure">
    <java classname="clojure.main">
      <classpath>
        <path location="${build}"/>
        <path location="${src}"/>
        <path location="${clojure.jar}"/>
      </classpath>
      <arg value="src/clojure/contrib/datalog/tests/test.clj"/>
    </java>
  </target>

  <target name="test" depends="test_clojure,test_contrib,test_datalog"
	  description="Run all tests"/>

  <target name="compile_clojure" depends="init"
          description="Compile Clojure sources."
          if="hasclojure">
    <java classname="clojure.lang.Compile">
      <classpath>
        <path location="${build}"/>
        <path location="${src}"/>
        <path location="${clojure.jar}"/>
      </classpath>
      <sysproperty key="clojure.compile.path" value="${build}"/>
      <arg value="clojure.contrib.accumulators"/>
      <arg value="clojure.contrib.command-line"/>
      <arg value="clojure.contrib.cond"/>
      <arg value="clojure.contrib.def"/>
      <arg value="clojure.contrib.duck-streams"/>
      <arg value="clojure.contrib.except"/>
      <arg value="clojure.contrib.fcase"/>
      <arg value="clojure.contrib.generic.arithmetic"/>
      <arg value="clojure.contrib.generic.collection"/>
      <arg value="clojure.contrib.generic.math-functions"/>
      <arg value="clojure.contrib.import-static"/>
      <arg value="clojure.contrib.javadoc.browse"/>
      <arg value="clojure.contrib.javadoc.browse-ui"/>
      <arg value="clojure.contrib.lazy-seqs"/>
      <arg value="clojure.contrib.mmap"/>
      <arg value="clojure.contrib.macros"/>
      <arg value="clojure.contrib.monads"/>
      <arg value="clojure.contrib.ns-utils"/>
      <arg value="clojure.contrib.probabilities.dist"/>
      <arg value="clojure.contrib.prxml"/>
      <arg value="clojure.contrib.repl-ln"/>
      <arg value="clojure.contrib.repl-utils"/>
      <arg value="clojure.contrib.seq-utils"/>
      <arg value="clojure.contrib.set"/>
      <arg value="clojure.contrib.server-socket"/>
      <arg value="clojure.contrib.sql.internal"/>
      <arg value="clojure.contrib.sql"/>
      <arg value="clojure.contrib.str-utils"/>
      <arg value="clojure.contrib.stream-utils"/>
      <arg value="clojure.contrib.test-clojure"/>
      <arg value="clojure.contrib.test-is"/>
      <arg value="clojure.contrib.trace"/>
      <arg value="clojure.contrib.types"/>
      <arg value="clojure.contrib.zip-filter"/>
      <arg value="clojure.contrib.graph"/>
      <arg value="clojure.contrib.datalog"/>
      <arg value="clojure.contrib.datalog.database"/>
      <arg value="clojure.contrib.datalog.literals"/>
      <arg value="clojure.contrib.datalog.magic"/>
      <arg value="clojure.contrib.datalog.rules"/>
      <arg value="clojure.contrib.datalog.softstrat"/>
      <arg value="clojure.contrib.datalog.util"/>
      <arg value="clojure.contrib.dataflow"/>
    </java>
  </target>

  <target name="jar" description="Create jar file." 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>
  </target>

</project>