This repository has been archived by the owner on May 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
2286 lines (2091 loc) · 102 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
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--
~ This file is part of the Jikes RVM project (http://jikesrvm.org).
~
~ This file is licensed to You under the Eclipse Public License (EPL);
~ You may not use this file except in compliance with the License. You
~ may obtain a copy of the License at
~
~ http://www.opensource.org/licenses/eclipse-1.0.php
~
~ See the COPYRIGHT.txt file distributed with this work for information
~ regarding copyright ownership.
-->
<project name="JikesRVM" default="main" basedir=".">
<property name="rvm.version" value="3.1.1+svn"/>
<!-- <property name="svn.revision" value="XXX"/> -->
<property name="jikesrvm.dir" location="${basedir}"/>
<import file="build/base.xml"/>
<import file="build/tasks.xml"/>
<property name="config.mmtk" value="default"/>
<property name="config.file" location="${jikesrvm.dir}/build/configs/${config.name}.properties"/>
<property name="mmtk.properties" location="${jikesrvm.dir}/build/mmtk/${config.mmtk}.properties"/>
<property name="default.mmtk.properties" location="${jikesrvm.dir}/build/mmtk/default.properties"/>
<!-- configuration data -->
<property file="${config.file}"/>
<property file="${target.file}"/>
<!-- default configuration values. May have already been set by above tasks -->
<property file="${jikesrvm.dir}/build/configs/config.properties.defaults"/>
<setBuildName property="build.name" config="${config.name}"/>
<!-- location of resources -->
<property name="primordials.dir" location="build/primordials"/>
<property name="main.java" location="rvm/src"/>
<property name="mmtk.java" location="MMTk/src"/>
<property name="mmtk-harness.java" location="MMTk/harness/src"/>
<property name="mmtk-harness-vmmagic.java" location="MMTk/harness/vmmagic"/>
<property name="mmtk-vm-rvm.java" location="MMTk/ext/vm/jikesrvm"/>
<property name="mmtk-vm-harness.java" location="MMTk/ext/vm/harness"/>
<property name="vmmagic-stub.java" location="common/vmmagic/src"/>
<property name="options.java" location="common/options/src"/>
<property name="tuningforklib.java" location="external/tuningforklib/src"/>
<property name="vmmagic.java" location="tools/bootImageWriter/vmmagic/src"/>
<!-- Set the properties for intermediate directory -->
<property name="build.dir" location="target"/>
<property name="build.base" location="${build.dir}/${build.name}"/>
<property name="build.profiles" location="${build.dir}/profiles"/>
<property name="build.vmmagic-stub.classes" location="${build.dir}/vmmagic-stub/classes"/>
<property name="build.options.classes" location="${build.dir}/options/classes"/>
<property name="build.mmtk.jar" location="${build.dir}/mmtk/mmtk.jar"/>
<property name="build.mmtk-harness.jar" location="${build.dir}/mmtk/mmtk-harness.jar"/>
<property name="build.native" location="${build.base}/c"/>
<property name="build.objs" location="${build.base}/objs"/>
<property name="build.classes" location="${build.base}/classes"/>
<property name="build.rt.jar" location="${build.base}/rvmrt.jar"/>
<property name="build.vm.jar" location="${build.base}/jksvm.jar"/>
<property name="build.vmmagic.classes" location="${build.base}/vmmagic/classes"/>
<!-- Set the properties for directory of generated artifacts -->
<property name="generated.dir" location="generated"/>
<property name="generated.config.dir" location="${generated.dir}/configurations/${build.name}"/>
<property name="generated.config.java" location="${generated.config.dir}/java"/>
<property name="generated.java" location="${generated.dir}/main/java"/>
<property name="generated.ia32.java" location="${generated.dir}/ia32-${target.address.size}/main/java"/>
<property name="generated.arch.java" location="${generated.dir}/${target.arch}-${target.address.size}/main/java"/>
<property name="generated.vmmagic.arch.java" location="${generated.dir}/vmmagic/${target.address.size}/java"/>
<property name="generated.asm" location="${generated.dir}/asm/java"/>
<property name="build.asm.classes" location="${generated.dir}/asm/classes"/>
<property name="generated.mmtk-harness-parser.java" location="${generated.dir}/mmtk-harness-parser/java/org/mmtk/harness/lang/parser"/>
<!-- Set the properties for distribution directory -->
<property name="dist.base" location="${dist.dir}/${build.name}"/>
<!-- Set the class library to use -->
<property name="classlib.provider" value="GNU Classpath"/>
<condition property="harmony.classlib" value="true">
<equals arg1="${classlib.provider}" arg2="Harmony"/>
</condition>
<condition property="classpath.classlib" value="true">
<equals arg1="${classlib.provider}" arg2="GNU Classpath"/>
</condition>
<!-- Permit parallelisation of the bootimage build -->
<property name="bootimage.threads" value="1"/>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Property initialization section of the build * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="check-config-properties">
<fail unless="config.name">
config.name property not specified. Please specify property on commandline or in ${jikesrvm.dir}/.ant.properties.
</fail>
<available property="host_config_present" file="${config.file}"/>
<fail unless="host_config_present">
Configuration file ${config.file} not present. Please set config.name to the name of file in
${jikesrvm.dir}/build/configs directory without the .properties suffix.
</fail>
<test-property name="config.mmtk.plan" location="${config.file}"/>
</target>
<target name="check-target-properties">
<available property="target_config_present" file="${target.file}"/>
<fail unless="target_config_present">
Target file ${target.file} not present. Please set target.name to the name of file in
${jikesrvm.dir}/build/targets directory without the .properties suffix.
</fail>
<test-property name="target.arch" location="${target.file}"/>
<test-property name="target.os" location="${target.file}"/>
<test-property name="target.bootimage.code.address" location="${target.file}"/>
<test-property name="target.bootimage.data.address" location="${target.file}"/>
<test-property name="target.bootimage.rmap.address" location="${target.file}"/>
<test-property name="target.max-mappable.address" location="${target.file}"/>
<test-property name="target.address.size" location="${target.file}"/>
<test-property name="target.dll-prefix" location="${target.file}"/>
<test-property name="target.dll-ext" location="${target.file}"/>
<test-property name="target.jni-suffix" location="${target.file}"/>
</target>
<target name="check-host-properties" depends="check-host-name">
<available property="host_file_present" file="${host.file}"/>
<fail unless="host_file_present">
Host file ${host.file} not present. Please set host.name to the name of file in ${jikesrvm.dir}/build/hosts
directory without the .properties suffix.
</fail>
<test-file name="bison.exe" location="${host.file}"/>
<test-file name="c++.exe" location="${host.file}"/>
<test-file name="c.exe" location="${host.file}"/>
<test-file name="perl.exe" location="${host.file}"/>
<test-file name="bash.exe" location="${host.file}"/>
<test-property name="c++.args" location="${host.file}"/>
<test-property name="c.args" location="${host.file}"/>
<test-property name="shld.args" location="${host.file}"/>
</target>
<target name="check-classlibrary-properties">
<fail message="Cannot have both Harmony and Classpath class libraries">
<condition>
<and>
<isset property="harmony.classlib"/>
<isset property="classpath.classlib"/>
</and>
</condition>
</fail>
<fail message="No class library specified. Make sure classlib.provider is defined.">
<condition>
<not>
<or>
<equals arg1="${classlib.provider}" arg2="Harmony"/>
<equals arg1="${classlib.provider}" arg2="GNU Classpath"/>
</or>
</not>
</condition>
</fail>
<fail message="No class library specified. Make sure classlib.provider is defined.">
<condition>
<not>
<or>
<isset property="harmony.classlib"/>
<isset property="classpath.classlib"/>
</or>
</not>
</condition>
</fail>
</target>
<target name="check-classpath-properties" depends="check-components-properties,check-classlibrary-properties" if="classpath.classlib">
<propertycopy name="classpath.lib.dir" from="${target.name}.classpath.lib.dir"/>
<test-file name="classpath.lib.dir" location="${components.file}"/>
<property file="${classpath.lib.dir}/constants.properties"/>
<property name="config.portable-native-sync" value="true"/>
<property name="build.extra.rt.jars" value=""/>
</target>
<target name="check-harmony-properties" depends="check-components-properties,check-classlibrary-properties" if="harmony.classlib">
<propertycopy name="harmony.lib.dir" from="${target.name}.harmony.lib.dir"/>
<test-file name="harmony.lib.dir" location="${components.file}"/>
<property file="${harmony.lib.dir}/constants.properties"/>
<property name="config.portable-native-sync" value="false"/> <!-- has no meaning for Harmony -->
<property name="build.extra.rt.jars" value=":${harmony.lib.dir}/yoko-rmi-impl.jar:${harmony.lib.dir}/instrument.jar:${harmony.lib.dir}/beans.jar:${harmony.lib.dir}/xml-apis.jar:${harmony.lib.dir}/mx4j.jar:${harmony.lib.dir}/nio.jar:${harmony.lib.dir}/xalan.jar:${harmony.lib.dir}/resolver.jar:${harmony.lib.dir}/logging.jar:${harmony.lib.dir}/bcprov.jar:${harmony.lib.dir}/security.jar:${harmony.lib.dir}/sql.jar:${harmony.lib.dir}/print.jar:${harmony.lib.dir}/mx4j-remote.jar:${harmony.lib.dir}/concurrent.jar:${harmony.lib.dir}/luni-kernel-stubs.jar:${harmony.lib.dir}/misc.jar:${harmony.lib.dir}/accessibility.jar:${harmony.lib.dir}/crypto.jar:${harmony.lib.dir}/yoko.jar:${harmony.lib.dir}/rmi.jar:${harmony.lib.dir}/security-kernel-stubs.jar:${harmony.lib.dir}/x-net.jar:${harmony.lib.dir}/icu4j-charsets-4_0.jar:${harmony.lib.dir}/imageio.jar:${harmony.lib.dir}/nio_char.jar:${harmony.lib.dir}/lang-management.jar:${harmony.lib.dir}/regex.jar:${harmony.lib.dir}/applet.jar:${harmony.lib.dir}/prefs.jar:${harmony.lib.dir}/annotation.jar:${harmony.lib.dir}/math.jar:${harmony.lib.dir}/luni.jar:${harmony.lib.dir}/archive.jar:${harmony.lib.dir}/awt.jar:${harmony.lib.dir}/nio_char-src.jar:${harmony.lib.dir}/xercesImpl.jar:${harmony.lib.dir}/yoko-rmi-spec.jar:${harmony.lib.dir}/swing.jar:${harmony.lib.dir}/auth.jar:${harmony.lib.dir}/yoko-core.jar:${harmony.lib.dir}/text.jar:${harmony.lib.dir}/jndi.jar:${harmony.lib.dir}/suncompat.jar:${harmony.lib.dir}/sound.jar:${harmony.lib.dir}/icu4j-4_0.jar:${harmony.lib.dir}/bcel-5.2.jar"/>
</target>
<target name="check-mmtk-properties" depends="check-host-name">
<available property="mmtk_properties_present" file="${mmtk.properties}"/>
<fail unless="mmtk_properties_present">
MMTk properties file ${mmtk.properties} not present. Please set mmtk.properties to the name of file in ${jikesrvm.dir}/build/mmtk directory without the .properties suffix.
</fail>
<!-- Load the user-specified properties -->
<loadproperties srcFile="${mmtk.properties}"/>
<!--
Load the default properties - won't overwrite the user-specified
because properties are immutable
-->
<loadproperties srcFile="${default.mmtk.properties}"/>
<!-- Now sanity check the properties we need later -->
<test-property name="mmtk.headerMarkBit" location="${mmtk.properties}"/>
<!-- <echoproperties prefix="mmtk."/> -->
</target>
<target name="include-gcspy-check">
<condition property="include.gcspy-java" value="true">
<equals arg1="${config.include.gcspy}" arg2="true"/>
</condition>
<condition property="include.gcspy-stub" value="true">
<and>
<equals arg1="${config.include.gcspy}" arg2="true"/>
<equals arg1="${config.include.gcspy-stub}" arg2="true"/>
</and>
</condition>
<condition property="include.gcspy" value="true">
<and>
<equals arg1="${config.include.gcspy}" arg2="true"/>
<not>
<equals arg1="${config.include.gcspy-stub}" arg2="true"/>
</not>
</and>
</condition>
<condition property="include.gcspy-client" value="true">
<and>
<equals arg1="${config.include.gcspy}" arg2="true"/>
<equals arg1="${config.include.gcspy-client}" arg2="true"/>
<not>
<equals arg1="${config.include.gcspy-stub}" arg2="true"/>
</not>
</and>
</condition>
</target>
<target name="check-components-properties" depends="include-gcspy-check,prepare-ant-tasks">
<mkdir dir="${components.dir}"/>
<if>
<conditions>
<equals arg1="${classlib.provider}" arg2="GNU Classpath"/>
</conditions>
<sequential>
<ant antfile="build/components/ecj.xml" target="ensure"/>
<ant antfile="build/components/classpath.xml" target="ensure"/>
</sequential>
</if>
<if>
<conditions>
<equals arg1="${classlib.provider}" arg2="Harmony"/>
</conditions>
<sequential>
<ant antfile="build/components/harmony.xml" target="ensure"/>
</sequential>
</if>
<if>
<conditions>
<equals arg1="${config.with-profile}" arg2="true"/>
</conditions>
<sequential>
<ant antfile="build/components/dacapo.xml" target="ensure"/>
</sequential>
</if>
<ant antfile="build/components/checkstyle.xml" target="ensure"/>
<ant antfile="build/components/asm.xml" target="ensure"/>
<if>
<conditions>
<isset property="include.gcspy-client"/>
</conditions>
<sequential>
<ant antfile="build/components/jai.xml" target="ensure"/>
<ant antfile="build/components/gcspy.xml" target="ensure-client"/>
</sequential>
</if>
<if>
<conditions>
<and>
<isset property="include.gcspy"/>
<not>
<isset property="include.gcspy-client"/>
</not>
</and>
</conditions>
<sequential>
<ant antfile="build/components/gcspy.xml" target="ensure">
<property name="gcspy.skip-client" value="true"/>
</ant>
</sequential>
</if>
<property file="${components.file}"/>
</target>
<target name="check-gcspy-client-properties" depends="check-config-properties" if="include.gcspy-client">
<propertycopy name="gcspy.client.dir" from="${target.name}.gcspy.client.dir"/>
<test-file name="gcspy.client.dir" location="${components.file}"/>
</target>
<target name="check-gcspy-properties" depends="check-gcspy-client-properties" if="include.gcspy">
<propertycopy name="gcspy.server.dir" from="${target.name}.gcspy.server.dir"/>
<test-file name="gcspy.server.dir" location="${components.file}"/>
<property file="${gcspy.server.dir}/constants.properties"/>
</target>
<!--
Check to make sure all required properties are specified. This includes properties that define the:
* host environment
* target platform
* configuration settings
* component properties for classpath, gcspy etc.
-->
<target name="check-properties"
depends="check-host-properties,check-config-properties,check-target-properties,check-classlibrary-properties,check-classpath-properties,check-harmony-properties,check-gcspy-properties,check-mmtk-properties"
description="Check that all require properties are specified.">
<!-- setup properties for start of build. -->
<tstamp prefix="start">
<format property="time" pattern="EEE MMM dd HH:mm:ss z yyyy" timezone="UTC"/>
</tstamp>
<!-- set include.* properties if corresponding feature is in use. Properties used by if/unless guards. -->
<condition property="include.opt" value="true">
<equals arg1="${config.runtime.compiler}" arg2="opt"/>
</condition>
<condition property="include.ppc" value="true">
<equals arg1="${target.arch}" arg2="ppc"/>
</condition>
<condition property="include.aos" value="true">
<and>
<equals arg1="${config.include.aos}" arg2="true"/>
<equals arg1="${config.runtime.compiler}" arg2="opt"/>
</and>
</condition>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Setup filter properties * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="setup-filter-properties" depends="check-properties">
<condition property="arch.filter" value="-DRVM_FOR_POWERPC=1" else="">
<equals arg1="${target.arch}" arg2="ppc"/>
</condition>
<condition property="os.filter" value="-DRVM_FOR_AIX=1">
<equals arg1="${target.os}" arg2="AIX"/>
</condition>
<condition property="os.filter" value="-DRVM_FOR_LINUX=1 -DLINUX=1">
<equals arg1="${target.os}" arg2="Linux"/>
</condition>
<condition property="os.filter" value="-DRVM_FOR_OSX=1">
<equals arg1="${target.os}" arg2="OSX"/>
</condition>
<condition property="os.filter" value="-DRVM_FOR_SOLARIS=1">
<equals arg1="${target.os}" arg2="Solaris"/>
</condition>
<condition property="classlib.filter" value="-DRVM_FOR_HARMONY=1">
<equals arg1="${classlib.provider}" arg2="Harmony"/>
</condition>
<condition property="classlib.filter" value="-DRVM_FOR_GNU_CLASSPATH=1">
<equals arg1="${classlib.provider}" arg2="GNU Classpath"/>
</condition>
<condition property="gctrace.filter" value="-DRVM_WITH_GCTRACE=1" else="">
<equals arg1="${config.mmtk.plan}" arg2="org.mmtk.plan.semispace.gctrace.GCTrace"/>
</condition>
<condition property="gcspy.filter" value="-DRVM_WITH_GCSPY=1" else="">
<equals arg1="${config.include.gcspy}" arg2="true"/>
</condition>
<condition property="alignment-checking.filter" value="-DRVM_WITH_ALIGNMENT_CHECKING=1" else="">
<equals arg1="${config.alignment-checking}" arg2="true"/>
</condition>
<property name="addr.filter" value="-DRVM_FOR_${target.address.size}_ADDR=1"/>
<condition property="perfevent.filter" value="-DRVM_WITH_PERFEVENT=1" else="">
<equals arg1="${config.include.perfevent}" arg2="true"/>
</condition>
<property name="filter" value="${arch.filter} ${os.filter} ${addr.filter} ${gctrace.filter} ${gcspy.filter} ${alignment-checking.filter} ${perfevent.filter} ${classlib.filter}"/>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Building MMTk section of the build * -->
<!-- * * -->
<!-- **************************************************************************** -->
<target name="compile-vmmagic-stub">
<mkdir dir="${build.vmmagic-stub.classes}"/>
<javac srcdir="${vmmagic-stub.java}" destdir="${build.vmmagic-stub.classes}" debug="true" debugLevel="lines,source"
source="1.5" target="1.5"/>
</target>
<target name="compile-options" depends="compile-vmmagic-stub">
<mkdir dir="${build.options.classes}"/>
<javac srcdir="${options.java}" destdir="${build.options.classes}" debug="true" debugLevel="lines,source"
source="1.5" target="1.5">
<classpath>
<pathelement location="${build.vmmagic-stub.classes}"/>
</classpath>
</javac>
</target>
<!-- we are compiling mmtk independently to ensure that it can build independent of the rvm -->
<target name="compile-mmtk" depends="compile-vmmagic-stub,compile-options" description="Compile MMTk toolkit.">
<property name="build.mmtk.classes" location="${build.dir}/mmtk/classes"/>
<mkdir dir="${build.mmtk.classes}"/>
<javac srcdir="${mmtk.java}" destdir="${build.mmtk.classes}" debug="true" debugLevel="lines,source" source="1.5"
target="1.5">
<classpath>
<pathelement location="${build.vmmagic-stub.classes}"/>
<pathelement location="${build.options.classes}"/>
</classpath>
</javac>
<jar destfile="${build.mmtk.jar}" basedir="${build.mmtk.classes}"/>
</target>
<target name="ensure-javacc">
<ant antfile="javacc.xml" dir="${jikesrvm.dir}/build/components" target="ensure"/>
</target>
<target name="mmtk-harness" depends="compile-mmtk,ensure-javacc">
<property name="build.mmtk-harness.classes" location="${build.dir}/mmtk/harness/classes"/>
<property file="${components.file}"/>
<mkdir dir="${generated.mmtk-harness-parser.java}"/>
<echo message="${javacc.dir}"/>
<javacc target="${basedir}/MMTk/harness/src-generated/org/mmtk/harness/lang/parser/Parser.jj" javacchome="${javacc.dir}" outputdirectory="${generated.mmtk-harness-parser.java}"/>
<mkdir dir="${build.mmtk-harness.classes}"/>
<javac srcdir="${mmtk-harness.java}:${mmtk-harness-vmmagic.java}:${mmtk-vm-harness.java}:${generated.mmtk-harness-parser.java}"
destdir="${build.mmtk-harness.classes}" debug="true" debugLevel="lines,source"
source="1.6" target="1.6">
<classpath>
<pathelement location="${build.vmmagic-stub.classes}"/>
<pathelement location="${build.mmtk.classes}"/>
<pathelement location="${build.options.classes}"/>
</classpath>
</javac>
<jar destfile="${build.mmtk-harness.jar}" update="true" compress="false">
<manifest>
<attribute name="Main-Class" value="org.mmtk.harness.Main"/>
</manifest>
<fileset dir="${build.vmmagic-stub.classes}"/>
<fileset dir="${build.mmtk-harness.classes}"/>
<fileset dir="${build.mmtk.classes}"/>
<fileset dir="${build.options.classes}"/>
</jar>
</target>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Building and using the template-expander. * -->
<!-- * * -->
<!-- **************************************************************************** -->
<!-- Macro to preprocess source files -->
<macrodef name="GenerateFromTemplate">
<element name="args"/>
<sequential>
<java classname="org.jikesrvm.tools.template.GenerateFromTemplate" failonerror="true">
<classpath>
<pathelement location="${tasks.classes}"/>
</classpath>
<args/>
</java>
</sequential>
</macrodef>
<!-- **************************************************************************** -->
<!-- * * -->
<!-- * Section for generating source prior to build occuring * -->
<!-- * * -->
<!-- **************************************************************************** -->
<!-- build baseclass for vmmagic -->
<target name="gen-vmmagic-word" depends="check-properties">
<mkdir dir="${generated.dir}/vmmagic/32/java/org/vmmagic/unboxed"/>
<mkdir dir="${generated.dir}/vmmagic/64/java/org/vmmagic/unboxed"/>
<copy file="${basedir}/tools/bootImageWriter/vmmagic/src/org/vmmagic/unboxed/ArchitecturalWord.template"
tofile="${generated.dir}/vmmagic/32/java/org/vmmagic/unboxed/ArchitecturalWord.java">
<filterset>
<filter token="32MASK" value=""/>
<filter token="64MASK" value="//"/>
</filterset>
</copy>
<copy file="${basedir}/tools/bootImageWriter/vmmagic/src/org/vmmagic/unboxed/ArchitecturalWord.template"
tofile="${generated.dir}/vmmagic/64/java/org/vmmagic/unboxed/ArchitecturalWord.java">
<filterset>
<filter token="32MASK" value="//"/>
<filter token="64MASK" value=""/>
</filterset>
</copy>
</target>
<!-- Macro to build IR and related artifacts (scheduler, burs) for opt compiler -->
<macrodef name="generate-ir">
<attribute name="arch"/>
<attribute name="addressSize"/>
<attribute name="operatorList"/>
<attribute name="rulesList"/>
<sequential>
<mkdir dir="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/ir"/>
<GenerateFromTemplate>
<args>
<arg path="${build.ir.dir}/Operator.template"/>
<arg path="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/ir/Operator.java"/>
<arg value="ARCH_IR_DIR=@{arch}"/>
<arg value="ARCHITECTURE=@{arch}"/>
<arg value="ARCH_BITS=@{addressSize}"/>
<arg value="ARCH_OP_LIST=@{operatorList}"/>
<arg value="INSTRFMTPKG=org.jikesrvm.compilers.opt.ir"/>
<arg value="RVMPKG=org.jikesrvm."/>
<arg value="ARCHPKG=@{arch}"/>
</args>
</GenerateFromTemplate>
<GenerateFromTemplate>
<args>
<arg path="${build.ir.dir}/Operators.template"/>
<arg path="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/ir/Operators.java"/>
<arg value="ARCH_IR_DIR=@{arch}"/>
<arg value="ARCHITECTURE=@{arch}"/>
<arg value="ARCH_BITS=@{addressSize}"/>
<arg value="ARCH_OP_LIST=@{operatorList}"/>
<arg value="INSTRFMTPKG=org.jikesrvm.compilers.opt.ir"/>
<arg value="RVMPKG=org.jikesrvm."/>
<arg value="ARCHPKG=@{arch}"/>
</args>
</GenerateFromTemplate>
<GenerateFromTemplate>
<args>
<arg path="${build.ir.dir}/OperatorNames.template"/>
<arg path="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/ir/OperatorNames.java"/>
<arg value="ARCH_IR_DIR=@{arch}"/>
<arg value="ARCHITECTURE=@{arch}"/>
<arg value="ARCH_BITS=@{addressSize}"/>
<arg value="ARCH_OP_LIST=@{operatorList}"/>
<arg value="INSTRFMTPKG=org.jikesrvm.compilers.opt.ir"/>
<arg value="RVMPKG=org.jikesrvm."/>
<arg value="ARCHPKG=@{arch}"/>
</args>
</GenerateFromTemplate>
<GenerateFromTemplate>
<args>
<arg path="${build.ir.dir}/InstructionFormats.template"/>
<arg path="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/ir/InstructionFormats.RAW"/>
<arg value="ARCH_IR_DIR=@{arch}"/>
<arg value="ARCH_IF_LIST=${build.ir.dir}/@{arch}/InstructionFormatList.dat"/>
<arg value="ARCHITECTURE=@{arch}"/>
<arg value="ARCH_BITS=@{addressSize}"/>
<arg value="INSTRFMTPKG=org.jikesrvm.compilers.opt.ir"/>
<arg value="ARCHPKG=@{arch}"/>
</args>
</GenerateFromTemplate>
<exec executable="${perl.exe}" failonerror="true">
<arg path="${build.ir.dir}/splitInstructionFormats.perl"/>
<arg path="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/ir"/>
<arg path="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/ir/InstructionFormats.RAW"/>
</exec>
<mkdir dir="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/lir2mir/@{arch}"/>
<GenerateFromTemplate>
<args>
<arg path="${build.burs.dir}/ir.template"/>
<arg path="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/lir2mir/@{arch}/ir.brg"/>
<arg value="ARCHITECTURE_IR_DIR=${build.ir.dir}/@{arch}"/>
<arg value="ARCH_OP_LIST=@{operatorList}"/>
<arg value="THE_RULE_FILE=@{rulesList}"/>
</args>
</GenerateFromTemplate>
<exec executable="${build.jburg.dir}/jburg"
dir="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/lir2mir/@{arch}"
failonerror="true">
<arg value="-a"/>
<arg value="@{arch}"/>
<arg value="-p"/>
<arg value="BURS"/>
<arg value="ir.brg"/>
<redirector
output="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/lir2mir/@{arch}/jburg.out"/>
</exec>
<copy file="${basedir}/rvm/src-generated/opt-burs/jburg/burg.template"
todir="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/lir2mir/@{arch}">
<filterset>
<filter token="_ARCH_" value="@{arch}"/>
</filterset>
</copy>
<copy file="${build.burs.dir}/BURS_TreeNode.template"
todir="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/lir2mir/@{arch}">
<filterset>
<filter token="_ARCH_" value="@{arch}"/>
</filterset>
</copy>
<concat
destfile="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/lir2mir/@{arch}/BURS_TreeNode.java">
<filelist dir="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/lir2mir/@{arch}"
files="BURS_TreeNode.template"/>
<filelist dir="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/lir2mir/@{arch}"
files="BURS_State.template"/>
</concat>
<concat destfile="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/lir2mir/@{arch}/BURS_STATE.java">
<filelist dir="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/lir2mir/@{arch}"
files="burg.template"/>
<filelist dir="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/lir2mir/@{arch}"
files="jburg.out"/>
</concat>
<mkdir dir="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/instrsched"/>
<GenerateFromTemplate>
<args>
<arg path="${basedir}/rvm/src-generated/opt-scheduler/OperatorClass.template"/>
<arg path="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/compilers/opt/instrsched/OperatorClass.java"/>
<arg value="ARCHITECTURE_IR_DIR=@{arch}"/>
<arg value="ADDRESS_MODE=@{addressSize}"/>
</args>
</GenerateFromTemplate>
<condition property="@{arch}-ppc_quote" value="/**" else="">
<equals arg1="@{arch}" arg2="ppc"/>
</condition>
<condition property="@{arch}-ia32_quote" value="/**" else="">
<equals arg1="@{arch}" arg2="ia32"/>
</condition>
<copy file="${basedir}/rvm/src-generated/vm-configuration/ArchitectureSpecific.template"
tofile="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/ArchitectureSpecific.java">
<filterset>
<filter token="_ARCH_" value="@{arch}"/>
<filter token="_PPC_QUOTE_" value="${@{arch}-ppc_quote}"/>
<filter token="_IA32_QUOTE_" value="${@{arch}-ia32_quote}"/>
</filterset>
</copy>
<copy file="${basedir}/rvm/src-generated/vm-configuration/ArchitectureSpecificOpt.template"
tofile="${generated.dir}/@{arch}-@{addressSize}/main/java/org/jikesrvm/ArchitectureSpecificOpt.java">
<filterset>
<filter token="_ARCH_" value="@{arch}"/>
<filter token="_PPC_QUOTE_" value="${@{arch}-ppc_quote}"/>
<filter token="_IA32_QUOTE_" value="${@{arch}-ia32_quote}"/>
</filterset>
</copy>
</sequential>
</macrodef>
<!-- build tool used to create burs -->
<target name="build-jburg" depends="check-properties">
<property name="build.jburg.dir" location="${build.dir}/${host.name}/jburg"/>
<mkdir dir="${build.jburg.dir}"/>
<exec executable="${bison.exe}" failonerror="true">
<arg value="--output=${build.jburg.dir}/gram.c"/>
<arg value="${basedir}/rvm/src-generated/opt-burs/jburg/gram.y"/>
</exec>
<exec executable="${c.exe}" failonerror="true">
<arg
line="-W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wmissing-prototypes -Wmissing-declarations -fkeep-static-consts -fkeep-inline-functions -Wwrite-strings -Wno-aggregate-return -Wmissing-noreturn -Wnested-externs -Wtrigraphs -Wconversion -Wsign-compare -Wno-unused -Wno-strict-prototypes -Wno-undef"/>
<arg value="-I"/>
<arg value="${basedir}/rvm/src-generated/opt-burs/jburg"/>
<arg value="-o"/>
<arg value="${build.jburg.dir}/jburg"/>
<arg value="${basedir}/rvm/src-generated/opt-burs/jburg/jburg.c"/>
<arg value="${build.jburg.dir}/gram.c"/>
</exec>
</target>
<!-- build ir for target architecture -->
<target name="gen-opt-ir" depends="build-jburg">
<property name="build.ir.dir" location="${basedir}/rvm/src-generated/opt-ir"/>
<property name="build.burs.dir" location="${basedir}/rvm/src-generated/opt-burs"/>
<!-- generate operator lists for ppc 32 bit -->
<concat destfile="${generated.dir}/PPC-32bit_OperatorList.dat">
<filelist dir="${build.ir.dir}/ppc"
files="OperatorList_Common.dat,OperatorList_Alu32.dat,OperatorList_Mem32.dat"/>
</concat>
<!-- generate operator lists for ppc 64 bit -->
<concat destfile="${generated.dir}/PPC-64bit_OperatorList.dat">
<filelist dir="${build.ir.dir}/ppc"
files="OperatorList_Common.dat,OperatorList_Alu64.dat,OperatorList_Mem64.dat"/>
</concat>
<!-- generate rule lists for ppc 32 bit -->
<concat destfile="${generated.dir}/PPC-32bit_RulesList.dat">
<filelist dir="${build.burs.dir}/ppc" files="PPC_Common.rules,PPC_Alu32.rules,PPC_Mem32.rules"/>
</concat>
<!-- generate rule lists for ppc 64 bit -->
<concat destfile="${generated.dir}/PPC-64bit_RulesList.dat">
<filelist dir="${build.burs.dir}/ppc" files="PPC_Common.rules,PPC_Alu64.rules,PPC_Mem64.rules"/>
</concat>
<if>
<conditions>
<equals arg1="${target.arch.sse2}" arg2="full"/>
</conditions>
<sequential>
<property name="ia32-fp-rules" value="IA32_SSE2.rules"/>
</sequential>
</if>
<property name="ia32-fp-rules" value="IA32_x87.rules"/>
<concat destfile="${generated.dir}/IA32_RulesList.dat">
<filelist dir="${build.burs.dir}/ia32" files="IA32.rules,${ia32-fp-rules}"/>
</concat>
<generate-ir arch="ia32"
addressSize="32"
operatorList="${build.ir.dir}/ia32/OperatorList.dat"
rulesList="${generated.dir}/IA32_RulesList.dat"/>
<generate-ir arch="ia32"
addressSize="64"
operatorList="${build.ir.dir}/ia32/OperatorList.dat"
rulesList="${generated.dir}/IA32_RulesList.dat"/>
<generate-ir arch="ppc"
addressSize="32"
operatorList="${generated.dir}/PPC-32bit_OperatorList.dat"
rulesList="${generated.dir}/PPC-32bit_RulesList.dat"/>
<generate-ir arch="ppc"
addressSize="64"
operatorList="${generated.dir}/PPC-64bit_OperatorList.dat"
rulesList="${generated.dir}/PPC-64bit_RulesList.dat"/>
</target>
<!-- build options -->
<target name="gen-options" depends="check-properties">
<property name="options.dir" location="${basedir}/rvm/src-generated/options"/>
<mkdir dir="${generated.java}/org/jikesrvm/compilers/opt"/>
<mkdir dir="${generated.java}/org/jikesrvm/adaptive/util"/>
<path id="template.vm.booleanopts.dat">
<pathelement path="${options.dir}/BooleanOptions.vm.dat"/>
</path>
<path id="template.vm.valueopts.dat">
<pathelement path="${options.dir}/ValueOptions.vm.dat"/>
</path>
<GenerateFromTemplate>
<args>
<arg path="${options.dir}/Options.template"/>
<arg path="${generated.java}/org/jikesrvm/Options.java"/>
<arg value="BOOLEAN_DAT_FILES=${toString:template.vm.booleanopts.dat}"/>
<arg value="VALUE_DAT_FILES=${toString:template.vm.valueopts.dat}"/>
</args>
</GenerateFromTemplate>
<mkdir dir="${generated.java}/org/jikesrvm/compilers/baseline"/>
<path id="template.shared.booleanopts.dat">
<pathelement path="${options.dir}/SharedBooleanOptions.dat"/>
</path>
<path id="template.shared.valueopts.dat">
<pathelement path="${options.dir}/SharedValueOptions.dat"/>
</path>
<path id="template.base.booleanopts.dat">
<pathelement path="${options.dir}/BooleanOptions.baseline.dat"/>
</path>
<path id="template.base.valueopts.dat">
<pathelement path="${options.dir}/ValueOptions.baseline.dat"/>
</path>
<GenerateFromTemplate>
<args>
<arg path="${options.dir}/BaselineOptions.template"/>
<arg path="${generated.java}/org/jikesrvm/compilers/baseline/BaselineOptions.java"/>
<arg value="BOOLEAN_DAT_FILES=${toString:template.base.booleanopts.dat} ${toString:template.shared.booleanopts.dat}"/>
<arg value="VALUE_DAT_FILES=${toString:template.base.valueopts.dat} ${toString:template.shared.valueopts.dat}"/>
<arg value="MYTYPE=BaselineOptions"/>
</args>
</GenerateFromTemplate>
<path id="template.opt.booleanopts.dat">
<pathelement path="${options.dir}/BooleanOptions.opt.dat"/>
</path>
<path id="template.opt.valueopts.dat">
<pathelement path="${options.dir}/ValueOptions.opt.dat"/>
</path>
<GenerateFromTemplate>
<args>
<arg path="${options.dir}/OptOptions.template"/>
<arg path="${generated.java}/org/jikesrvm/compilers/opt/OptOptions.java"/>
<arg value="BOOLEAN_DAT_FILES=${toString:template.opt.booleanopts.dat} ${toString:template.shared.booleanopts.dat}"/>
<arg value="VALUE_DAT_FILES=${toString:template.opt.valueopts.dat} ${toString:template.shared.valueopts.dat}"/>
<arg value="MYTYPE=OptOptions"/>
</args>
</GenerateFromTemplate>
<path id="template.aos.booleanopts.dat">
<pathelement path="${options.dir}/BooleanOptions.aos.dat"/>
</path>
<path id="template.aos.valueopts.dat">
<pathelement path="${options.dir}/ValueOptions.aos.dat"/>
</path>
<GenerateFromTemplate>
<args>
<arg path="${options.dir}/AOSOptions.template"/>
<arg path="${generated.java}/org/jikesrvm/adaptive/util/AOSExternalOptions.java"/>
<arg value="BOOLEAN_DAT_FILES=${toString:template.aos.booleanopts.dat}"/>
<arg value="VALUE_DAT_FILES=${toString:template.aos.valueopts.dat}"/>
<arg value="MYTYPE=AOSExternalOptions"/>
</args>
</GenerateFromTemplate>
</target>
<target name="gen-ia32-assembler" depends="check-properties,compile-vmmagic-stub">
<mkdir dir="${generated.ia32.java}/org/jikesrvm/compilers/common/assembler/ia32"/>
<property name="build.ia32-assembler.dir" location="${basedir}/rvm/src-generated/ia32-assembler"/>
<exec executable="${bash.exe}" failonerror="true" dir="${build.ia32-assembler.dir}">
<arg value="genAssembler.sh"/>
<arg path="${generated.ia32.java}/org/jikesrvm/compilers/common/assembler/ia32/Assembler.java"/>
<arg value="Assembler.in"/>
</exec>
<property name="build.ia32-assembler-opt.dir" location="${build.dir}/ia32-assembler-opt"/>
<property name="ia32-assembler-opt.dir" location="${basedir}/rvm/src-generated/ia32-assembler-opt"/>
<mkdir dir="${generated.ia32.java}/org/jikesrvm/compilers/opt/mir2mc/ia32"/>
<mkdir dir="${build.ia32-assembler-opt.dir}"/>
<GenerateFromTemplate>
<args>
<arg value="${ia32-assembler-opt.dir}/InstructionFormatTables.template"/>
<arg value="${build.ia32-assembler-opt.dir}/InstructionFormatTables.java"/>
<arg value="FORMAT_FILE=${basedir}/rvm/src-generated/opt-ir/ia32/InstructionFormatList.dat"/>
</args>
</GenerateFromTemplate>
<GenerateFromTemplate>
<args>
<arg value="${ia32-assembler-opt.dir}/OperatorFormatTables.template"/>
<arg value="${build.ia32-assembler-opt.dir}/OperatorFormatTables.java"/>
<arg value="OPERATOR_FILE=${basedir}/rvm/src-generated/opt-ir/ia32/OperatorList.dat"/>
</args>
</GenerateFromTemplate>
<copy todir="${build.ia32-assembler-opt.dir}">
<fileset dir="${main.java}">
<include name="org/jikesrvm/ia32/RegisterConstants.java"/>
<include name="org/jikesrvm/compilers/common/assembler/ia32/AssemblerConstants.java"/>
</fileset>
</copy>
<copy todir="${build.ia32-assembler-opt.dir}">
<globmapper from="*.fake" to="*.java"/>
<fileset dir="${ia32-assembler-opt.dir}">
<include name="**/*.fake"/>
<include name="ArchitectureSpecific.fake"/>
<include name="JikesRVMSupport.fake"/>
</fileset>
</copy>
<copy file="${main.java}/org/jikesrvm/compilers/common/assembler/ForwardReference.java"
tofile="${build.ia32-assembler-opt.dir}/org/jikesrvm/compilers/common/assembler/ForwardReference.java"/>
<copy file="${main.java}/org/jikesrvm/compilers/common/assembler/AbstractAssembler.java"
tofile="${build.ia32-assembler-opt.dir}/org/jikesrvm/compilers/common/assembler/AbstractAssembler.java"/>
<copy file="${generated.ia32.java}/org/jikesrvm/compilers/common/assembler/ia32/Assembler.java"
tofile="${build.ia32-assembler-opt.dir}/org/jikesrvm/compilers/common/assembler/ia32/Assembler.java"/>
<javac srcdir="${build.ia32-assembler-opt.dir}" destdir="${build.ia32-assembler-opt.dir}" debug="true"
debugLevel="lines,source" source="1.5" target="1.5">
<src path="${ia32-assembler-opt.dir}"/>
<classpath>
<pathelement location="${build.vmmagic-stub.classes}"/>
</classpath>
</javac>
<java classname="GenerateAssembler" failonerror="true" fork="true">
<classpath>
<pathelement location="${build.vmmagic-stub.classes}"/>
<pathelement location="${build.ia32-assembler-opt.dir}"/>
</classpath>
<jvmarg value="-DgenerateToDir=${generated.ia32.java}/org/jikesrvm/compilers/opt/mir2mc/ia32"/>
</java>
</target>
<target name="gen-config-source" depends="check-properties,get-svn-version">
<mkdir dir="${generated.config.java}/org/jikesrvm/mm/mminterface"/>
<condition property="pp_RVM_ARCH_HELPER"
value="org.jikesrvm.ppc.MachineSpecificPowerPC.PPC${target.address.size}">
<equals arg1="${target.arch}" arg2="ppc"/>
</condition>
<condition property="pp_RVM_ARCH_HELPER"
value="org.jikesrvm.ia32.MachineSpecificIA.IA32"
else="org.jikesrvm.ia32.MachineSpecificIA.EM64T">
<and>
<equals arg1="${target.arch}" arg2="ia32"/>
<equals arg1="${target.address.size}" arg2="32"/>
</and>
</condition>
<condition property="pp_RVM_FOR_POWERPC" value="true" else="false">
<equals arg1="${target.arch}" arg2="ppc"/>
</condition>
<condition property="pp_RVM_FOR_32_ADDR" value="true" else="false">
<equals arg1="${target.address.size}" arg2="32"/>
</condition>
<condition property="pp_RVM_FOR_AIX" value="true" else="false">
<equals arg1="${target.os}" arg2="AIX"/>
</condition>
<condition property="pp_RVM_FOR_LINUX" value="true" else="false">
<equals arg1="${target.os}" arg2="Linux"/>
</condition>
<condition property="pp_RVM_FOR_SOLARIS" value="true" else="false">
<equals arg1="${target.os}" arg2="Solaris" />
</condition>
<condition property="pp_RVM_FOR_SSE2" value="true" else="false">
<not>
<equals arg1="${target.arch.sse2}" arg2="none"/>
</not>
</condition>
<condition property="pp_RVM_FOR_SSE2_FULL" value="true" else="false">
<equals arg1="${target.arch.sse2}" arg2="full"/>
</condition>
<condition property="pp_RVM_WITH_ASSERTIONS" value="true" else="false">
<not>
<equals arg1="${config.assertions}" arg2="none"/>
</not>
</condition>
<condition property="pp_RVM_WITH_EXTREME_ASSERTIONS" value="true" else="false">
<equals arg1="${config.assertions}" arg2="extreme"/>
</condition>
<condition property="pp_RVM_WITH_OPT_COMPILER" value="true" else="false">
<equals arg1="${config.runtime.compiler}" arg2="opt"/>
</condition>
<condition property="pp_RVM_WITH_BASE_BOOTIMAGE_COMPILER" value="true" else="false">
<equals arg1="${config.bootimage.compiler}" arg2="base"/>
</condition>
<condition property="pp_RVM_WITH_GCTRACE" value="true" else="false">
<equals arg1="${config.mmtk.plan}" arg2="org.mmtk.plan.semispace.gctrace.GCTrace"/>
</condition>
<condition property="pp_RVM_WITH_HARMONY" value="true" else="false">
<equals arg1="${classlib.provider}" arg2="Harmony"/>
</condition>
<condition property="pp_RVM_WITH_GNU_CLASSPATH" value="true" else="false">
<equals arg1="${classlib.provider}" arg2="GNU Classpath"/>
</condition>
<copy file="${basedir}/rvm/src-generated/vm-configuration/Configuration.template"
tofile="${generated.config.java}/org/jikesrvm/Configuration.java">
<filterset>
<filter token="_RVM_VERSION_" value="Jikes RVM ${rvm.version} (r${svn.revision})"/>
<filter token="_RVM_CONFIGURATION_" value="${config.name}"/>
<filter token="_RVM_ARCH_HELPER_" value="${pp_RVM_ARCH_HELPER}"/>
<filter token="_RVM_FOR_POWERPC_" value="${pp_RVM_FOR_POWERPC}"/>
<filter token="_RVM_FOR_32_ADDR_" value="${pp_RVM_FOR_32_ADDR}"/>
<filter token="_RVM_FOR_AIX_" value="${pp_RVM_FOR_AIX}"/>
<filter token="_RVM_FOR_LINUX_" value="${pp_RVM_FOR_LINUX}"/>
<filter token="_RVM_FOR_SOLARIS_" value="${pp_RVM_FOR_SOLARIS}" />
<filter token="_RVM_FOR_SSE2_" value="${pp_RVM_FOR_SSE2}"/>
<filter token="_RVM_FOR_SSE2_FULL_" value="${pp_RVM_FOR_SSE2_FULL}"/>
<filter token="_RVM_FOR_HW_FSQRT_" value="${target.arch.hw_fsqrt}"/>
<filter token="_RVM_WITH_ASSERTIONS_" value="${pp_RVM_WITH_ASSERTIONS}"/>
<filter token="_RVM_WITH_EXTREME_ASSERTIONS_" value="${pp_RVM_WITH_EXTREME_ASSERTIONS}"/>
<filter token="_RVM_WITH_ADAPTIVE_SYSTEM_" value="${config.include.aos}"/>
<filter token="_RVM_WITH_OPT_COMPILER_" value="${pp_RVM_WITH_OPT_COMPILER}"/>
<filter token="_RVM_WITH_BASE_BOOTIMAGE_COMPILER_" value="${pp_RVM_WITH_BASE_BOOTIMAGE_COMPILER}"/>
<filter token="_RVM_MMTK_PLAN_" value="${config.mmtk.plan}"/>
<filter token="_RVM_WITH_GCSPY_" value="${config.include.gcspy}"/>
<filter token="_RVM_STRESSGC_INTERVAL_" value="${config.stress-gc-interval}"/>
<filter token="_RVM_WITH_GCTRACE_" value="${pp_RVM_WITH_GCTRACE}"/>
<filter token="_RVM_WITH_ALIGNMENT_CHECKING_" value ="${config.alignment-checking}"/>
<filter token="_PORTABLE_NATIVE_SYNC_" value="${config.portable-native-sync}"/>
<filter token="_RVM_WITH_HARMONY_" value="${pp_RVM_WITH_HARMONY}"/>
<filter token="_RVM_WITH_GNU_CLASSPATH_" value="${pp_RVM_WITH_GNU_CLASSPATH}"/>
</filterset>
</copy>
<copy file="${basedir}/rvm/src-generated/vm-configuration/Selected.template"
tofile="${generated.config.java}/org/jikesrvm/mm/mminterface/Selected.java">
<filterset>
<filter token="_PLAN_" value="${config.mmtk.plan}"/>
</filterset>
</copy>
<condition property="pp_address.method" value="fromIntZeroExtend" else="fromLong">
<equals arg1="${target.address.size}" arg2="32"/>
</condition>
<copy file="${basedir}/rvm/src-generated/vm-configuration/HeapLayoutConstants.template"
tofile="${generated.config.java}/org/jikesrvm/HeapLayoutConstants.java">
<filterset>
<filter token="_BOOTIMAGE_DATA_ADDRESS_" value="${target.bootimage.data.address}"/>
<filter token="_BOOTIMAGE_CODE_ADDRESS_" value="${target.bootimage.code.address}"/>
<filter token="_BOOTIMAGE_RMAP_ADDRESS_" value="${target.bootimage.rmap.address}"/>
<filter token="_MAXIMUM_MAPPABLE_ADDRESS_" value="${target.max-mappable.address}"/>
<filter token="_ADDRESS_METHOD_" value="${pp_address.method}"/>
</filterset>
</copy>
</target>
<!-- Control targets for the source generation -->
<target name="do-gen-source"
depends="gen-vmmagic-word,gen-options,gen-opt-ir,gen-ia32-assembler,gen-config-source">
<touch file="${generated.dir}/SourceGenerated"/>
</target>
<target name="gen-source-check" depends="check-properties">
<condition property="generated-source.present" value="true">
<and>
<available file="${generated.dir}/SourceGenerated"/>
<not>
<isset property="force.generation"/>