-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
171 lines (144 loc) · 5.27 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<!--
This is the Apache Ant build file for Jif IDE.
Targets are public (i.e., intended to be callable by the user) if and only if
they have a description attribute. Public targets will show up when the user
runs "ant -p". Internal targets should not have description attributes!
-->
<project name="jif-ide" default="compile" basedir=".">
<description>
Jif IDE build file
</description>
<!-- Import common definitions. -->
<import file="${basedir}/common.xml"/>
<!-- Source directory -->
<property name="src" location="${jif-ide.home}/src"/>
<!-- Directory for class files -->
<property name="classes" location="${jif-ide.home}/classes"/>
<!--
****************************************************************************
Configuration targets.
****************************************************************************
-->
<!-- Main configuration target. -->
<target name="configure"
description="Configures Jif IDE"
depends="configure-buildstring">
<echo message="Jif home directory is ${jif.home}"/>
<echo message="Polyglot IDE home directory is ${polyglot-ide.home}"/>
<echo message="Eclipse home directory is ${eclipse.home}"/>
<echo message="Jif IDE version is ${jif-ide.version.build}"/>
</target>
<!-- Configures Eclipse's .classpath file. -->
<target name="eclipse"
description="Configures Eclipse's .classpath file">
<copy file="${jif-ide.home}/eclipse/classpath.in"
tofile="${jif-ide.home}/.classpath"/>
</target>
<!--
____________________________________________________________________________
Configuration helper targets.
-->
<target name="configure-buildstring" unless="jif-ide.version.build">
<tstamp>
<format property="now" timezone="America/New_York"
pattern="yyyy-MM-dd HH:mm:ss z"/>
</tstamp>
<property name="jif-ide.version.build"
value="${jif-ide.version} (${now})"/>
</target>
<!--
****************************************************************************
Targets for cleaning up the directory tree.
****************************************************************************
-->
<target name="clean" description="Cleans up the directory tree">
<delete dir="${classes}"/>
</target>
<target name="clobber"
depends="clean"
description="Cleans up the directory tree"/>
<!--
****************************************************************************
Compilation targets.
****************************************************************************
-->
<!-- Main target for compiling Jif IDE -->
<target name="compile"
depends="init,eclipse"
description="Compile the plugin">
<javac source="1.7"
target="1.7"
debug="on"
srcdir="${src}"
destdir="${classes}"
includeAntRuntime="false">
<include name="**/*.java"/>
<sourcepath path="${src}"/>
<classpath>
<path refid="jif.classpath"/>
<path refid="polyglot-ide.classpath"/>
<path refid="eclipse.classpath"/>
</classpath>
</javac>
</target>
<!--
____________________________________________________________________________
Compilation helper targets.
-->
<!-- Initializes the build -->
<target name="init" depends="configure">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${classes}"/>
</target>
<!--
****************************************************************************
Version-management targets
****************************************************************************
-->
<target name="bump-version">
<antcall target="bump-patch"/>
</target>
<target name="bump-major">
<propertyfile file="${jif-ide.home}/version.properties">
<entry key="version.major" type="int" operation="+" value="1"
pattern="0"/>
<entry key="version.minor" type="int" value="0"/>
<entry key="version.patch" type="int" value="0"/>
</propertyfile>
<!-- Regenerate version files -->
<antcall target="gen-version" inheritAll="false"/>
</target>
<target name="bump-minor">
<propertyfile file="${jif-ide.home}/version.properties">
<entry key="version.minor" type="int" operation="+" value="1"
pattern="0"/>
<entry key="version.patch" type="int" value="0"/>
</propertyfile>
<!-- Regenerate version files -->
<antcall target="gen-version" inheritAll="false"/>
</target>
<target name="bump-patch">
<propertyfile file="${jif-ide.home}/version.properties">
<entry key="version.patch" type="int" operation="+" value="1"
pattern="0"/>
</propertyfile>
<!-- Regenerate version files -->
<antcall target="gen-version" inheritAll="false"/>
</target>
<!--
____________________________________________________________________________
Version-management helper targets.
-->
<!-- Generates version files in the source tree. -->
<target name="gen-version" depends="configure-buildstring">
<manifest file="${jif-ide.home}/META-INF/MANIFEST.MF" mode="update">
<attribute name="Bundle-Version"
value="${jif-ide.version.major}.${jif-ide.version.minor}.${jif-ide.version.patch}"/>
</manifest>
</target>
</project>
<!--
vim: ts=2 sw=2 ai et
-->