1 <!-- Simple Ant build script to test an Ant installation -->
2 <project name="TestInstall" default="all" basedir=".">
3 <property environment="env" />
4 <property name="src" value="." />
5 <property name="build" value=".build" />
6 <property name="build-lib" value="${build}/lib" />
7 <property name="build-tests" value="${build}/tests" />
8 <property name="jarfile" value="${build}/metux-java.jar" />
9 <property name="jar_install_dir" value="${env.HOME}/.jar" />
11 <target name="compile-lib-util">
12 <mkdir dir="${build-lib}" />
13 <javac destdir="${build-lib}" srcdir="${src}/util" debug="on" classpath=".">
14 <include name="CachedDatasource.java"/>
15 <include name="CmdLineSplitter.java"/>
16 <!-- <include name="Decompressor.java"/> -->
17 <include name="Depend.java"/>
18 <include name="Environment.java"/>
19 <include name="Exec.java"/>
20 <include name="Filename.java"/>
21 <include name="FileOps.java"/>
22 <include name="FileStock.java"/>
23 <include name="HTMLEntities.java"/>
24 <!-- <include name="IPTools.java"/> -->
25 <include name="LoadFile.java"/>
26 <include name="PathNormalize.java"/>
27 <include name="PathNormalizer.java"/>
28 <!-- <include name="SendMail.java"/> -->
29 <include name="ShellEscape.java"/>
30 <include name="ShellVariableDef.java"/>
31 <include name="SimpleSMTPClient.java"/>
32 <include name="StoreFile.java"/>
33 <include name="StrReplace.java"/>
34 <include name="StrSplit.java"/>
35 <include name="StrUtil.java"/>
36 <include name="Stringtable.java"/>
37 <include name="Terminal.java"/>
38 <include name="TextDB.java"/>
39 <include name="TextTable.java"/>
40 <include name="URLDownloader.java"/>
41 <include name="URLEncode.java"/>
42 <include name="UniqueNameList.java"/>
43 <include name="UniqueValues.java"/>
44 <include name="VFile.java"/>
45 <include name="Version.java"/>
46 <include name="VersionStack.java"/>
47 <include name="mkdir.java"/>
48 <include name="rm.java"/>
49 <include name="SQL_Encode.java"/>
53 <target name="compile-lib-log" depends="compile-lib-util">
54 <mkdir dir="${build-lib}" />
55 <javac destdir="${build-lib}" srcdir="${src}/log" debug="on" classpath="${build-lib}">
56 <include name="LoggerDummy.java"/>
57 <include name="ILogger.java"/>
58 <include name="LoggerASCII.java"/>
59 <include name="LoglevelID.java"/>
60 <include name="LoggerTerm.java"/>
64 <target name="compile-lib-propertylist" depends="compile-lib-util">
65 <mkdir dir="${build-lib}" />
66 <javac destdir="${build-lib}" srcdir="${src}/propertylist" debug="on" classpath="${build-lib}">
67 <include name="EProcessingError.java"/>
68 <include name="FallbackPropertylist.java"/>
69 <include name="EVariableParseError.java"/>
70 <include name="IPropertylist.java"/>
71 <include name="Propertylist.java"/>
72 <include name="EBrokenBoolRepresentation.java"/>
73 <include name="IPostprocessor.java"/>
74 <include name="EInfiniteRecursion.java"/>
75 <include name="EIllegalValue.java"/>
79 <target name="compile-tests" depends="link-lib,compile-lib-util,compile-lib-log,compile-lib-propertylist">
80 <mkdir dir="${build-tests}" />
81 <javac destdir="${build-tests}" srcdir="${src}/tests" debug="on" classpath="${jarfile}">
82 <include name="_test_util.java"/>
83 <include name="_test_log.java"/>
87 <target name="link-lib" depends="compile-lib">
88 <jar jarfile="${jarfile}" basedir="${build-lib}"/>
91 <target name="run-tests" depends="compile-tests">
92 <java classname="_test_util" classpath="${jarfile}:${build-tests}" />
93 <java classname="_test_log" classpath="${jarfile}:${build-tests}" />
96 <target name="compile-lib" depends="compile-lib-util,compile-lib-log,compile-lib-propertylist" />
98 <target name="compile" depends="compile-lib" />
99 <target name="all" depends="compile,run-tests" />
101 <target name="clean">
102 <delete dir="${build-tests}" />
103 <delete dir="${build-lib}" />
104 <delete dir="${build}" />
105 <delete file="${jarfile}" />
108 <target name="install" depends="compile,run-tests">
109 <mkdir dir="${jar_install_dir}" />
110 <copy file="${jarfile}" todir="${jar_install_dir}" />