forked from olabini/ioke
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
187 lines (161 loc) · 6.54 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<?xml version="1.0" encoding="utf-8"?>
<project basedir="." default="jar" name="ioke">
<description>
ioke is a next generation language, based on Io, Self, Smalltalk, Ruby and Lisp
</description>
<property file="build.properties"/>
<property file="default.build.properties"/>
<taskdef resource="tasks.properties">
<classpath>
<fileset dir="${lib.build.dir}" includes="*.jar"/>
</classpath>
</taskdef>
<path id="build.classpath">
<fileset dir="${lib.build.dir}" includes="*.jar"/>
<fileset dir="${lib.release.dir}" includes="*.jar"/>
</path>
<target name="prepare" description="Creates the directories needed for building">
<mkdir dir="${build.dir}"/>
<mkdir dir="${coverage.dir}"/>
<mkdir dir="${classes.dir}"/>
</target>
<target name="generate_filters" depends="prepare" description="Generates source files">
<exec executable="ruby" input="generate_filter_data.rb" failonerror="false" failifexecutionfails="false"/>
</target>
<target name="compile" depends="generate_filters" description="Compile the source files for the project.">
<filter filtersfile="version_data.properties"/>
<filter token="VERSION" value="P"/>
<filter token="VERSION_RUNTIME" value="0.4.1-SNAPSHOT"/>
<filter token="VERSION_STRING" value="Ioke P ikj 0.4.1-SNAPSHOT"/>
<javac destdir="${classes.dir}" debug="true" source="${javac.version}" target="${javac.version}" encoding="UTF-8">
<classpath refid="build.classpath"/>
<src path="${src.dir}"/>
<include name="**/*.java"/>
</javac>
<copy todir="${classes.dir}" filtering="true" overwrite="true">
<fileset dir="${src.dir}" includes="**/*.properties"/>
</copy>
<copy todir="${classes.dir}">
<fileset dir="${src.raw.dir}" includes="builtin/**/*.ik"/>
<fileset dir="${src.raw.dir}/ikj" includes="builtin/**/*.ik"/>
</copy>
</target>
<target name="coverage.instrument" depends="compile" description="">
<cobertura-instrument todir="${coverage.classes.dir}">
<fileset dir="${classes.dir}" excludes="ioke/lang/parser/**/*.class"/>
</cobertura-instrument>
</target>
<target name="test" depends="compile" description="Runs all ISpec tests">
<java classname="ioke.lang.Main" fork="true" failonerror="true" maxmemory="256m">
<sysproperty key="ispec.ansi" value="${ispec.ansi}"/>
<classpath refid="build.classpath"/>
<classpath path="${classes.dir}"/>
<arg line="bin/ispec test -fs"/>
</java>
</target>
<target name="coverage" depends="coverage.instrument" description="Runs all ISpec tests using Cobertura and produces a report">
<java classname="ioke.lang.Main" fork="true" failonerror="true">
<classpath refid="build.classpath"/>
<classpath path="${coverage.classes.dir}"/>
<classpath path="${classes.dir}"/>
<arg line="bin/ispec test -fs"/>
</java>
<cobertura-report srcdir="${src.dir}" destdir="${coverage.report.dir}"/>
</target>
<target name="jar" depends="test" description="Create the ioke.jar file">
<jar destfile="${lib.dir}/ioke.jar">
<fileset dir="${classes.dir}">
<include name="**/*.class"/>
<include name="**/*.ik"/>
<include name="**/*.properties"/>
</fileset>
<zipfileset src="${lib.release.dir}/jline-0.9.93.jar" includes="**/*"/>
<zipfileset src="${lib.release.dir}/joda-time-1.6.jar" includes="**/*"/>
<zipfileset src="${lib.release.dir}/asm-3.1.jar" includes="**/*"/>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="ioke.lang.Main"/>
</manifest>
</jar>
</target>
<target name="jar-lib" depends="jar" description="Create the ioke-lib.jar file">
<jar destfile="${lib.dir}/ioke-lib.jar">
<fileset dir="lib/ioke">
<include name="**/*"/>
</fileset>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
</manifest>
</jar>
</target>
<target name="jar-notest" depends="compile" description="Create the ioke.jar file">
<jar destfile="${lib.dir}/ioke.jar">
<fileset dir="${classes.dir}">
<include name="**/*.class"/>
<include name="**/*.ik"/>
<include name="**/*.properties"/>
</fileset>
<zipfileset src="${lib.release.dir}/jline-0.9.93.jar" includes="**/*"/>
<zipfileset src="${lib.release.dir}/joda-time-1.6.jar" includes="**/*"/>
<zipfileset src="${lib.release.dir}/asm-3.1.jar" includes="**/*"/>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="ioke.lang.Main"/>
</manifest>
</jar>
</target>
<target name="jar-lib-notest" depends="jar-notest" description="Create the ioke-lib.jar file">
<jar destfile="${lib.dir}/ioke-lib.jar">
<fileset dir="lib/ioke">
<include name="**/*"/>
</fileset>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
</manifest>
</jar>
</target>
<target name="dist-bin" depends="jar">
<tar destfile="${release.dir}/ioke-P-ikj-0.4.1-SNAPSHOT.tar.gz" compression="gzip">
<tarfileset mode="755" dir="." prefix="ioke">
<include name="bin/*.bat"/>
<include name="bin/dokgen"/>
<include name="bin/ioke"/>
<include name="bin/ispec"/>
</tarfileset>
<tarfileset dir="." prefix="ioke">
<include name="lib/ioke*.jar"/>
<include name="lib/ioke/**"/>
<include name="dok/**"/>
<include name="share/**"/>
<include name="COPYING"/>
<include name="LICENSE"/>
<include name="LICENSE.kawa"/>
<include name="README"/>
</tarfileset>
</tar>
<zip destfile="${release.dir}/ioke-P-ikj-0.4.1-SNAPSHOT.zip">
<zipfileset filemode="755" dir="." prefix="ioke">
<include name="bin/*.bat"/>
<include name="bin/dokgen"/>
<include name="bin/ioke"/>
<include name="bin/ispec"/>
</zipfileset>
<zipfileset dir="." prefix="ioke">
<include name="lib/ioke*.jar"/>
<include name="lib/ioke/**"/>
<include name="dok/**"/>
<include name="share/**"/>
<include name="COPYING"/>
<include name="LICENSE"/>
<include name="LICENSE.kawa"/>
<include name="README"/>
</zipfileset>
</zip>
</target>
<target name="dist" depends="dist-bin"/>
<target name="clean" description="clean almost everything">
<delete dir="${build.dir}"/>
<delete file="${lib.dir}/ioke.jar" quiet="true"/>
<delete file="${lib.dir}/ioke-lib.jar" quiet="true"/>
</target>
</project>