blob: 796df713a44c1990c3149921f201d8ea2a8fd191 (
plain) (
blame)
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
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
|
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<project name="scala-core" default="build">
<description>
I am SABBUS for Scala-core, the build system for the Scala compiler and core
library. Please check the 'docs/README' file for more information about me.
</description>
<echo>Running SABBUS for Scala-core</echo>
<!-- ===========================================================================
PROPERTIES
============================================================================ -->
<property environment="env"/>
<condition property="memory.set">
<contains string="${env.ANT_OPTS}" substring="-Xmx"/>
</condition>
<fail unless="memory.set">
SABBUS requires additional memory. Please set the 'ANT_OPTS' environment
property to '-Xmx256M' or more.
</fail>
<!-- Prevents system classpath from being used -->
<property name="build.sysclasspath" value="ignore"/>
<!-- Base properties -->
<property name="docs.dir" value="${basedir}/docs"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="test.dir" value="${basedir}/test"/>
<!-- User properties -->
<property file="${basedir}/build.properties"/>
<!-- General properties -->
<property name="copyright" value="(c) 2002-2006 LAMP/EPFL"/>
<!-- NSC configuration properties -->
<property name="nsc.logging" value="none"/>
<property name="nsc.debug-info" value="yes"/>
<property name="nsc.excludes" value="${basedir}/build.excludes"/>
<property name="nsc.params" value=""/>
<!-- Location of pre-compiled libraries properties -->
<property name="starr.lib.jar" value="${lib.dir}/scala-library.jar"/>
<property name="starr.comp.jar" value="${lib.dir}/scala-compiler.jar"/>
<property name="jaco.jar" value="${lib.dir}/jaco.jar"/>
<property name="fjbg.name" value="fjbg.jar"/>
<property name="fjbg.jar" value="${lib.dir}/${fjbg.name}"/>
<property name="msil.name" value="msil.jar"/>
<property name="msil.jar" value="${lib.dir}/${msil.name}"/>
<property name="scala.dll" value="${lib.dir}/scala.dll"/>
<property name="ant.jar" value="${ant.home}/lib/ant.jar"/>
<property name="ant-contrib.jar" value="${lib.dir}/ant-contrib.jar"/>
<!-- Location of build products properties -->
<property name="build.dir" value="${basedir}/build"/>
<property name="locker.dir" value="${build.dir}/locker"/>
<property name="quick.dir" value="${build.dir}/quick"/>
<property name="strap.dir" value="${build.dir}/strap"/>
<!-- Location of source and build elements names properties -->
<property name="lib.dir.name" value="library"/>
<property name="comp.dir.name" value="compiler"/>
<property name="exec.dir.name" value="exec"/>
<!-- Location of structure of the distribution properties -->
<property name="dist.dir" value="${basedir}/dists"/>
<property name="dist.latest.dir" value="${dist.dir}/latest"/>
<property name="dist.name" value="scala"/>
<property name="lib.jar.name" value="${dist.name}-${lib.dir.name}.jar"/>
<property name="comp.jar.name" value="${dist.name}-${comp.dir.name}.jar"/>
<property name="scala.exec.name" value="${dist.name}"/>
<property name="scalai.exec.name" value="scalai"/>
<property name="scalac.exec.name" value="scalac"/>
<property name="scalatok.exec.name" value="scalatok"/>
<!-- Shorcut names -->
<property name="locker.lib.dir" value="${locker.dir}/${lib.dir.name}"/>
<property name="locker.comp.dir" value="${locker.dir}/${comp.dir.name}"/>
<property name="quick.lib.dir" value="${quick.dir}/${lib.dir.name}"/>
<property name="quick.comp.dir" value="${quick.dir}/${comp.dir.name}"/>
<property name="strap.lib.dir" value="${strap.dir}/${lib.dir.name}"/>
<property name="strap.comp.dir" value="${strap.dir}/${comp.dir.name}"/>
<!-- sbaz properties -->
<property name="scala.sbaz.name" value="scala2"/>
<property name="scalac.sbaz.name" value="scalac2"/>
<!-- ===========================================================================
INITIALISATION
============================================================================ -->
<target name="init" unless="init.avail">
<!-- Testing if everything is in place -->
<echo level="verbose">starr.lib.jar=${starr.lib.jar}</echo>
<fail message="STARR library in 'lib/' is not available">
<condition><not><and>
<available classname="scala.Predef"
classpath="${starr.lib.jar}"/>
<available classname="scala.List"
classpath="${starr.lib.jar}"/>
<available classname="scala.runtime.ObjectRef"
classpath="${starr.lib.jar}"/>
</and></not></condition>
</fail>
<echo level="verbose">starr.comp.jar=${starr.comp.jar}</echo>
<fail message="STARR compiler in 'lib/' is not available">
<condition><not>
<available classname="scala.tools.ant.Scalac"
classpath="${starr.comp.jar}:${starr.lib.jar}"/>
</not></condition>
</fail>
<echo level="verbose">fjbg.jar=${fjbg.jar}</echo>
<fail message="FJBG library in 'lib/' is not available">
<condition><not>
<available classname="ch.epfl.lamp.fjbg.JCode"
classpath="${fjbg.jar}"/>
</not></condition>
</fail>
<echo level="verbose">msil.jar=${msil.jar}</echo>
<fail message="MSIL library in 'lib/' is not available">
<condition><not>
<available classname="ch.epfl.lamp.compiler.msil.Assembly"
classpath="${msil.jar}"/>
</not></condition>
</fail>
<echo level="verbose">jaco.jar=${jaco.jar}</echo>
<fail message="JaCo compiler in 'lib/' is not available">
<condition><not>
<available classname="jaco.pizza.Main" classpath="${jaco.jar}"/>
</not></condition>
</fail>
<echo level="verbose">ant.jar=${ant.jar}</echo>
<echo level="verbose">ant-contrib.jar=${ant-contrib.jar}</echo>
<fail message="Additional Ant tasks in 'lib/' is not available">
<condition><not>
<available classname="net.sf.antcontrib.AntContribVersion"
classpath="${ant-contrib.jar}"/>
</not></condition>
</fail>
<!-- Creating class-pathes -->
<path id="common.classpath">
<pathelement location="${fjbg.jar}"/>
<pathelement location="${msil.jar}"/>
</path>
<path id="starr.classpath">
<pathelement location="${starr.lib.jar}"/>
<pathelement location="${starr.comp.jar}"/>
<path refid="common.classpath"/>
</path>
<!-- Creating boot-level tasks -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${ant-contrib.jar}"/>
</classpath>
</taskdef>
<!-- Finding out what system architecture is being used -->
<condition property="os.win">
<os family="windows"/>
</condition>
<if><isset property="os.win"/>
<then>
<exec executable="cygpath"
vmlauncher="no"
errorproperty="cygpath.err"
outputproperty="cygpath.out">
<arg value="--windir"/>
</exec>
<condition property="os.cygwin">
<equals arg1="${cygpath.err}" arg2=""/>
</condition>
</then>
</if>
<condition property="os.unix">
<or>
<os family="unix"/>
<os family="mac"/>
<isset property="os.cygwin"/>
</or>
</condition>
<if><isset property="os.cygwin"/>
<then><echo>OS type: Cygwin</echo></then>
<elseif><isset property="os.win"/>
<then><echo>OS type: Windows</echo></then>
</elseif>
<elseif><isset property="os.unix"/>
<then><echo>OS type: UNIX</echo></then>
</elseif>
<else>
<fail>System environment could not be determined</fail>
</else>
</if>
<echo>OS name: ${os.name} ${os.arch} ${os.version}</echo>
<echo>Java: ${java.version} ('${java.home}')</echo>
<echo>Java VM: ${java.vm.name} ${java.vm.version}</echo>
<echo>Ant: ${ant.version}</echo>
</target>
<target name="setup" depends="init">
<!-- Creating boot-level tasks -->
<taskdef name="starr"
classname="scala.tools.ant.Scalac"
classpathref="starr.classpath"/>
<taskdef name="starrtool"
classname="scala.tools.ant.ScalaTool"
classpathref="starr.classpath"/>
<taskdef name="pico"
classname="jaco.pizza.ant.Pico"
classpath="${jaco.jar}"/>
<!-- Removing any outdated stuff -->
<if>
<and>
<available file="${locker.dir}/complete"/>
<not><uptodate targetfile="${locker.dir}/complete">
<srcfiles dir="${lib.dir}" includes="scala-*.jar"/>
</uptodate></not>
</and>
<then>
<echo>
STARR has been updated. LOCKER is obsolete and will be rebuilt.
</echo>
<runtarget target="clean"/>
</then>
</if>
<!-- Finding out what is available -->
<available property="excludes.avail" file="${nsc.excludes}"/>
<echo level="verbose">excludes.avail=${excludes.avail}</echo>
<condition property="locker.avail">
<available file="${locker.dir}/complete"/>
</condition>
<!-- Defining version number -->
<tstamp prefix="start"/>
<property name="version.number" value="${start.DSTAMP}-${start.TSTAMP}"/>
<property name="dist.current.dir"
value="${dist.dir}/${dist.name}-${version.number}"/>
<property name="init.avail" value="yes"/>
</target>
<target name="setup.locker" depends="setup, build.locker">
<path id="locker.classpath">
<pathelement location="${locker.dir}/${lib.dir.name}"/>
<pathelement location="${locker.dir}/${comp.dir.name}"/>
<path refid="common.classpath"/>
</path>
<taskdef name="locker"
classname="scala.tools.ant.Scalac"
classpathref="locker.classpath"/>
<taskdef name="lockertool"
classname="scala.tools.ant.ScalaTool"
classpathref="locker.classpath"/>
</target>
<target name="setup.quick" depends="setup, build">
<path id="quick.classpath">
<pathelement location="${quick.dir}/${lib.dir.name}"/>
<pathelement location="${quick.dir}/${comp.dir.name}"/>
<path refid="common.classpath"/>
</path>
<taskdef name="quick"
classname="scala.tools.ant.Scalac"
classpathref="quick.classpath"/>
<taskdef name="quicktool"
classname="scala.tools.ant.ScalaTool"
classpathref="quick.classpath"/>
<taskdef name="quicksbaz"
classname="scala.tools.ant.ScalaBazaar"
classpathref="quick.classpath"/>
</target>
<!-- ===========================================================================
BUILD SUPPORT MACROS
============================================================================ -->
<macrodef name="build.support">
<attribute name="build.dir"/>
<sequential>
<copy todir="@{build.dir}/${lib.dir.name}">
<fileset dir="${src.dir}/${lib.dir.name}">
<include name="**/*.tmpl"/>
<include name="**/*.xml"/>
</fileset>
</copy>
<copy todir="@{build.dir}/${comp.dir.name}">
<fileset dir="${src.dir}/${comp.dir.name}">
<include name="**/*.tmpl"/>
<include name="**/*.xml"/>
</fileset>
</copy>
</sequential>
</macrodef>
<macrodef name="build.links">
<attribute name="build.dir"/>
<sequential>
<if>
<not><and>
<available file="@{build.dir}/${fjbg.name}"/>
<available file="@{build.dir}/${msil.name}"/>
</and></not>
<then>
<if><isset property="os.unix"/>
<then>
<symlink link="@{build.dir}/${fjbg.name}"
resource="${fjbg.jar}"
overwrite="yes"
failonerror="no"/>
<symlink link="@{build.dir}/${msil.name}"
resource="${msil.jar}"
overwrite="yes"
failonerror="no"/>
</then>
<else>
<copy file="${fjbg.jar}" tofile="@{build.dir}/${fjbg.name}"/>
<copy file="${msil.jar}" tofile="@{build.dir}/${msil.name}"/>
</else>
</if>
</then>
</if>
</sequential>
</macrodef>
<!-- ===========================================================================
BUILD LOCAL REFERENCE (LOCKER) LAYER
============================================================================ -->
<target name="newlocker" depends="clean.unfreeze, build.locker"/>
<target name="build.locker" depends="setup" unless="locker.avail">
<property name="built.locker" value="yes"/>
<!-- Build library -->
<mkdir dir="${locker.lib.dir}"/>
<pico srcdir="${src.dir}/${lib.dir.name}"
destdir="${locker.lib.dir}"
scalahack="yes">
<classpath>
<pathelement location="${locker.lib.dir}"/>
</classpath>
<include name="**/*.java"/>
</pico>
<starr srcdir="${src.dir}/${lib.dir.name}"
destdir="${locker.lib.dir}"
usepredefs="no">
<classpath>
<pathelement location="${locker.lib.dir}"/>
</classpath>
<include name="scala/Predef.scala"/>
<include name="scala/runtime/ScalaRunTime.scala"/>
</starr>
<starr srcdir="${src.dir}/${lib.dir.name}"
destdir="${locker.lib.dir}">
<classpath>
<pathelement location="${locker.lib.dir}"/>
</classpath>
<include name="**/*.scala"/>
<exclude name="scala/Predef.scala"/>
<exclude name="scala/runtime/ScalaRunTime.scala"/>
<excludesfile name="${nsc.excludes}" if="excludes.avail"/>
</starr>
<!-- Build compiler -->
<mkdir dir="${locker.comp.dir}"/>
<pico srcdir="${src.dir}/${comp.dir.name}"
destdir="${locker.comp.dir}"
scalahack="yes">
<classpath>
<pathelement location="${locker.lib.dir}"/>
<pathelement location="${locker.comp.dir}"/>
</classpath>
<include name="**/*.java"/>
</pico>
<starr srcdir="${src.dir}/${comp.dir.name}"
destdir="${locker.comp.dir}">
<classpath>
<pathelement location="${locker.lib.dir}"/>
<pathelement location="${locker.comp.dir}"/>
<path refid="starr.classpath"/>
<pathelement location="${ant.jar}"/>
</classpath>
<include name="**/*.scala"/>
<excludesfile name="${nsc.excludes}" if="excludes.avail"/>
</starr>
<!-- Copy support files to build folder and links external libraries-->
<build.support build.dir="${locker.dir}"/>
<build.links build.dir="${locker.dir}"/>
<!-- Build executable files -->
<mkdir dir="${locker.dir}/${exec.dir.name}"/>
<starrtool file="${locker.dir}/${exec.dir.name}/${scalac.exec.name}"
genericFile="${locker.dir}/${exec.dir.name}/${scala.exec.name}"
name="Scala compiler"
class="scala.tools.nsc.Main"
version="${version.number}"
copyright="${copyright}"
classpath="#SCALA_HOME#/${lib.dir.name}:#SCALA_HOME#/${comp.dir.name}:#SCALA_HOME#/${fjbg.name}:#SCALA_HOME#/${msil.name}"
properties="scala.boot.class.path=#CLASSPATH#"
javaFlags="-Xmx256M -Xms16M"/>
<chmod file="${locker.dir}/${exec.dir.name}/${scalac.exec.name}"
perm="ugo+rx"/>
<chmod file="${locker.dir}/${exec.dir.name}/${scala.exec.name}"
perm="ugo+rx"/>
<touch file="${locker.dir}/complete" verbose="no"/>
</target>
<!-- ===========================================================================
BUILD QUICK-TEST LAYER
============================================================================ -->
<target name="build" depends="setup.locker">
<!-- Build library -->
<mkdir dir="${quick.lib.dir}"/>
<pico srcdir="${src.dir}/${lib.dir.name}"
destdir="${quick.lib.dir}"
scalahack="yes">
<classpath>
<pathelement location="${quick.lib.dir}"/>
</classpath>
<include name="**/*.java"/>
</pico>
<locker srcdir="${src.dir}/${lib.dir.name}"
destdir="${quick.lib.dir}"
usepredefs="no"
addparams="${nsc.params}"
scalacdebugging="yes">
<classpath>
<pathelement location="${quick.lib.dir}"/>
</classpath>
<include name="scala/Predef.scala"/>
<include name="scala/runtime/ScalaRunTime.scala"/>
</locker>
<locker srcdir="${src.dir}/${lib.dir.name}"
destdir="${quick.lib.dir}"
addparams="${nsc.params}"
scalacdebugging="yes">
<classpath>
<pathelement location="${quick.lib.dir}"/>
</classpath>
<include name="**/*.scala"/>
<exclude name="scala/Predef.scala"/>
<exclude name="scala/runtime/ScalaRunTime.scala"/>
<excludesfile name="${nsc.excludes}" if="excludes.avail"/>
</locker>
<!-- Build compiler -->
<mkdir dir="${quick.comp.dir}"/>
<pico srcdir="${src.dir}/${comp.dir.name}"
destdir="${quick.comp.dir}"
scalahack="yes">
<classpath>
<pathelement location="${quick.lib.dir}"/>
<pathelement location="${quick.comp.dir}"/>
</classpath>
<include name="**/*.java"/>
</pico>
<locker srcdir="${src.dir}/${comp.dir.name}"
destdir="${quick.comp.dir}"
addparams="${nsc.params}"
scalacdebugging="yes">
<classpath>
<pathelement location="${quick.lib.dir}"/>
<pathelement location="${quick.comp.dir}"/>
<path refid="locker.classpath"/>
<pathelement location="${ant.jar}"/>
</classpath>
<include name="**/*.scala"/>
<excludesfile name="${nsc.excludes}" if="excludes.avail"/>
</locker>
<!-- Copy support files to build folder and links external libraries-->
<build.support build.dir="${quick.dir}"/>
<build.links build.dir="${quick.dir}"/>
<!-- Build executable files -->
<mkdir dir="${quick.dir}/${exec.dir.name}"/>
<lockertool file="${quick.dir}/${exec.dir.name}/${scalac.exec.name}"
genericFile="${quick.dir}/${exec.dir.name}/${scala.exec.name}"
name="Scala compiler"
class="scala.tools.nsc.Main"
version="${version.number}"
copyright="${copyright}"
classpath="#SCALA_HOME#/${lib.dir.name}:#SCALA_HOME#/${comp.dir.name}:#SCALA_HOME#/${fjbg.name}:#SCALA_HOME#/${msil.name}"
properties="scala.boot.class.path=#CLASSPATH#"
javaFlags="-Xmx256M -Xms16M"/>
<chmod file="${quick.dir}/${exec.dir.name}/${scalac.exec.name}"
perm="ugo+rx"/>
<chmod file="${quick.dir}/${exec.dir.name}/${scala.exec.name}"
perm="ugo+rx"/>
</target>
<target name="test.quick" depends="build">
<echo>Ant test bench is not available yet</echo>
</target>
<!-- ===========================================================================
TEST
============================================================================ -->
<target name="test" depends="clean, test.stability, test.strap"/>
<target name="build.strap" depends="setup.quick">
<!-- Build the bootstrap layer -->
<!-- Build library -->
<mkdir dir="${strap.lib.dir}"/>
<pico srcdir="${src.dir}/${lib.dir.name}"
destdir="${strap.lib.dir}"
scalahack="yes">
<classpath>
<pathelement location="${strap.lib.dir}"/>
</classpath>
<include name="**/*.java"/>
</pico>
<quick srcdir="${src.dir}/${lib.dir.name}"
destdir="${strap.lib.dir}"
usepredefs="no"
addparams="${nsc.params}">
<classpath>
<pathelement location="${strap.lib.dir}"/>
</classpath>
<include name="scala/Predef.scala"/>
<include name="scala/runtime/ScalaRunTime.scala"/>
</quick>
<quick srcdir="${src.dir}/${lib.dir.name}"
destdir="${strap.lib.dir}"
addparams="${nsc.params}">
<classpath>
<pathelement location="${strap.lib.dir}"/>
</classpath>
<include name="**/*.scala"/>
<exclude name="scala/Predef.scala"/>
<exclude name="scala/runtime/ScalaRunTime.scala"/>
<excludesfile name="${nsc.excludes}" if="excludes.avail"/>
</quick>
<!-- Build compiler -->
<mkdir dir="${strap.comp.dir}"/>
<pico srcdir="${src.dir}/${comp.dir.name}"
destdir="${strap.comp.dir}"
scalahack="yes">
<classpath>
<pathelement location="${strap.lib.dir}"/>
<pathelement location="${strap.comp.dir}"/>
</classpath>
<include name="**/*.java"/>
</pico>
<quick srcdir="${src.dir}/${comp.dir.name}"
destdir="${strap.comp.dir}"
addparams="${nsc.params}">
<classpath>
<pathelement location="${strap.lib.dir}"/>
<pathelement location="${strap.comp.dir}"/>
<path refid="quick.classpath"/>
<pathelement location="${ant.jar}"/>
</classpath>
<include name="**/*.scala"/>
<excludesfile name="${nsc.excludes}" if="excludes.avail"/>
</quick>
<!-- Copy support files to build folder and links external libraries-->
<build.support build.dir="${strap.dir}"/>
<build.links build.dir="${strap.dir}"/>
<!-- Build executable files -->
<mkdir dir="${strap.dir}/${exec.dir.name}"/>
<quicktool file="${strap.dir}/${exec.dir.name}/${scalac.exec.name}"
genericFile="${strap.dir}/${exec.dir.name}/${scala.exec.name}"
name="Scala compiler"
class="scala.tools.nsc.Main"
version="${version.number}"
copyright="${copyright}"
classpath="#SCALA_HOME#/${lib.dir.name}:#SCALA_HOME#/${comp.dir.name}:#SCALA_HOME#/${fjbg.name}:#SCALA_HOME#/${msil.name}"
properties="scala.boot.class.path=#CLASSPATH#"
javaFlags="-Xmx256M -Xms16M"/>
<chmod file="${strap.dir}/${exec.dir.name}/${scalac.exec.name}"
perm="ugo+rx"/>
<chmod file="${strap.dir}/${exec.dir.name}/${scala.exec.name}"
perm="ugo+rx"/>
</target>
<target name="test.stability" depends="build.strap">
<!-- Compares quick and test level -->
<checksum totalproperty="quick.md5">
<fileset dir="${quick.dir}">
<include name="${lib.dir.name}/**"/>
<include name="${comp.dir.name}/**"/>
</fileset>
</checksum>
<delete quiet="yes" failonerror="no">
<fileset dir="${quick.dir}"><include name="**/*.MD5"/></fileset>
</delete>
<checksum totalproperty="strap.md5">
<fileset dir="${strap.dir}">
<include name="${lib.dir.name}/**"/>
<include name="${comp.dir.name}/**"/>
</fileset>
</checksum>
<delete quiet="yes" failonerror="no">
<fileset dir="${strap.dir}"><include name="**/*.MD5"/></fileset>
</delete>
<fail message="Build is not stable">
<condition><not>
<equals arg1="${quick.md5}" arg2="${strap.md5}"/>
</not></condition>
</fail>
<echo>Build is stable</echo>
</target>
<target name="test.strap" depends="build.strap">
<echo>Ant test bench is not available yet</echo>
</target>
<!-- ===========================================================================
DOCUMENT
============================================================================ -->
<target name="docs">
<echo>Docs is not available yet.</echo>
</target>
<!-- ===========================================================================
GENERATES A DISTRIBUTION
============================================================================ -->
<target name="dist" depends="test">
<mkdir dir="${dist.current.dir}"/>
<mkdir dir="${dist.current.dir}/lib"/>
<jar destfile="${dist.current.dir}/lib/${comp.jar.name}"
basedir="${strap.comp.dir}">
<manifest>
<attribute name="Signature-Version" value="${version.number}"/>
<!-- For a sbaz package, the Main-Class should not be included
<attribute name="Main-Class" value="scala.tools.nsc.Main"/>
<attribute name="Class-Path" value="${lib.jar.name}"/>
-->
</manifest>
</jar>
<jar destfile="${dist.current.dir}/lib/${lib.jar.name}"
basedir="${strap.lib.dir}">
<manifest>
<attribute name="Signature-Version" value="${version.number}"/>
</manifest>
</jar>
<copy file="${fjbg.jar}" todir="${dist.current.dir}/lib"/>
<copy file="${msil.jar}" todir="${dist.current.dir}/lib"/>
<mkdir dir="${dist.current.dir}/bin"/>
<!-- Build executable files -->
<mkdir dir="${dist.current.dir}/bin"/>
<quicktool file="${dist.current.dir}/bin/${scalac.exec.name}"
genericFile="${dist.current.dir}/bin/${scala.exec.name}"
name="Scala compiler"
class="scala.tools.nsc.Main"
version="${version.number}"
copyright="${copyright}"
classpath=""
properties="scala.boot.class.path=#CLASSPATH#"
javaFlags="-Xmx256M -Xms16M"/>
<chmod file="${dist.current.dir}/bin/${scalac.exec.name}"
perm="ugo+rx"/>
<chmod file="${dist.current.dir}/bin/${scala.exec.name}"
perm="ugo+rx"/>
<if><isset property="os.unix"/>
<then>
<symlink link="${dist.latest.dir}"
resource="${dist.current.dir}"
overwrite="yes"
failonerror="no"/>
</then>
</if>
<quicksbaz
file="${dist.dir}/${scalac.sbaz.name}-${version.number}.sbp"
adfile="${dist.dir}/${scalac.sbaz.name}-${version.number}.advert"
name="${scalac.sbaz.name}"
version="${version.number}"
desc="The Scala compiler. This is used to compile Scala programs
into Java .class files."
depends="${scalac.sbaz.name}-support">
<libset dir="${dist.current.dir}/lib" includes="${dist.name}-compiler.jar"/>
<binset dir="${dist.current.dir}/bin" includes="${scalac.exec.name}"/>
<manset dir="${docs.dir}/man" includes="${scalac.exec.name}.1"/>
</quicksbaz>
<quicksbaz
file="${dist.dir}/${scala.sbaz.name}-${version.number}.sbp"
adfile="${dist.dir}/${scala.sbaz.name}-${version.number}.advert"
name="${scala.sbaz.name}"
version="${version.number}"
desc="The Scala command runner. It is a wrapper around the Java VM that,
by default, sets up a large CLASSPATH including the Scala library
as well as all jars installed in the lib directory of the sbaz-
managed directory.">
<binset dir="${dist.current.dir}/bin" includes="${scala.exec.name}"/>
<manset dir="${docs.dir}/man" includes="${scala.exec.name}.1"/>
</quicksbaz>
<quicksbaz
file="${dist.dir}/${scala.sbaz.name}-library-${version.number}.sbp"
adfile="${dist.dir}/${scala.sbaz.name}-library-${version.number}.advert"
name="${scala.sbaz.name}-library"
version="${version.number}"
desc="The base Scala library, required for running all Scala programs.">
<libset dir="${dist.current.dir}/lib" includes="${dist.name}-library.jar"/>
</quicksbaz>
</target>
<!-- ===========================================================================
CLEAN
============================================================================ -->
<macrodef name="remove">
<attribute name="dir"/>
<sequential>
<delete dir="@{dir}"
includeemptydirs="yes"
quiet="yes"
failonerror="no"/>
</sequential>
</macrodef>
<target name="clean">
<remove dir="${build.dir}"/>
</target>
<target name="clean.all">
<remove dir="${build.dir}"/>
<remove dir="${dist.dir}"/>
</target>
<target name="clean.unfreeze" depends="init">
<delete file="${locker.dir}/complete"
quiet="yes"
failonerror="no"/>
<if>
<not><isset property="unsafe"/></not>
<then>
<remove dir="${quick.dir}"/>
</then>
</if>
</target>
</project>
|