forked from mhajiloo/berkeleyaligner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·78 lines (62 loc) · 2.82 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
<project name="Berkeley Aligner" default="distribute-clean" basedir=".">
<property name="src" value="./src/" />
<property name="build.dir" value="./classes/" />
<property name="dist.dir" value="./distribution/" />
<property name="jarfile" value="berkeleyaligner.jar" />
<property name="manifest" value="./resources/Manifest.mf" />
<property name="dist.readme" value="./resources/distribution_readme.txt" />
<property name="dist.conf" value="./resources/example_conf.txt" />
<property name="dist.syntactic.conf" value="./resources/example_syntactic_conf.txt" />
<property name="dist.runscript" value="./resources/run_script.sh" />
<property name="example.dir" value="./resources/example/" />
<property name="dist.example.dir" value="${dist.dir}/example/" />
<property name="doc.dir" value="./documentation/" />
<property name="dist.doc.dir" value="${dist.dir}/documentation/" />
<property name="distfile" value="./berkeleyaligner" />
<property name="tarfile" value="${distfile}.tar" />
<property name="gzipfile" value="${tarfile}.gz" />
<property name="srcfile" value="${distfile}-src" />
<property name="srctarfile" value="${srcfile}.tar" />
<property name="srcgzipfile" value="${srctarfile}.gz" />
<target name="distribute-clean" depends="clean, distribute" />
<target name="package-source" depends="clean">
<tar destfile="${srcgzipfile}" compression="gzip">
<tarfileset prefix="berkeleyaligner" dir="${basedir}" excludes="private/**"/>
</tar>
</target>
<target name="init-distribute">
<mkdir dir="${dist.dir}" />
<mkdir dir="${dist.example.dir}" />
<mkdir dir="${dist.doc.dir}" />
</target>
<target name="distribute" depends="compile, init-distribute">
<jar destfile="${dist.dir}/${jarfile}" basedir="${build.dir}" manifest="${manifest}" />
<copy todir="${dist.example.dir}" overwrite="false">
<fileset dir="${example.dir}" />
</copy>
<copy todir="${dist.doc.dir}" overwrite="false">
<fileset dir="${doc.dir}" />
</copy>
<copy file="${dist.readme}" tofile="${dist.dir}/README" overwrite="false" />
<copy file="${dist.conf}" tofile="${dist.dir}/example.conf" overwrite="false" />
<copy file="${dist.syntactic.conf}" tofile="${dist.dir}/example_syntactic.conf" overwrite="false" />
<copy file="${dist.runscript}" tofile="${dist.dir}/align" overwrite="false" />
<chmod file="${dist.dir}/align" perm="755" />
<tar destfile="${gzipfile}" compression="gzip">
<tarfileset prefix="berkeleyaligner" dir="${dist.dir}" />
</tar>
</target>
<target name="compile">
<mkdir dir="${build.dir}" />
<javac srcdir="${src}" destdir="${build.dir}" optimize="on" debug="on">
<classpath>
<pathelement location="${build.dir}" />
</classpath>
</javac>
</target>
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete file="${gzipfile}" />
</target>
</project>