forked from plaidgroup/plaid-lang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-common-new.xml
70 lines (62 loc) · 2.92 KB
/
build-common-new.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
This is the common build file for all of the build files in the sub-projects
for Plaid. It also is the place where all dependencies between all
sub-projects are imported. The build files in the sub-projects only have
to declare which folders they care about in terms of building (see
typechecker/build.xml for an example). All the dependencies are declared in
dependencies.xml.
See http://www.exubero.com/ant/dependencies.html for more information on
how and why the build infrastructure is laid out in this fashion.
-->
<project name="build-common-new" default="dist">
<import file="dependencies.xml" />
<target name="default" depends="dist" />
<target name="clean">
<echo message="${ant.project.name} - Cleaning up generated Java code..." />
<delete includeemptydirs="true">
<fileset dir="${JAVA.SRC}" includes="**/*" excludes=".placeholder" />
</delete>
<delete includeemptydirs="true">
<fileset dir="${COMPILE.BIN}" includes="**/*" excludes=".placeholder" />
</delete>
</target>
<target name="compile-plaid">
<echo message="${ant.project.name} - Compiling Plaid code..." />
<java classname="plaid.codegen.main" failonerror="true" fork="true" maxmemory="512m">
<classpath>
<pathelement path="${CLASSPATH}"/>
<pathelement location="../compilerjava/json_simple-1.1.jar"/>
</classpath>
<arg value="-o" />
<arg value="${basedir}/${JAVA.SRC}" />
<arg value="-d" />
<arg value="${basedir}/${PLAID.SRC}" />
<arg value="-p" />
<arg value="${PLAIDPATH}" />
<arg value="-k" />
<!-- <arg value="-g" /> enable for debugging -->
<arg value="-r" /> <!-- enable to pretty print -->
</java>
<!--
<eclipse.convertPath fileSystemPath="${basedir}/${JAVA.SRC}" property="resourcePath"/>
<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
<eclipse.convertPath fileSystemPath="${basedir}/${COMPILE.BIN}" property="resourcePath"/>
<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
-->
</target>
<target name="dist" depends="compile-plaid">
<echo message="${ant.project.name} - Compiling distributable..." />
</target>
<target name="clean.dependencies"
description="Deletes files created during the build (includes dependencies)">
<antcall target="depend.${ant.project.name}">
<param name="dependency.target" value="clean"/>
</antcall>
</target>
<target name="dist.dependencies">
<antcall target="depend.${ant.project.name}">
<param name="dependency.target" value="dist"/>
</antcall>
</target>
</project>