forked from timtadh/parsemis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
107 lines (85 loc) · 3.71 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
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
<?xml version="1.0" encoding="UTF-8" ?>
<project basedir="." default="all" name="parsemis">
<!-- BEGIN CONFIG -->
<!-- global location definitions -->
<property name="builddir" location="${basedir}/classes"/>
<property name="docdir" location="${basedir}/javadoc"/>
<property name="libdir" location="${basedir}/lib"/>
<property name="srcdir" location="${basedir}/src"/>
<property name="headdir" location="${basedir}/headers"/>
<!-- compiler -->
<property name="CC" value="/usr/bin/gcc" />
<!-- set classpath to build this project -->
<!-- $CLASSPATH is not used -->
<!-- ${builddir} is automatically part of the ant classpath to build this project -->
<path id="classpath">
<fileset dir="${libdir}" includes="**/*.jar"/>
<!-- $CLASSPATH environment variable -->
<pathelement path="${java.class.path}/"/>
</path>
<!-- END CONFIG -->
<!-- BEGIN PROPERTY DEFINITION -->
<!-- END PROPERTY DEFINITION -->
<!-- BEGIN TASKS -->
<target name="all" depends="javac" description="clean the project and build it again"/>
<target name="rebuild" depends="proper,javac" description="clean the project and build it again"/>
<target name="paths">
<mkdir dir="${docdir}"/>
<mkdir dir="${builddir}"/>
<mkdir dir="${headdir}"/>
</target>
<target name="clean" description="remove all class files of the project">
<delete includeEmptyDirs="true">
<fileset dir="${builddir}" includes="**/*"/>
<fileset file="${basedir}/${ant.project.name}.jar"/>
</delete>
</target>
<target name="proper" depends="clean" description="remove all unneed (temporary) files">
<delete includeEmptyDirs="true">
<!-- javadoc -->
<fileset dir="${docdir}" includes="**/*"/>
<!-- antlr -->
<fileset dir="${srcdir}/de/parsemis/parsers/antlr" includes="**/*.java"/>
</delete>
</target>
<target name="antlr" description="create all parsers">
<antlr target="${srcdir}/de/parsemis/parsers/antlr/Dot.g" outputdirectory="${srcdir}/de/parsemis/parsers/antlr">
<classpath path="${libdir}/antlr.jar"/>
</antlr>
</target>
<target name="javadoc" description="generate javadoc of the project">
<tstamp> <format property="builtday" pattern="yyyy-MM-dd"/> </tstamp>
<javadoc destdir="${docdir}" classpathref="classpath" source="1.5" Overview="${srcdir}/overview.html" windowtitle="ParSeMiS API">
<doctitle><![CDATA[ParSeMiS - Parallel and Sequencial Mining Suite<br/>API Specification]]></doctitle>
<header><![CDATA[<b>ParSeMiS (built ]]>${builtday}<![CDATA[)<br/>Parallel and Sequencial Mining Suite</b>]]></header>
<packageset dir="${srcdir}" defaultexcludes="yes"/>
</javadoc>
</target>
<target name="javac" depends="paths,antlr" description="build the project">
<tstamp/>
<javac srcdir="${srcdir}" destdir="${builddir}" classpathref="classpath" debug="on" source="1.5" target="1.5" deprecation="true" nowarn="true"/>
<!-- generate java native interfaces -->
<javah destdir="${headdir}" classpath="${builddir}">
<class name="de.parsemis.miner.environment.LocalEnvironment"/>
</javah>
<exec dir="${headdir}" executable="${CC}">
<arg line="-o ${libdir}/libjava-time.so -O
-shared -fPIC -I${JAVA_INCLUDE}
-I${JAVA_INCLUDE}/linux -I${headdir}
${srcdir}/de/parsemis/miner/environment/LocalEnvironment.c" />
</exec>
</target>
<target name="jar" depends="javac" description="create project jar">
<!-- create jar file -->
<jar destfile="${ant.project.name}.jar" basedir="${builddir}" index="true">
<manifest>
<!-- default attributes -->
<attribute name="Main-Class" value="de.parsemis.Miner"/>
<!-- selfdefined attributes -->
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Built-At" value="${TODAY}"/>
</manifest>
</jar>
</target>
<!-- END TASKS -->
</project>