aboutsummaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml115
1 files changed, 36 insertions, 79 deletions
diff --git a/build.xml b/build.xml
index f676e03c..e72d36e5 100644
--- a/build.xml
+++ b/build.xml
@@ -93,6 +93,41 @@
<target name="compile_clojure" depends="init,check_hasclojure,compile_classes"
description="Compile Clojure sources."
if="hasclojure">
+
+ <!-- Seek out the namespaces to compile. Note that this will fail if the actual name of a package includes an underscore, as
+ all underscores are converted to dashes. -->
+ <echo>Locating namespaces to compile ...</echo>
+
+ <pathconvert pathsep=" " property="compile.namespaces">
+ <fileset dir="${src}" includes="**/*.clj">
+ <!-- TODO: Seperate out the source into at least three root folders: one for namespaces with :gen-class, one for
+ ordinary namespaces (to be AOT compiled) and one for test namespaces (which, perhaps, should not be included
+ in the packaged JAR).
+ Complicated exclude rules like this are a bad design smell for the build.xml and/or project layout.
+ -->
+ <exclude name="**/*_test.clj" />
+ <exclude name="**/test_*/**" />
+ <exclude name="clojure/contrib/javadoc.clj" />
+ <exclude name="clojure/contrib/jmx/*.clj" />
+ <exclude name="**/pprint/**"/>
+ <exclude name="**/with_pull.clj" />
+ <exclude name="**/examples*/**" />
+ <exclude name="**/PersistentFnMap.clj" />
+ <exclude name="**/Condition.clj" />
+ <exclude name="**/Bean.clj" />
+ <exclude name="**/repl_utils/javadoc.clj"/>
+ <exclude name="clojure/contrib/load_all.clj"/>
+ <exclude name="**/tests.clj"/>
+ </fileset>
+ <chainedmapper>
+ <packagemapper from="${src}/*.clj" to="*" />
+ <filtermapper>
+ <replacestring from="_" to="-" />
+ </filtermapper>
+ </chainedmapper>
+ </pathconvert>
+
+ <echo>Compiling Clojure namespaces ...</echo>
<java classname="clojure.lang.Compile">
<classpath>
<path location="${build}"/>
@@ -101,85 +136,7 @@
</classpath>
<sysproperty key="clojure.compile.path" value="${build}"/>
<sysproperty key="java.awt.headless" value="true"/>
- <arg value="clojure.contrib.accumulators"/>
- <arg value="clojure.contrib.agent-utils"/>
- <arg value="clojure.contrib.classpath"/>
- <arg value="clojure.contrib.combinatorics"/>
- <arg value="clojure.contrib.command-line"/>
- <arg value="clojure.contrib.complex-numbers"/>
- <arg value="clojure.contrib.cond"/>
- <arg value="clojure.contrib.condition"/>
- <arg value="clojure.contrib.core"/>
- <arg value="clojure.contrib.dataflow"/>
- <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.def"/>
- <arg value="clojure.contrib.duck-streams"/>
- <arg value="clojure.contrib.error-kit"/>
- <arg value="clojure.contrib.except"/>
- <arg value="clojure.contrib.mock"/>
- <arg value="clojure.contrib.mock.test-adapter"/>
- <arg value="clojure.contrib.fcase"/>
- <arg value="clojure.contrib.find-namespaces"/>
- <arg value="clojure.contrib.fnmap"/>
- <arg value="clojure.contrib.gen-html-docs"/>
- <arg value="clojure.contrib.generic"/>
- <arg value="clojure.contrib.generic.arithmetic"/>
- <arg value="clojure.contrib.generic.collection"/>
- <arg value="clojure.contrib.generic.comparison"/>
- <arg value="clojure.contrib.generic.functor"/>
- <arg value="clojure.contrib.generic.math-functions"/>
- <arg value="clojure.contrib.graph"/>
- <arg value="clojure.contrib.greatest-least"/>
- <arg value="clojure.contrib.import-static"/>
- <arg value="clojure.contrib.jar"/>
- <arg value="clojure.contrib.java-utils"/>
- <arg value="clojure.contrib.javadoc.browse"/>
- <arg value="clojure.contrib.javadoc.browse-ui"/>
- <arg value="clojure.contrib.jmx"/>
- <arg value="clojure.contrib.json.read"/>
- <arg value="clojure.contrib.json.write"/>
- <arg value="clojure.contrib.lazy-seqs"/>
- <arg value="clojure.contrib.lazy-xml"/>
- <arg value="clojure.contrib.macro-utils"/>
- <arg value="clojure.contrib.macros"/>
- <arg value="clojure.contrib.map-utils"/>
- <arg value="clojure.contrib.math"/>
- <arg value="clojure.contrib.miglayout"/>
- <arg value="clojure.contrib.miglayout.internal"/>
- <arg value="clojure.contrib.mmap"/>
- <arg value="clojure.contrib.monads"/>
- <arg value="clojure.contrib.ns-utils"/>
- <arg value="clojure.contrib.pprint.ColumnWriter"/>
- <arg value="clojure.contrib.pprint.PrettyWriter"/>
- <arg value="clojure.contrib.pprint"/>
- <arg value="clojure.contrib.pprint.utilities"/>
- <arg value="clojure.contrib.probabilities.finite-distributions"/>
- <arg value="clojure.contrib.probabilities.monte-carlo"/>
- <arg value="clojure.contrib.probabilities.random-numbers"/>
- <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.server-socket"/>
- <arg value="clojure.contrib.set"/>
- <arg value="clojure.contrib.shell-out"/>
- <arg value="clojure.contrib.singleton"/>
- <arg value="clojure.contrib.sql"/>
- <arg value="clojure.contrib.sql.internal"/>
- <arg value="clojure.contrib.str-utils"/>
- <arg value="clojure.contrib.stream-utils"/>
- <arg value="clojure.contrib.swing-utils"/>
- <arg value="clojure.contrib.trace"/>
- <arg value="clojure.contrib.types"/>
- <arg value="clojure.contrib.with-ns"/>
- <arg value="clojure.contrib.zip-filter"/>
- <arg value="clojure.contrib.zip-filter.xml"/>
+ <arg line="${compile.namespaces}" />
</java>
</target>