1 <?xml version="1.0" encoding="UTF-8"?>
4 Licensed to the Apache Software Foundation (ASF) under one or more
5 contributor license agreements. See the NOTICE file distributed with
6 this work for additional information regarding copyright ownership.
7 The ASF licenses this file to You under the Apache License, Version 2.0
8 (the "License"); you may not use this file except in compliance with
9 the License. You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
21 <project name="build-harmony" default="build" basedir=".">
23 <!-- name of the target directory to use for building and final assembly -->
24 <property name="target.dir" value="target" />
26 <!-- release property file which is added to source release -->
27 <property file="release.properties" />
29 <!-- debug or release version -->
30 <property name="hy.cfg" value="release" />
32 <property name="hy.local.zlib" value="false" />
35 Apache Harmony project federation script
40 Apache Harmony Ant Build
45 Compiles the java and native code to produce a jdk in
49 Removes all the files generated by a build.
52 Performs a full build - that is 'clean' then 'build'.
55 Produces a archive (tar/zip) of a build.
58 Fetches dependencies. Note: Some of Harmony's dependencies are
59 licensed under terms other than the Apache License v2.
62 Display the common build properties.
68 <!-- ============================================================== -->
69 <!-- main target - should checkout, build and package hdk,
71 <!-- ============================================================== -->
73 description="setup and build complete implementation"
82 <target name="snapshot"
83 description="setup and build complete src + binaries set"
92 description="build complete implementation"
96 build-commonresources,
100 <target name="bundle-src"
101 description="assemble source snapshot"
108 <!-- ============================================================== -->
109 <!-- populates the source directories, working_classlib,
110 working_vm, working_jdktools, and common_resources -->
111 <!-- ============================================================== -->
112 <target name="populate-src"
113 description="checkout the class library and VM source trees"
119 switch-svn-commonresources" />
121 <!-- ============================================================== -->
122 <!-- creates the HDK bundle appropriate for the platform -->
123 <!-- ============================================================== -->
124 <target name="bundle-hdk"
125 depends="assemble-artifacts,
130 <!-- ============================================================== -->
131 <!-- builds with a clean first -->
132 <!-- ============================================================== -->
133 <target name="rebuild" depends="clean, build"
134 description="Performs a full build - that is 'clean' then 'build'" />
136 <!-- ============================================================== -->
137 <!-- fetches external dependencies -->
138 <!-- ============================================================== -->
139 <target name="fetch-depends"
140 description="Fetches dependencies. Note: Some of Harmony dependencies are licensed under terms other than the Apache License v2."
141 depends="fetch-classlib-libs,
143 fetch-commonresources,
144 fetch-jdktools-libs"/>
146 <target name="bundle-hdk-tgz" depends="init" if="is.unix">
148 <!-- create the tar file and then md5 checksum using harmony-hdk-rev as the root,
149 and setting exec bits as needed -->
150 <tar tarfile="${target.dir}/${deploy.hdk.tar}" compression="gzip">
151 <tarfileset dir="${target.dir}/hdk"
152 prefix="${archive.dir.prefix}hdk-${harmony.version}"
154 <include name="jdk/jre/bin/java"/>
155 <include name="jdk/bin/*"/>
157 <tarfileset dir="${target.dir}/hdk"
158 prefix="${archive.dir.prefix}hdk-${harmony.version}">
160 <exclude name="jdk/jre/bin/java"/>
161 <exclude name="jdk/bin/*"/>
162 <exclude name="jdk/jre/README"/>
164 <tarfileset dir="${target.dir}/hdk/jdk/jre"
165 prefix="${archive.dir.prefix}hdk-${harmony.version}">
166 <include name="README"/>
170 <chksum dir="${target.dir}" file="${deploy.hdk.tar}" />
171 <chksum dir="${target.dir}" file="${deploy.hdk.tar}" type="sha" />
175 <target name="bundle-hdk-zip" depends="init" unless="is.unix">
176 <!-- create the tar file and then md5 checksum using harmony-hdk-rev as the root,
177 and setting exec bits as needed -->
178 <zip destfile="${target.dir}/${deploy.hdk.zip}" >
179 <zipfileset dir="${target.dir}/hdk"
180 prefix="${archive.dir.prefix}hdk-${harmony.version}"
182 <include name="jdk/jre/bin/java.exe"/>
183 <include name="jdk/jre/bin/javaw.exe"/>
184 <include name="jdk/bin/*"/>
186 <zipfileset dir="${target.dir}/hdk"
187 prefix="${archive.dir.prefix}hdk-${harmony.version}">
189 <exclude name="jdk/jre/bin/java.exe"/>
190 <exclude name="jdk/jre/bin/javaw.exe"/>
191 <exclude name="jdk/bin/*"/>
192 <exclude name="jdk/jre/README"/>
194 <zipfileset dir="${target.dir}/hdk/jdk/jre"
195 prefix="${archive.dir.prefix}hdk-${harmony.version}">
196 <include name="README"/>
200 <chksum dir="${target.dir}" file="${deploy.hdk.zip}" />
201 <chksum dir="${target.dir}" file="${deploy.hdk.zip}" type="sha" />
204 <!-- ============================================================== -->
205 <!-- creates the JDK bundle appropriate for the platform -->
206 <!-- ============================================================== -->
207 <target name="bundle-jdk"
208 depends="assemble-jdk-doc,
212 <target name="bundle-jdk-tgz" depends="init" if="is.unix">
214 <tar tarfile="${target.dir}/${deploy.jdk.tar}" compression="gzip" >
215 <tarfileset dir="${target.dir}/hdk/jdk"
216 prefix="${archive.dir.prefix}jdk-${harmony.version}"
218 <include name="jre/bin/java"/>
219 <include name="bin/*"/>
221 <tarfileset dir="${target.dir}/hdk/jdk"
222 prefix="${archive.dir.prefix}jdk-${harmony.version}">
224 <exclude name="jre/bin/java"/>
225 <exclude name="bin/*"/>
226 <exclude name="jre/README"/>
228 <tarfileset dir="${target.dir}/hdk/jdk/jre"
229 prefix="${archive.dir.prefix}jdk-${harmony.version}">
230 <include name="README"/>
234 <chksum dir="${target.dir}" file="${deploy.jdk.tar}" />
235 <chksum dir="${target.dir}" file="${deploy.jdk.tar}" type="sha" />
239 <target name="bundle-jdk-zip" depends="init" unless="is.unix">
240 <zip destfile="${target.dir}/${deploy.jdk.zip}">
241 <zipfileset dir="${target.dir}/hdk/jdk"
242 prefix="${archive.dir.prefix}jdk-${harmony.version}"
244 <include name="jre/bin/java.exe"/>
245 <include name="jre/bin/javaw.exe"/>
246 <include name="bin/*"/>
248 <zipfileset dir="${target.dir}/hdk/jdk"
249 prefix="${archive.dir.prefix}jdk-${harmony.version}">
251 <exclude name="jre/bin/java.exe"/>
252 <exclude name="jre/bin/javaw.exe"/>
253 <exclude name="bin/*"/>
254 <exclude name="jre/README"/>
256 <zipfileset dir="${target.dir}/hdk/jdk/jre"
257 prefix="${archive.dir.prefix}jdk-${harmony.version}">
258 <include name="README"/>
261 <chksum dir="${target.dir}" file="${deploy.jdk.zip}" />
262 <chksum dir="${target.dir}" file="${deploy.jdk.zip}" type="sha" />
265 <!-- ============================================================== -->
266 <!-- creates the JRE bundle appropriate for the platform -->
267 <!-- ============================================================== -->
268 <target name="bundle-jre"
269 depends="assemble-jre-doc,
274 <target name="bundle-jre-tgz" depends="init" if="is.unix">
276 <tar tarfile="${target.dir}/${deploy.jre.tar}" compression="gzip" >
277 <tarfileset dir="${target.dir}/hdk/jdk/jre"
278 prefix="${archive.dir.prefix}jre-${harmony.version}"
280 <include name="bin/java"/>
282 <tarfileset dir="${target.dir}/hdk/jdk/jre"
283 prefix="${archive.dir.prefix}jre-${harmony.version}">
285 <exclude name="bin/java"/>
289 <chksum dir="${target.dir}" file="${deploy.jre.tar}" />
290 <chksum dir="${target.dir}" file="${deploy.jre.tar}" type="sha" />
294 <target name="bundle-jre-zip" depends="init" unless="is.unix">
295 <zip destfile="${target.dir}/${deploy.jre.zip}">
296 <zipfileset dir="${target.dir}/hdk/jdk/jre"
297 prefix="${archive.dir.prefix}jre-${harmony.version}"
299 <include name="bin/java.exe"/>
300 <include name="bin/javaw.exe"/>
302 <zipfileset dir="${target.dir}/hdk/jdk/jre"
303 prefix="${archive.dir.prefix}jre-${harmony.version}">
305 <exclude name="bin/java.exe"/>
306 <exclude name="bin/javaw.exe"/>
309 <chksum dir="${target.dir}" file="${deploy.jre.zip}" />
310 <chksum dir="${target.dir}" file="${deploy.jre.zip}" type="sha" />
314 <!-- ============================================================== -->
315 <!-- from the classlib and vm builds, creates the hdk and jre -->
316 <!-- ============================================================== -->
317 <target name="assemble-artifacts"
322 <target name="assemble-stuff">
323 <!-- create the top-level hdk directory -->
324 <mkdir dir="${target.dir}/hdk"/>
326 <!-- copy the classlib/deploy tree as the hdk
327 filtering out the jre, as that comes from
329 <copy todir="${target.dir}/hdk">
330 <fileset dir="working_classlib/deploy">
331 <exclude name="**/jre/**/*" />
332 <exclude name="**/jdk/lib/*" />
333 <exclude name="**/jdk/include/*" />
334 <exclude name="**/*.pdb" unless="copy.progdb" />
338 <!-- now copy the drlvm/build/deploy -->
339 <!-- set overwrite flag to take hythr from VM -->
340 <copy todir="${target.dir}/hdk" overwrite="true">
341 <fileset dir="working_vm/deploy">
342 <exclude name="**/*.pdb" unless="copy.progdb" />
346 <!-- now copy the working_jdktools/deploy/jdk -->
347 <copy todir="${target.dir}/hdk/jdk/">
348 <fileset dir="working_jdktools/deploy/jdk">
349 <exclude name="**/*.pdb" unless="copy.progdb" />
354 <target name="chmod-stuff" if="is.unix">
355 <chmod file="${target.dir}/hdk/jdk/bin/*" perm="ugo+x" />
356 <chmod file="${target.dir}/hdk/jdk/jre/bin/java*" perm="ugo+x" />
357 <chmod file="${target.dir}/hdk/jdk/jre/bin/keytool*" perm="ugo+x" />
358 <chmod file="${target.dir}/hdk/jdk/jre/bin/policytool*" perm="ugo+x" />
359 <chmod file="${target.dir}/hdk/jdk/jre/bin/unpack200*" perm="ugo+x" />
360 <chmod file="${target.dir}/hdk/jdk/jre/bin/pack200*" perm="ugo+x" />
363 <target name="assemble-jdk">
365 <!-- create the top-level jdk directory -->
366 <mkdir dir="${target.dir}/jdk"/>
368 <!-- now copy the drlvm/build/deploy/jre
369 contents into the jre in the JDK -->
370 <copy todir="${target.dir}/jdk/jre">
371 <fileset dir="working_vm/build/deploy/jdk/jre">
372 <exclude name="**/*.pdb" unless="copy.progdb" />
376 <!-- now copy the drlvm/build/deploy/jre
377 contents into the jre in the JDK -->
378 <copy todir="${target.dir}/jdk/">
379 <fileset dir="working_jdktools/deploy/jdk">
380 <exclude name="**/*.pdb" unless="copy.progdb" />
386 <!-- ============================================================== -->
387 <!-- copies a license and notices into the root of the hdk -->
388 <!-- ============================================================== -->
389 <target name="assemble-hdk-doc">
391 <copy todir="${target.dir}/hdk" overwrite="true">
393 <include name="LICENSE" />
394 <include name="NOTICE" />
400 <!-- ============================================================== -->
401 <!-- copies a license and notices into the root of the JDK and JRE -->
402 <!-- ============================================================== -->
403 <target name="assemble-jre-doc">
405 <copy todir="${target.dir}/hdk/jdk/jre" overwrite="true">
407 <include name="LICENSE" />
408 <include name="NOTICE" />
413 <target name="assemble-jdk-doc">
414 <copy todir="${target.dir}/hdk/jdk/" overwrite="true">
416 <include name="LICENSE" />
417 <include name="NOTICE" />
422 <!-- ============================================================== -->
423 <!-- ensures dependencies are up to date, then builds classlib -->
424 <!-- ============================================================== -->
426 <propertyset id="required.props">
427 <propertyref name="hy.cfg" />
428 <propertyref name="hy.local.zlib" />
429 <propertyref name="use.libstdc++5" />
430 <propertyref name="harmony.java.version" />
433 <target name="build-classlib" depends="auto-fetch-classlib-libs">
434 <ant antfile="working_classlib/build.xml" target="build" inheritAll="false" >
435 <propertyset refid="required.props" />
436 <property name="svn.info" value="${harmony.long.version}"/>
437 <property name="svn.revision" value="${harmony.version}"/>
438 <property name="keep.working" value="true" />
440 <!-- hack to make sure the vm doesn't use the classlib
441 LICENSE/NOTICE files as they don't cover ICU4C
443 <copy todir="working_classlib/deploy" overwrite="true">
445 <include name="LICENSE" />
446 <include name="NOTICE" />
451 <target name="auto-fetch-classlib-libs" if="auto.fetch">
452 <ant target="fetch-classlib-libs">
453 <propertyset refid="required.props" />
454 <property name="svn.info" value="${harmony.long.version}"/>
455 <property name="svn.revision" value="${harmony.version}"/>
459 <target name="fetch-classlib-libs">
460 <ant antfile="working_classlib/build.xml" target="fetch-depends" inheritall="false" >
461 <propertyset refid="required.props" />
462 <property name="svn.info" value="${harmony.long.version}"/>
463 <property name="svn.revision" value="${harmony.version}"/>
467 <target name="clean-classlib">
468 <ant antfile="working_classlib/build.xml" target="clean" inheritAll="false" >
469 <propertyset refid="required.props" />
470 <property name="svn.info" value="${harmony.long.version}"/>
471 <property name="svn.revision" value="${harmony.version}"/>
472 <property name="keep.working" value="true" />
476 <target name="init-classlib-hdk">
477 <ant antfile="working_classlib/build.xml"
478 target="-init-hdk" inheritAll="false" >
479 <property name="hy.cfg" value="${hy.cfg}"/>
480 <property name="svn.info" value="${harmony.long.version}"/>
481 <property name="svn.revision" value="${harmony.version}"/>
482 <property name="keep.working" value="true" />
486 <!-- ============================================================== -->
487 <!-- ensures that dependencies are up to date and then builds a vm -->
488 <!-- ============================================================== -->
489 <target name="build-vm" depends="auto-fetch-vm-libs">
490 <ant antfile="working_vm/build.xml" target="build" inheritAll="false" >
491 <propertyset refid="required.props" />
492 <property name="svn.info" value="${harmony.long.version}"/>
493 <property name="svn.revision" value="${harmony.version}"/>
494 <property name="deploy.canonical.flag" value="true"/>
498 <target name="auto-fetch-vm-libs" if="auto.fetch">
499 <ant target="fetch-vm-libs">
500 <propertyset refid="required.props" />
501 <property name="svn.info" value="${harmony.long.version}"/>
502 <property name="svn.revision" value="${harmony.version}"/>
506 <target name="fetch-vm-libs">
507 <ant antfile="working_vm/build.xml" target="fetch-depends" inheritall="false" >
508 <propertyset refid="required.props" />
509 <property name="svn.info" value="${harmony.long.version}"/>
510 <property name="svn.revision" value="${harmony.version}"/>
514 <target name="clean-vm">
515 <ant antfile="working_vm/build.xml" target="clean" inheritall="false" >
516 <propertyset refid="required.props" />
517 <property name="svn.info" value="${harmony.long.version}"/>
518 <property name="svn.revision" value="${harmony.version}"/>
519 <property name="deploy.canonical.flag" value="true"/>
523 <!-- ============================================================== -->
524 <!-- fetches the common resources -->
525 <!-- ============================================================== -->
526 <target name="build-commonresources" depends="auto-fetch-commonresources"/>
528 <target name="auto-fetch-commonresources" if="auto.fetch">
529 <ant target="fetch-commonresources">
530 <propertyset refid="required.props" />
531 <property name="svn.info" value="${harmony.long.version}"/>
532 <property name="svn.revision" value="${harmony.version}"/>
536 <target name="fetch-commonresources">
537 <ant antfile="common_resources/build.xml" target="fetch-depends" inheritall="false" >
538 <property name="hy.cfg" value="${hy.cfg}"/>
539 <property name="svn.info" value="${harmony.long.version}"/>
540 <property name="svn.revision" value="${harmony.version}"/>
544 <!-- ============================================================== -->
545 <!-- ensures dependencies are up to date, then builds jdktools -->
546 <!-- ============================================================== -->
547 <target name="build-jdktools" depends="auto-fetch-jdktools-libs">
548 <ant antfile="working_jdktools/build.xml" target="build" inheritall="false" >
549 <property name="hy.cfg" value="${hy.cfg}"/>
550 <property name="svn.info" value="${harmony.long.version}"/>
551 <property name="svn.revision" value="${harmony.version}"/>
555 <target name="auto-fetch-jdktools-libs" if="auto.fetch">
556 <ant target="fetch-jdktools-libs" inheritall="false" >
557 <property name="hy.cfg" value="${hy.cfg}"/>
561 <target name="fetch-jdktools-libs">
562 <ant antfile="working_jdktools/build.xml" target="fetch-depends" inheritall="false" >
563 <property name="hy.cfg" value="${hy.cfg}"/>
567 <target name="clean-jdktools">
568 <ant antfile="working_jdktools/build.xml" target="clean" inheritall="false" >
569 <property name="hy.cfg" value="${hy.cfg}"/>
570 <property name="svn.info" value="${harmony.long.version}"/>
571 <property name="svn.revision" value="${harmony.version}"/>
575 <!-- ============================================================== -->
576 <!-- recreates distribution dir -->
577 <!-- ============================================================== -->
578 <target name="setup" depends="init, properties">
579 <delete dir="${target.dir}"/>
580 <mkdir dir="${target.dir}"/>
584 <!-- ============================================================== -->
585 <!-- hard reset - removes checked out classlib and vm tree -->
586 <!-- ============================================================== -->
588 description="removes vm and classlib dirs and resets - BE SURE YOU WANT TO DO THIS"
591 <!-- delete the working directories and then do an svn update to reset them -->
592 <delete dir="working_classlib"/>
593 <delete dir="working_vm"/>
595 <exec executable="svn" dir="." failonerror="true">
596 <arg line="update" />
602 depends="init-classlib-hdk,
607 <delete dir="${target.dir}" failonerror="false" />
610 <!-- ============================================================== -->
611 <!-- switches the working_vm directory to vm module (DRLVM for now) -->
612 <!-- ============================================================== -->
613 <target name="switch-svn-vm" depends="init" if="is.svn">
614 <exec executable="svn" dir="working_vm" failonerror="true">
615 <arg line="-r${svn.revision}"/>
616 <arg line="switch" />
617 <arg line="${vm.svn.url}" />
621 <!-- ============================================================== -->
622 <!-- switches the working_classlib directory to classlib -->
623 <!-- ============================================================== -->
624 <target name="switch-svn-classlib" depends="init" if="is.svn">
625 <exec executable="svn" dir="working_classlib" failonerror="true">
626 <arg line="-r${svn.revision}"/>
627 <arg line="switch" />
628 <arg line="${classlib.svn.url}" />
632 <!-- ============================================================== -->
633 <!-- switches the working_jdktools directory to jdktools -->
634 <!-- ============================================================== -->
635 <target name="switch-svn-jdktools" depends="init" if="is.svn">
636 <exec executable="svn" dir="working_jdktools" failonerror="true">
637 <arg line="-r${svn.revision}"/>
638 <arg line="switch" />
639 <arg line="${jdktools.svn.url}" />
643 <!-- ============================================================== -->
644 <!-- switches the common_resources directory to common_resources -->
645 <!-- ============================================================== -->
646 <target name="switch-svn-commonresources" depends="init" if="is.svn">
647 <exec executable="svn" dir="common_resources" failonerror="true">
648 <arg line="-r${svn.revision}"/>
649 <arg line="switch" />
650 <arg line="${commonresources.svn.url}" />
654 <!-- ============================================================== -->
655 <!-- sets up a platform -->
656 <!-- ============================================================== -->
657 <target name="init" depends="svn-prop">
658 <!-- Determine our operating system -->
659 <condition property="is.windows">
660 <os family="windows" />
663 <condition property="is.unix">
667 <condition property="is.linux">
671 <!-- this special case makes sense -->
672 <condition property="harmony.os" value="windows">
673 <isset property="is.windows"/>
675 <condition property="harmony.os" value="linux">
679 <property name="harmony.os" value="${os.name}" />
681 <!-- Conditions for different architectures -->
682 <condition property="is.x86_64">
685 <condition property="is.x86">
691 <condition property="is.ia64">
694 <condition property="is.64bit">
700 <condition property="is.32bit">
706 <condition property="harmony.bits" value="32">
707 <isset property="is.32bit" />
709 <property name="harmony.bits" value="64" />
711 <!-- Normalized architecture name -->
712 <condition property="harmony.arch" value="x86">
713 <isset property="is.x86" />
715 <condition property="harmony.arch" value="x86_64">
722 <property name="harmony.arch" value="${os.arch}" />
724 <property name="harmony.deploy.suffix" value="-snapshot" />
726 <condition property="harmony.java.version" value="6.0" else="5.0">
727 <isset property="java6" />
730 <property name="deploy.file.prefix"
731 value="apache-harmony-${harmony.java.version}-" />
733 <property name="archive.dir.prefix"
734 value="harmony-${harmony.java.version}-" />
736 <property name="deploy.hdk.file.prefix"
737 value="${deploy.file.prefix}hdk-r${harmony.version}" />
738 <property name="deploy.hdk.tar"
739 value="${deploy.hdk.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.tar.gz" />
740 <property name="deploy.hdk.zip"
741 value="${deploy.hdk.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.zip" />
743 <property name="deploy.jdk.file.prefix"
744 value="${deploy.file.prefix}jdk-r${harmony.version}" />
745 <property name="deploy.jdk.tar"
746 value="${deploy.jdk.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.tar.gz" />
747 <property name="deploy.jdk.zip"
748 value="${deploy.jdk.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.zip" />
750 <property name="deploy.jre.file.prefix"
751 value="${deploy.file.prefix}jre-r${harmony.version}" />
752 <property name="deploy.jre.tar"
753 value="${deploy.jre.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.tar.gz" />
754 <property name="deploy.jre.zip"
755 value="${deploy.jre.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.zip" />
757 <property name="deploy.src.file.prefix"
758 value="${deploy.file.prefix}src-r${harmony.version}" />
759 <property name="deploy.src.tar"
760 value="${deploy.src.file.prefix}${harmony.deploy.suffix}.tar.gz" />
761 <property name="deploy.src.zip"
762 value="${deploy.src.file.prefix}${harmony.deploy.suffix}.zip" />
764 <!-- copy symbol debug info to debug build on Windows -->
765 <condition property="copy.progdb">
766 <equals arg1="${hy.cfg}" arg2="debug" />
769 <!-- workaround for drlvm build till it starts with a script-->
770 <condition property="custom.props" value="-Dhy.javac.compiler=${hy.javac.compiler}"
772 <isset property="hy.javac.compiler"/>
777 <target name="properties" depends="init">
779 Apache Harmony Federated Build
780 ==========================================
781 svn rev : ${harmony.version}
782 operating system : ${harmony.os}
783 CPU architecture : ${harmony.arch}
784 word length : ${harmony.bits}
785 ant os name/arch : ${os.name}/${os.arch}
786 hosting Java : ${java.version} (${java.vendor})
787 build mode : ${hy.cfg}
788 output location : ${target.dir}
789 SVN root : ${svn.root}
793 <!-- ============================================================== -->
794 <!-- svn-prop: gets svn revision number of the build.xml file -->
795 <!-- ============================================================== -->
796 <target name="svn-prop">
798 <tempfile suffix=".xml" property="svn.tmp"/>
799 <exec executable="svn" output="${svn.tmp}" resultproperty="svn.rc">
800 <arg line="info ${basedir} --non-interactive --xml" />
802 <condition property="svn.info.file" value="${svn.tmp}">
803 <equals arg1="0" arg2="${svn.rc}"/>
805 <xmlproperty file="${svn.info.file}" prefix="federated"
806 keeproot="no" collapseAttributes="yes"/>
807 <delete file="${svn.tmp}" quiet="true"/>
809 <condition property="is.svn">
810 <isset property="federated.entry.revision"/>
812 <condition property="svn.revision" value="${federated.entry.revision}" else="unknown">
813 <isset property="is.svn"/>
815 <condition property="svn.root"
816 value="${federated.entry.repository.root}"
817 else="http://svn.apache.org/repos/asf">
818 <isset property="is.svn"/>
821 <condition property="svn.info" value="${svn.root} ${svn.revision}">
822 <isset property="is.svn"/>
825 <format property="svn.info" pattern="'Unknown revision at' dd-MMM-yyyy hh:mm aa"/>
828 <property name="harmony.version" value="${svn.revision}" />
829 <property name="harmony.long.version" value="${svn.info}" />
831 <!-- default SVN URLs -->
832 <condition property="classlib.svn.url"
833 value="${svn.root}/harmony/enhanced/classlib/branches/java6"
834 else="${svn.root}/harmony/enhanced/classlib/trunk">
835 <isset property="java6" />
838 <property name="vm.svn.url" value="${svn.root}/harmony/enhanced/drlvm/trunk" />
840 <condition property="jdktools.svn.url"
841 value="${svn.root}/harmony/enhanced/jdktools/branches/java6"
842 else="${svn.root}/harmony/enhanced/jdktools/trunk">
843 <isset property="java6" />
846 <property name="commonresources.svn.url" value="${svn.root}/harmony/enhanced/common_resources/trunk" />
849 <target name="bundle-src-tgz" depends="init" if="is.unix">
851 <tar tarfile="${target.dir}/${deploy.src.tar}" compression="gzip"
853 <tarfileset dir="${target.dir}/src" prefix="${deploy.file.prefix}src-r${harmony.version}" mode="755">
854 <include name="debian/rules"/>
856 <tarfileset dir="${target.dir}/src" prefix="${deploy.file.prefix}src-r${harmony.version}">
858 <exclude name="debian/rules"/>
862 <chksum dir="${target.dir}" file="${deploy.src.tar}" />
863 <chksum dir="${target.dir}" file="${deploy.src.tar}" type="sha" />
867 <target name="bundle-src-zip" depends="init" unless="is.unix">
868 <zip destfile="${target.dir}/${deploy.src.zip}">
869 <zipfileset dir="${target.dir}/src"
870 prefix="${deploy.file.prefix}src-r${harmony.version}"
872 <include name="debian/rules"/>
874 <zipfileset dir="${target.dir}/src"
875 prefix="${deploy.file.prefix}src-r${harmony.version}">
877 <exclude name="debian/rules"/>
880 <chksum dir="${target.dir}" file="${deploy.src.zip}" />
881 <chksum dir="${target.dir}" file="${deploy.src.zip}" type="sha" />
884 <target name="copy-src" depends="init,populate-src">
885 <exec executable="svn">
886 <arg value="export" />
888 <arg value="${target.dir}/src" />
890 <echo file="${target.dir}/src/release.properties">
891 harmony.version=${harmony.version}
892 harmony.long.version=${harmony.long.version}
893 harmony.deploy.suffix=${harmony.deploy.suffix}
894 harmony.java.version=${harmony.java.version}
896 <chmod file="${target.dir}/src/debian/rules" perm="ugo+x" />
900 depends="test-classlib,test-jdktools,process-test-output" />
902 <target name="clean-tests">
903 <delete dir="build/test_report" />
906 <target name="test-classlib" depends="clean-tests">
907 <ant antfile="working_classlib/make/build-test.xml"
908 target="test-modules" inheritAll="false" >
909 <propertyset refid="required.props" />
910 <property name="svn.info" value="${harmony.long.version}"/>
911 <property name="svn.revision" value="${harmony.version}"/>
912 <property name="keep.working" value="true" />
913 <property name="tests.output" location="build/test_report" />
914 <property name="test.jre.home" location="target/hdk/jdk/jre" />
918 <target name="test-jdktools" depends="clean-tests">
919 <ant antfile="working_jdktools/make/build-test.xml"
920 target="test-modules" inheritAll="false" >
921 <propertyset refid="required.props" />
922 <property name="svn.info" value="${harmony.long.version}"/>
923 <property name="svn.revision" value="${harmony.version}"/>
924 <property name="keep.working" value="true" />
925 <property name="tests.output" location="build/test_report" />
926 <property name="test.jre.home" location="target/hdk/jdk/jre" />
930 <target name="process-test-output">
931 <ant antfile="working_classlib/make/build-test.xml"
932 target="process-test-output" inheritAll="false" >
933 <propertyset refid="required.props" />
934 <property name="svn.info" value="${harmony.long.version}"/>
935 <property name="svn.revision" value="${harmony.version}"/>
936 <property name="keep.working" value="true" />
937 <property name="tests.output" location="build/test_report" />
938 <property name="test.jre.home" location="target/hdk/jdk/jre" />
942 <!-- ============================================================== -->
943 <!-- produces a nice looking checksum -->
944 <!-- ============================================================== -->
945 <macrodef name="chksum">
946 <attribute name="dir" />
947 <attribute name="file" />
948 <attribute name="type" default="md5" />
950 <checksum property="@{file}.@{type}"
951 file="@{dir}/@{file}"
952 algorithm="@{type}" />
953 <echo file="@{dir}/@{file}.@{type}"
954 message="${@{file}.@{type}} @{file}${line.separator}" />