-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.xml
706 lines (628 loc) · 25.4 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
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
<?xml version="1.0"?>
<!-- A build file for use by Ant to build Kawa. -->
<!-- Requires Ant 1.6.3 -->
<project name="Kawa" default="default" basedir=".">
<!-- Give the user a chance to override the defaults. -->
<property file="build.properties"/>
<property name="version.release" value="1.11"/>
<property name="version.local" value=""/>
<property name="version" value="${version.release}${version.local}"/>
<property name="debug" value="true" />
<property name="deprecation" value="false" />
<property name="optimize" value="true" />
<!--
There was some discussion of using user.dir as a default here.
The most promising use being for dist.dir (and maybe build.dir).
But I decided against that for several reasons:
1) Consistency (don't make a special case).
2) The user.dir property isn't reliable (some bad JVMs out there).
3) Ant is not able to handle both absolute and relative paths
for commandline arguments based on user.dir. Ant automatically
handles relative paths relative to basedir, not user.dir.
As a result, if dist.dir defaulted to user.dir,
"ant -buildfile ../kawa/build.xml" and
"ant -buildfile ../kawa/build.xml -Ddist.dir=."
would produce different results.
4) The value of user.dir is not useful when using a Java IDE
(like NetBeans or JBuilder) since it is the directory that
happened to be current when the IDE started.
So, the only way to use Ant where the current directory (user.dir)
is not the directory containing the buildfile, you *must* supply
absolute paths as arguments. That is:
"ant -buildfile ../kawa/build.xml -Ddist.dir=`pwd`/."
The exception is Ant's arguments themselves, which are processed
as plain Java files and so are relative to the current directory.
-->
<property name="src.dir" value="${basedir}"/>
<property name="build.dir" value="${basedir}"/>
<property name="dist.dir" value="${build.dir}"/>
<property name="build.tools" value="${build.dir}/tools"/>
<property name="build.tmp" value="${build.dir}/tmp"/>
<property name="build.preprocessed" value="${build.dir}"/>
<property name="build.classes" value="${build.dir}"/>
<property name="dist.kawa.jar" value="${dist.dir}/kawa-${version}.jar"/>
<!--
Set preprocess.overwrite true to force preprocessing.
Eventually this will be dependency checked.
For now use "ant clean" if anything changes.
-->
<property name="preprocess.overwrite" value="false"/>
<!--
MIT App Inventor 2 : Build Kawa
-->
<target name="appinventor" depends="select-java5, select-android, classes, jar" />
<target name="all" depends="classes, jar"/>
<target name="default" depends="select-java-auto, classes, jar"/>
<target name="classes"
depends="java-classes, lib-scm-classes
, slib-scm-classes, commonlisp-scm-classes, brl-classes
, xml-classes, servlet-classes, jemacs-classes, android-classes" />
<!--
These are the files that are Kawa.
They go in the classpath, jar, and are deleted by clean.
If additional files (resources like properties and the
like) are added, something will need to be done so that
clean will still work when build.classes=src.dir.
-->
<fileset id="build.classes" dir="${build.classes}">
<include name="gnu/**/*.class"/>
<include name="kawa/**/*.class"/>
</fileset>
<!--
These are the files that are preprocessed before compiling.
In order to allow them to be mixed with the original source,
we must list them each here.
-->
<fileset id="build.preprocessed" dir="${build.preprocessed}">
<include name="kawa/Version.java"/>
</fileset>
<fileset id="build.selectjava" dir="${src.dir}">
<include name="**/*.java"/>
<or>
<contains text="BEGIN JAVA" casesensitive="true"/>
<contains text=" #endif " casesensitive="true"/>
</or>
</fileset>
<target name="run" depends="classes">
<java taskname="kawa" classname="kawa.repl" classpath="${build.classes}" fork="true"/>
</target>
<target name="runw" depends="classes">
<java taskname="kawa" fork="true"
classname="kawa.repl" classpath="${build.classes}">
<arg value="-w"/>
</java>
</target>
<!--
This is part of an "if" trick. Do not change me.
The "if" attribute for tasks is not true if the property is not
set at all, not whether the value is "true" or "false".
So here we use the value of the with- or enable- properties
and rely on true being "true" with this property defined,
and false being "false" with that property not defined.
-->
<property name="true" value="true"/>
<target name="build-settings" depends="build-tools">
<!-- If java.awt.Component is in the classpath, then we'll compile the
AWT UI, unless you override the setting of with-awt. -->
<condition property="with-awt" else="false">
<available classname="java.awt.Component"/>
</condition>
<!-- If org.xml.sax.ContentHandler is in the classpath, then we'll compile
in SAX2 support, unless you override the setting of with-sax2. -->
<condition property="with-sax2" else="false">
<available classname="org.xml.sax.ContentHandler"/>
</condition>
<!-- If java.awt.Component is in the classpath, then we'll compile the
JEmacs Swing UI, unless you override the setting of with-swing. -->
<condition property="with-swing" else="false">
<available classname="javax.swing.JComponent"/>
</condition>
<!-- JEmacs stuff is compiled if Swing is used, unless enable-jemacs is false.
-->
<property name="enable-jemacs" value="false"/>
<property name="enable-xml" value="true"/>
<property name="enable-brl" value="false"/>
<property name="enable-android" value="false"/>
<!-- If javax.servlet.http.HttpServlet is in the classpath, then we'll
compile Kawa' servlet interface, unless you override enable-servlet.
The servlet code uses methods from the 2.3 specification now.
So test for a class that is new for the 2.3 API. -->
<condition property="enable-servlet" else="false">
<available classname="javax.servlet.Filter"/>
</condition>
<condition property="preprocess-xml" value="+enable:XML" else="-enable:XML">
<istrue value="${enable-xml}"/>
</condition>
<condition property="preprocess-HttpServer" value="+use:com.sun.net.httpserver"
else="-use:com.sun.net.httpserver">
<available classname="com.sun.net.httpserver.HttpServer"/>
</condition>
<echo>
version=${version}
dist.kawa.jar=${dist.kawa.jar}
build.dir=${build.dir}
with-awt=${with-awt}
with-swing=${with-swing}
with-sax2=${with-sax2}
enable-jemacs=${enable-jemacs}
enable-xml=${enable-xml}
enable-servlet=${enable-servlet}
enable-android=${enable-android}
</echo>
<!--
This dummy copy is just so we can reference the sets by id.
This is needed because we are not able to put linestrippersets
in a task or project the way we can with filtersets.
Ant gives "Overriding previous definition of reference to..."
warnings. Can't seem to avoid that.
-->
<xcopy dataOnly="true">
<linestripperset id="strip-char-subs">
<linestripper first="if CHAR is byte" last="endif CHAR is byte" />
</linestripperset>
</xcopy>
</target>
<target name="build-tools">
<mkdir dir="${build.tools}"/>
<mkdir dir="${build.tmp}"/>
<!--
This didn't work in NetBeans for some reason.
(Even the includejavaruntime/includeantruntime attributes do no good.
The really weird thing is that NetBeans has access to the classes
for autocomplete and the scripting window. Oh well.)
The workaround is to link to ant.jar.
-->
<javac srcdir="${src.dir}"
destdir="${build.tools}"
classpath="lib/ext/ant.jar"
debug="${debug}"
deprecation="${deprecation}"
optimize="${optimize}">
<include name="gnu/kawa/util/PreProcess.java"/>
<include name="gnu/kawa/ant/*.java"/>
</javac>
<taskdef name="xcopy"
classname="gnu.kawa.ant.XCopy"
classpath="${build.tools}"/>
<taskdef name="kawac"
classname="gnu.kawa.ant.Kawac"
classpath="${build.tools}"/>
<!--
This doesn't really help us because user data
definitions don't seem to be possible.
<typedef name="linestripperset"
classname="gnu.kawa.ant.LineStripperSet"
classpath="${build.tools}"/>
-->
</target>
<target name="select-java1" depends="build-settings">
<pathconvert property="fileList" pathSep=" " dirSep="${file.separator}">
<path><fileset refid="build.selectjava"/></path>
</pathconvert>
<java classname="gnu.kawa.util.PreProcess">
<classpath location="${build.tools}"/>
<arg line="%java1 ${preprocess-xml} -use:com.sun.net.httpserver"/>
<arg line="${fileList}"/>
</java>
</target>
<target name="select-java2" depends="build-settings">
<pathconvert property="fileList" pathSep=" " dirSep="${file.separator}">
<path><fileset refid="build.selectjava"/></path>
</pathconvert>
<java classname="gnu.kawa.util.PreProcess">
<classpath location="${build.tools}"/>
<arg line="%java2 ${preprocess-xml} -use:com.sun.net.httpserver"/>
<arg line="${fileList}"/>
</java>
</target>
<target name="select-java4" depends="build-settings">
<pathconvert property="fileList" pathSep=" " dirSep="${file.separator}">
<path><fileset refid="build.selectjava"/></path>
</pathconvert>
<java classname="gnu.kawa.util.PreProcess">
<classpath location="${build.tools}"/>
<arg line="%java4 ${preprocess-xml} -use:com.sun.net.httpserver"/>
<arg line="${fileList}"/>
</java>
</target>
<target name="select-java5" depends="build-settings">
<pathconvert property="fileList" pathSep=" " dirSep="${file.separator}">
<path><fileset refid="build.selectjava"/></path>
</pathconvert>
<java classname="gnu.kawa.util.PreProcess">
<classpath location="${build.tools}"/>
<arg line="%java5 ${preprocess-xml} -use:com.sun.net.httpserver"/>
<arg line="${fileList}"/>
</java>
</target>
<target name="select-java6" depends="build-settings">
<pathconvert property="fileList" pathSep=" " dirSep="${file.separator}">
<path><fileset refid="build.selectjava"/></path>
</pathconvert>
<java classname="gnu.kawa.util.PreProcess">
<classpath location="${build.tools}"/>
<arg line="%java6 ${preprocess-xml} ${preprocess-HttpServer}"/>
<arg line="${fileList}"/>
</java>
</target>
<target name="select-android" depends="build-settings">
<pathconvert property="fileList" pathSep=" " dirSep="${file.separator}">
<path><fileset refid="build.selectjava"/></path>
</pathconvert>
<java classname="gnu.kawa.util.PreProcess">
<classpath location="${build.tools}"/>
<arg line="%android ${preprocess-xml} -use:com.sun.net.httpserver"/>
<arg line="${fileList}"/>
</java>
</target>
<target name="select-java7" depends="build-settings">
<pathconvert property="fileList" pathSep=" " dirSep="${file.separator}">
<path><fileset refid="build.selectjava"/></path>
</pathconvert>
<java classname="gnu.kawa.util.PreProcess">
<classpath location="${build.tools}"/>
<arg line="%java7 ${preprocess-xml} ${preprocess-HttpServer}"/>
<arg line="${fileList}"/>
</java>
</target>
<target name="-maybe-select-java1" unless="has-java2">
<antcall target="select-java1"/>
</target>
<target name="-maybe-select-java2" unless="has-java4">
<antcall target="select-java2"/>
</target>
<target name="-maybe-select-java4" unless="has-java5">
<antcall target="select-java4"/>
</target>
<target name="-maybe-select-java5" unless="has-java6">
<antcall target="select-java5"/>
</target>
<target name="-maybe-select-java6" if="has-java6">
<antcall target="select-java6"/>
</target>
<target name="-maybe-select-android" if="${enable-android}">
<antcall target="select-android"/>
</target>
<target name="select-java-auto">
<antcall target="-select-java-non-android"/>
<antcall target="-maybe-select-android"/>
</target>
<target name="-select-java-non-android" unless="${enable-android}">
<available property="has-java2" classname="java.lang.ThreadLocal"/>
<available property="has-java4" classname="java.lang.CharSequence"/>
<available property="has-java5" classname="java.lang.Appendable"/>
<available property="has-java6" classname="javax.script.AbstractScriptEngine"/>
<antcall target="-maybe-select-java1"/>
<antcall target="-maybe-select-java2"/>
<antcall target="-maybe-select-java4"/>
<antcall target="-maybe-select-java5"/>
<antcall target="-maybe-select-java6"/>
</target>
<!--
This preprocessing jazz is rather involved and verbose,
but it is entirely compatible with the makefile code
and actually _isn't_ as complicated as I could have made
it (as there are still unrolled patterns here that could
have been wrapped up but I demurred in consideration of
those who may try and grok it).
-->
<filterset id="filter-do-not-edit" begintoken="-*-" endtoken="-*-">
<filter token="Java"
value="Automatically generated file - DO NOT EDIT!. -*- buffer-read-only: t -*-" />
</filterset>
<target name="preprocess" depends="build-tools, build-settings">
<mkdir dir="${build.preprocessed}"/>
<xcopy todir="${build.preprocessed}/kawa"
overwrite="${preprocess.overwrite}">
<fileset dir="${src.dir}/kawa" includes="*.java.in"/>
<mapper type="glob" from="*Version.java.in" to="*Version.java"/>
<filterset refid="filter-do-not-edit"/>
<filterset begintoken=""" endtoken=""">
<filter token="VERSION" value=""${version}"" />
</filterset>
</xcopy>
</target>
<patternset id="with-sax2-false">
</patternset>
<patternset id="with-sax2-true">
<include name="gnu/kawa/sax/"/>
</patternset>
<patternset id="with-awt-true"/>
<patternset id="with-awt-false">
<exclude name="kawa/GuiConsole.java"/>
<exclude name="kawa/MessageArea.java"/>
<exclude name="kawa/TextAreaWriter.java"/>
<exclude name="kawa/GuiInPort.java"/>
</patternset>
<target name="java-classes" depends="preprocess">
<mkdir dir="${build.classes}"/>
<!--
Javac doesn't "shadow" directories, so there may not be duplicates.
That means that if you're building other than in the source directory,
then the source directory must be clean.
-->
<javac srcdir="${build.preprocessed}:${src.dir}"
destdir="${build.classes}"
debug="${debug}"
deprecation="${deprecation}"
optimize="${optimize}" >
<include name="gnu/bytecode/"/>
<include name="gnu/commonlisp/lang/"/>
<include name="gnu/ecmascript/"/>
<include name="gnu/expr/"/>
<exclude name="gnu/expr/AbstractScriptEngineFactory.java" unless="has-java6"/>
<exclude name="gnu/expr/KawaScriptBindings.java" unless="has-java6"/>
<exclude name="gnu/expr/KawaScriptEngine.java" unless="has-java6"/>
<exclude name="kawa/standard/SchemeScriptEngineFactory.java" unless="has-java6"/>
<include name="gnu/kawa/functions/"/>
<include name="gnu/kawa/lispexpr/"/>
<include name="gnu/kawa/reflect/"/>
<include name="gnu/kawa/util/"/>
<include name="gnu/lists/"/>
<include name="gnu/mapping/"/>
<include name="gnu/math/"/>
<include name="gnu/text/"/>
<include name="kawa/lang/"/>
<include name="kawa/standard/"/>
<include name="kawa/"/>
<include name="gnu/kawa/xml/"/>
<include name="gnu/xml/"/>
<patternset refid="with-awt-${with-awt}"/>
</javac>
</target>
<!--
Can't use apply's dependency checking because
Kawa can't handle a "-C" with no files listed.
Also that is probably the wrong thing because
Kawa needs all the files listed for its scanning.
-->
<fileset id="lib-scm" dir="${src.dir}/kawa/lib">
<include name="prim_syntax.scm"/>
<include name="std_syntax.scm"/>
<include name="syntax.scm"/>
<include name="reflection.scm"/>
<include name="lists.scm"/>
<include name="characters.scm"/>
<include name="strings.scm"/>
<include name="parameters.scm"/>
<include name="thread.scm"/>
<include name="keywords.scm"/>
<include name="numbers.scm"/>
<include name="vectors.scm"/>
<include name="ports.scm"/>
<include name="misc.scm"/>
<include name="misc_syntax.scm"/>
<include name="files.scm"/>
<include name="uniform.scm"/>
<include name="arrays.scm"/>
<include name="trace.scm"/>
<include name="windows.scm"/>
<include name="system.scm"/>
<include name="srfi95.scm"/>
<include name="kawa/hashtable.scm"/>
<include name="kawa/regex.scm"/>
<include name="rnrs/hashtables.scm"/>
<include name="rnrs/sorting.scm"/>
<include name="rnrs/unicode.scm"/>
<include name="rnrs/programs.scm"/>
</fileset>
<target name="lib-scm-classes"
depends="java-classes">
<kawac failonerror="true" destdir="${build.classes}"
prefix="kawa.lib." modulestatic="run" language="scheme">
<arg line="--warn-undefined-variable --warn-unknown-member --warn-as-error"/>
<fileset refid="lib-scm"/>
</kawac>
</target>
<fileset id="commonlisp-scm" dir="${src.dir}/gnu/commonlisp/lisp">
<include name="PrimOps.scm"/>
</fileset>
<target name="commonlisp-scm-classes"
depends="java-classes">
<kawac failonerror="true" destdir="${build.classes}"
prefix="gnu.commonlisp.lisp." modulestatic="run" language="scheme">
<fileset refid="commonlisp-scm"/>
</kawac>
</target>
<fileset id="slib-scm" dir="${src.dir}/gnu/kawa/slib">
<include name="genwrite.scm"/>
<include name="pp.scm"/>
<include name="ppfile.scm"/>
<include name="printf.scm"/>
<include name="DefineRecordType.scm"/>
<include name="srfi1.scm"/>
<include name="srfi2.scm"/>
<include name="srfi13.scm"/>
<include name="srfi34.scm"/>
<include name="conditions.scm"/>
<include name="srfi37.scm"/>
<include name="srfi69.scm"/>
<include name="testing.scm"/>
<include name="pregexp.scm"/>
<include name="readtable.scm"/>
<include name="cut.scm"/>
<include name="enums.scm"/>
<include name="gui.scm"/>
<include name="XML.scm"/>
<include name="swing.scm"/>
<include name="syntaxutils.scm"/>
</fileset>
<target name="slib-scm-classes" depends="java-classes">
<kawac failonerror="true" destdir="${build.classes}"
prefix="gnu.kawa.slib." modulestatic="run"
language="scheme">
<fileset refid="slib-scm"/>
</kawac>
</target>
<target name="xml-classes"
depends="build-settings, java-classes"
if="${enable-xml}">
<javac srcdir="${src.dir}"
destdir="${build.classes}"
debug="${debug}"
deprecation="${deprecation}"
optimize="${optimize}" >
<include name="gnu/xml/"/>
<include name="gnu/kawa/xml/"/>
<include name="gnu/kawa/xslt/"/>
<include name="gnu/xquery/lang/"/>
<exclude name="gnu/xquery/lang/XQueryScriptEngineFactory.java" unless="has-java6"/>
<include name="gnu/xquery/util/"/>
<patternset refid="with-sax2-${with-sax2}"/>
</javac>
<kawac failonerror="true" destdir="${build.classes}"
prefix="gnu.kawa.slib." modulestatic="run" language="scheme">
<fileset dir="${src.dir}/gnu/kawa/slib">
<include name="XML.scm"/>
<include name="XStrings.scm"/>
</fileset>
</kawac>
</target>
<target name="brl-classes"
depends="build-settings, java-classes"
if="${enable-brl}">
<javac srcdir="${src.dir}"
destdir="${build.classes}"
debug="${debug}"
deprecation="${deprecation}"
optimize="${optimize}" >
<include name="gnu/brl/"/>
<include name="gnu/kawa/brl/"/>
<patternset refid="with-sax2-${with-sax2}"/>
</javac>
<kawac failonerror="true" destdir="${build.classes}"
prefix="gnu.brl." modulestatic="run" language="scheme">
<fileset dir="${src.dir}/gnu/brl">
<include name="stringfun.scm"/>
</fileset>
</kawac>
<kawac failonerror="true" destdir="${build.classes}"
prefix="gnu.kawa.brl." modulestatic="run" language="scheme">
<fileset dir="${src.dir}/gnu/kawa/brl">
<include name="progfun.scm"/>
</fileset>
</kawac>
</target>
<target name="servlet-classes"
depends="build-settings, java-classes"
if="${enable-servlet}">
<javac srcdir="${src.dir}"
destdir="${build.classes}"
debug="${debug}"
deprecation="${deprecation}"
optimize="${optimize}" >
<include name="gnu/kawa/servlet/"/>
</javac>
<apply taskname="kawa" executable="java"
failonerror="true" parallel="true">
<!-- I don't quite get why the Java classpath has to be tacked on here, but it does. -->
<arg value="-classpath"/> <arg path="${build.classes}:${java.class.path}"/>
<arg value="kawa.repl"/>
<arg value="-d"/> <arg path="${build.classes}"/>
<arg line="-P gnu.kawa.slib. --module-static-run -C"/>
<fileset dir="${src.dir}/gnu/kawa/servlet">
<include name="HTTP.scm"/>
</fileset>
</apply>
</target>
<target name="android-classes"
depends="build-settings, java-classes"
if="${enable-android}">
<apply taskname="kawa" executable="java"
failonerror="true" parallel="true">
<!-- I don't quite get why the Java classpath has to be tacked on here, but it does. -->
<arg value="-classpath"/> <arg path="${build.classes}:${java.class.path}"/>
<arg value="kawa.repl"/>
<arg value="-d"/> <arg path="${build.classes}"/>
<arg line="-P gnu.kawa.android. --module-static-run -C"/>
<fileset dir="${src.dir}/gnu/kawa/android">
<include name="defs.scm"/>
</fileset>
</apply>
</target>
<target name="jemacs-java-classes"
depends="build-settings, java-classes"
if="${enable-jemacs}">
<javac srcdir="${src.dir}"
destdir="${build.classes}"
debug="${debug}"
deprecation="${deprecation}"
optimize="${optimize}" >
<include name="gnu/jemacs/buffer/"/>
<include name="gnu/jemacs/lang/"/>
<include name="gnu/jemacs/swing/"/>
<include name="gnu/kawa/models/"/>
<include name="gnu/kawa/swingviews/"/>
</javac>
</target>
<target name="jemacs-swt-classes" depends="jemacs-classes">
<javac srcdir="${src.dir}" destdir="${build.classes}">
<include name="gnu/jemacs/swt/"/>
</javac>
</target>
<target name="jemacs-classes"
depends="build-settings, java-classes, jemacs-java-classes"
if="${enable-jemacs}">
<kawac failonerror="true" destdir="${build.classes}"
prefix="gnu.jemacs.lang." modulestatic="run" language="scheme">
<fileset dir="${src.dir}/gnu/jemacs/lang">
<include name="MiscOps.scm"/>
<include name="NumberOps.scm"/>
</fileset>
</kawac>
<kawac failonerror="true" destdir="${build.classes}"
prefix="gnu.jemacs.buffer." modulestatic="run" language="scheme">
<fileset dir="${src.dir}/gnu/jemacs/buffer">
<include name="emacs.scm"/>
</fileset>
</kawac>
<kawac failonerror="true" destdir="${build.classes}"
prefix="gnu.kawa.slib" modulestatic="run" language="scheme">
<fileset dir="${src.dir}/gnu/kawa/slib">
<include name="gui.scm"/>
</fileset>
</kawac>
<kawac failonerror="true" destdir="${build.classes}"
prefix="gnu.jemacs.lisp." language="elisp">
<fileset dir="${src.dir}/gnu/jemacs/lisp">
<include name="primitives.el"/>
<include name="alist.el"/>
<include name="simple.el"/>
<include name="alist.el"/>
<include name="keymap.el"/>
<include name="keydefs.el"/>
<include name="hanoi.el"/>
<include name="rect.el"/>
<include name="editfns.el"/>
<include name="subr.el"/>
<include name="autoloads.el"/>
</fileset>
</kawac>
</target>
<target name="jar">
<jar jarfile="${dist.kawa.jar}"
manifest="${src.dir}/jar-manifest">
<fileset refid="build.classes"/>
</jar>
</target>
<!--
These clean targets are split up for when
get build-tools doesn't work in NetBeans.
(There is a workaround now, see build-tools.)
For this to work, build.tools must be a different
directory than build.classes uses.
-->
<target name="clean-build">
<delete>
<fileset refid="build.classes"/>
<fileset refid="build.preprocessed"/>
</delete>
</target>
<target name="clean-tools">
<delete dir="${build.tools}"/>
</target>
<target name="clean-dist">
<delete file="${dist.kawa.jar}"/>
</target>
<target name="clean" depends="clean-build, clean-tools, clean-dist"/>
</project>