-
Notifications
You must be signed in to change notification settings - Fork 10
/
core.xml
215 lines (190 loc) · 7.08 KB
/
core.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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<project name="core" basedir=".">
<!-- The core build tasks for Hecl -->
<!-- compile targets -->
<target name="initCompile" description="Initialize compilation">
<mkdir dir="${buildprefix}" />
<mkdir dir="${relprefix}" />
<mkdir dir="${j2me.build}" />
<mkdir dir="${j2me.pre}" />
<mkdir dir="${j2me.rel}" />
<mkdir dir="${j2se.build}" />
<mkdir dir="${j2se.pre}" />
<mkdir dir="${j2se.rel}" />
<mkdir dir="${j2me.mwtbuild}" />
<mkdir dir="${j2me.mwtpre}" />
<mkdir dir="${j2me.mwtrel}" />
</target>
<target name="compileCore"
depends="initCompile"
description="Compile core Hecl functionality">
<mkdir dir="${j2se.pre}/core"/>
<wtkpreprocess srcdir="core" destdir="${j2se.pre}/core" symbols="${j2se.defines}"/>
<!-- We need to include the "java" package in the compile, because the j2se version of Hecl uses
it: -->
<wtkpreprocess srcdir="java" destdir="${j2se.pre}/core" symbols="${j2se.defines}"/>
<javac srcdir="${j2se.pre}/core" destdir="${j2se.build}" debug="${hecldebug}" >
<classpath refid="classpath"/>
<classpath path="jars/jline-0.9.94.jar"></classpath>
</javac>
</target>
<target name="compileApplet"
depends="initCompile,compileCore,compileJava"
description="Compile Hecl applet">
<javac srcdir="applet"
destdir="${j2se.build}"
debug="${hecldebug}"
>
<classpath refid="j2se.coreclasspath"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="compileFiles"
depends="initCompile,compileCore"
description="Compile Hecl files support">
<wtkpreprocess srcdir="files" destdir="${j2se.pre}/files" symbols="${j2se.defines}"/>
<javac srcdir="${j2se.pre}/files"
destdir="${j2se.build}"
debug="${hecldebug}">
<classpath refid="j2se.coreclasspath"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="compileLoad"
depends="initCompile,compileCore,compileFiles"
description="Compile Hecl load (classloader) support">
<mkdir dir="${j2se.build}/load"/>
<mkdir dir="${j2se.pre}"/>
<wtkpreprocess srcdir="load" destdir="${j2se.pre}/load"
symbols="${j2se.defines}"/>
<javac srcdir="${j2se.pre}/load"
destdir="${j2se.build}"
debug="${hecldebug}"
>
<classpath refid="j2se.coreclasspath"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="compileHttp"
description="Compile J2SE Hecl http support"
depends="initCompile,compileCore">
<mkdir dir="${j2se.build}"/>
<mkdir dir="${j2se.pre}/net"/>
<wtkpreprocess srcdir="net" destdir="${j2se.pre}/net"
symbols="${j2se.defines}"/>
<javac srcdir="${j2se.pre}/net"
destdir="${j2se.build}"
debug="${hecldebug}">
<classpath refid="j2se.coreclasspath"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="compileJava" description="Compile Java integration"
depends="initCompile,compileCore">
<mkdir dir="${j2se.pre}/java"/>
<wtkpreprocess srcdir="java" destdir="${j2se.pre}/java"
symbols="${j2se.defines}"/>
<javac srcdir="${j2se.pre}/java"
destdir="${j2se.build}"
debug="${hecldebug}">
<classpath refid="j2se.coreclasspath"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="compileCommandline"
description="Compile Hecl command line support"
depends="initCompile,compileCore,compileHttp,compileLoad,compileJava,compileFiles">
<javac srcdir="commandline"
destdir="${j2se.build}"
debug="${hecldebug}">
<classpath refid="j2se.coreclasspath"/>
<classpath refid="classpath"/>
<classpath path="jars/jline-0.9.94.jar"></classpath>
</javac>
</target>
<target name="packageJarHack">
<mkdir dir="${j2se.build}/jarhack" />
<javac srcdir="jarhack" destdir="${j2se.build}/jarhack">
<classpath path="jars/commons-cli-1.1.jar" />
</javac>
<jar destfile="jars/JarHack.jar" basedir="${j2se.build}/jarhack">
<zipfileset src="jars/commons-cli-1.1.jar" includes="org/apache/commons/cli/*.class"/>
<manifest>
<attribute name="Main-Class" value="org/hecl/jarhack/JarHack"></attribute>
</manifest>
</jar>
</target>
<target name="packageAppletTweak">
<mkdir dir="${j2se.build}/applettweak" />
<javac srcdir="applettweak" destdir="${j2se.build}/applettweak">
<classpath path="jars/microemulator.jar" />
</javac>
<jar destfile="jars/AppletTweak.jar" basedir="${j2se.build}/applettweak">
<zipfileset src="jars/microemulator.jar"/>
<manifest>
<attribute name="Main-Class" value="org/hecl/applettweak/AppletTweak"></attribute>
</manifest>
</jar>
</target>
<!-- package targets -->
<!-- Build a jar containing the hecl core. -->
<target name="packageLib"
description="Create Jar for Hecl lib"
depends="compileCommandline,compileHttp"
>
<jar destfile="${j2se.hecl.lib.jar}"
basedir="${j2se.build}"
excludes="**jad,**jar,Hecl.class,StandaloneHecl.class,*html"
update="true">
<manifest>
<attribute name="Main-Class" value="notused"/>
</manifest>
</jar>
</target>
<!-- Build the command line package. We first add the core stuff,
then add the Hecl command line target. -->
<target name="packageCommandline"
description="Create Jar for command line Hecl"
depends="compileCommandline,compileHttp,packageLib">
<unjar src="jars/jline-0.9.94.jar" dest="${j2se.build}" />
<jar destfile="${j2se.hecl.cmdline.jar}"
basedir="${j2se.build}"
excludes="**jad,**jar,StandaloneHecl.class,*html,**/applet/**,**/applettweak/**,**/jarhack/**"
update="true">
<manifest>
<attribute name="Main-Class" value="Hecl"/>
</manifest>
</jar>
<copy file="${j2se.hecl.cmdline.jar}" todir="${j2se.rel}"/>
</target>
<target name="packageStandalone"
description="Create Jar for standalone Hecl"
depends="compileCommandline,compileHttp,packageLib">
<jar destfile="${j2se.hecl.stand.jar}"
basedir="${j2se.build}"
excludes="**jad,**jar,Hecl.class,*html,**/applet/**"
update="true">
<manifest>
<attribute name="Main-Class" value="StandaloneHecl"/>
</manifest>
</jar>
<copy file="${j2se.hecl.stand.jar}" todir="${j2se.rel}"/>
</target>
<target name="packageJARs" description="Create Jar distributions of the sources"
depends="packageCommandline,packageStandalone">
</target>
<!-- !!! next target needs some work !!! -->
<target name="packageApplet" description="Create HTML applet structure"
depends="packageJARs,compileApplet">
<jar destfile="${j2se.hecl.applet.jar}"
basedir="${j2se.build}" update="true"
excludes="**jad,**jar,*class,*html"/>
<copy file="HTML/applet.html" tofile="${j2se.build}/applet.html"/>
<copy file="HTML/applet.html" todir="${j2se.rel}"/>
<copy file="${j2se.hecl.applet.jar}" todir="${j2se.rel}"/>
</target>
<target name="tests" description="Run Tests" depends="packageCommandline">
<java fork="true" jar="jars/j2se/Hecl.jar">
<arg value="tests/suite.hcl"></arg>
</java>
</target>
</project>