forked from percyliang/sempre
-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.xml
120 lines (107 loc) · 5.23 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
108
109
110
111
112
113
114
115
116
117
118
119
120
<?xml version="1.0" encoding="UTF-8"?>
<project default="compile" name="semparse">
<!-- Set useful variables -->
<property name="target" value="1.8"/>
<property name="source" value="1.8"/>
<property name="root" value="."/>
<property name="src" location="${root}/src/"/>
<property name="classes" location="${root}/classes"/>
<property name="lib" location="${root}/lib"/>
<property name="libsempre" location="${root}/libsempre"/>
<path id="lib.path">
<fileset dir="${libsempre}" includes="*.jar"/>
<fileset dir="${lib}" includes="*.jar"/>
</path>
<!-- Create directories -->
<target name="init">
<exec executable="${root}/scripts/extract-module-classes.rb"/>
<mkdir dir="${classes}"/>
<mkdir dir="${libsempre}"/>
</target>
<!-- Compile -->
<target name="compile" depends="init">
<antcall target="compile.released"/>
</target>
<target name="compile.released" depends="init,core,cache,corenlp,freebase,tables,overnight,interactive"/>
<!-- Compile core -->
<target name="core" depends="init">
<echo message="Compiling ${ant.project.name}: core"/>
<mkdir dir="${classes}"/>
<javac srcdir="${src}" destdir="${classes}" classpathref="lib.path" debug="true" includeantruntime="false" source="${source}" target="${target}">
<include name="edu/stanford/nlp/sempre/*.java"/>
<include name="edu/stanford/nlp/sempre/test/"/>
</javac>
<jar destfile="${libsempre}/sempre-core.jar" basedir="${classes}" includes="edu/**"/>
</target>
<!-- Compile cache -->
<target name="cache" depends="init">
<echo message="Compiling ${ant.project.name}: cache"/>
<mkdir dir="${classes}/cache"/>
<javac srcdir="${src}" destdir="${classes}/cache" classpathref="lib.path" debug="true" includeantruntime="false" source="${source}" target="${target}">
<include name="edu/stanford/nlp/sempre/cache/"/>
</javac>
<jar destfile="${libsempre}/sempre-cache.jar" basedir="${classes}/cache"/>
</target>
<!-- Compile corenlp -->
<target name="corenlp" depends="init,core,cache">
<echo message="Compiling ${ant.project.name}: corenlp"/>
<mkdir dir="${classes}/corenlp"/>
<javac srcdir="${src}" destdir="${classes}/corenlp" classpathref="lib.path" debug="true" includeantruntime="false" source="${source}" target="${target}">
<include name="edu/stanford/nlp/sempre/corenlp/"/>
</javac>
<jar destfile="${libsempre}/sempre-corenlp.jar" basedir="${classes}/corenlp"/>
</target>
<!-- Compile freebase -->
<target name="freebase" depends="init,core,cache">
<echo message="Compiling ${ant.project.name}: freebase"/>
<mkdir dir="${classes}/freebase"/>
<javac srcdir="${src}" destdir="${classes}/freebase" classpathref="lib.path" debug="true" includeantruntime="false" source="${source}" target="${target}">
<include name="edu/stanford/nlp/sempre/freebase/"/>
</javac>
<jar destfile="${libsempre}/sempre-freebase.jar" basedir="${classes}/freebase"/>
</target>
<!-- Compile tables -->
<target name="tables" depends="init,core,corenlp">
<echo message="Compiling ${ant.project.name}: tables"/>
<mkdir dir="${classes}/tables"/>
<javac srcdir="${src}" destdir="${classes}/tables" classpathref="lib.path" debug="true" includeantruntime="false" source="${source}" target="${target}">
<include name="edu/stanford/nlp/sempre/tables/"/>
</javac>
<jar destfile="${libsempre}/sempre-tables.jar" basedir="${classes}/tables"/>
</target>
<!-- Compile overnight -->
<target name="overnight" depends="init,core">
<echo message="Compiling ${ant.project.name}: overnight"/>
<mkdir dir="${classes}/overnight"/>
<javac srcdir="${src}" destdir="${classes}/overnight" classpathref="lib.path" debug="true" includeantruntime="false" source="${source}" target="${target}">
<include name="edu/stanford/nlp/sempre/overnight/"/>
</javac>
<jar destfile="${libsempre}/sempre-overnight.jar" basedir="${classes}/overnight"/>
</target>
<!-- Compile interactive -->
<target name="interactive" depends="init,core">
<echo message="Compiling ${ant.project.name}: interactive"/>
<mkdir dir="${classes}/interactive"/>
<javac srcdir="${src}" destdir="${classes}/interactive" classpathref="lib.path" debug="true" includeantruntime="false" source="${source}" target="${target}">
<include name="edu/stanford/nlp/sempre/interactive/"/>
</javac>
<jar destfile="${libsempre}/sempre-interactive.jar" basedir="${classes}/interactive"/>
</target>
<!-- Compile geo880 -->
<target name="geo880" depends="init,core,corenlp,tables">
<echo message="Compiling ${ant.project.name}: geo880"/>
<mkdir dir="${classes}/geo880"/>
<javac srcdir="${src}" destdir="${classes}/geo880" classpathref="lib.path" debug="true" includeantruntime="false" source="${source}" target="${target}">
<include name="edu/stanford/nlp/sempre/geo880/"/>
</javac>
<jar destfile="${libsempre}/sempre-geo880.jar" basedir="${classes}/geo880"/>
</target>
<!-- Clean up -->
<target name="clean">
<delete includeemptydirs="true" quiet="true">
<fileset dir="${classes}" followsymlinks="false"/>
<fileset dir="${libsempre}" followsymlinks="false"/>
<fileset file="module-classes.txt" followsymlinks="false"/>
</delete>
</target>
</project>