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" prefix="harmony-hdk-${harmony.version}" mode="755">
152 <include name="jdk/jre/bin/java"/>
153 <include name="jdk/bin/*"/>
155 <tarfileset dir="${target.dir}/hdk" prefix="harmony-hdk-${harmony.version}">
157 <exclude name="jdk/jre/bin/java"/>
158 <exclude name="jdk/bin/*"/>
159 <exclude name="jdk/jre/README"/>
161 <tarfileset dir="${target.dir}/hdk/jdk/jre"
162 prefix="harmony-hdk-${harmony.version}">
163 <include name="README"/>
167 <chksum dir="${target.dir}" file="${deploy.hdk.tar}" />
168 <chksum dir="${target.dir}" file="${deploy.hdk.tar}" type="sha" />
172 <target name="bundle-hdk-zip" depends="init" unless="is.unix">
173 <!-- create the tar file and then md5 checksum using harmony-hdk-rev as the root,
174 and setting exec bits as needed -->
175 <zip destfile="${target.dir}/${deploy.hdk.zip}" >
176 <zipfileset dir="${target.dir}/hdk" prefix="harmony-hdk-${harmony.version}" filemode="755">
177 <include name="jdk/jre/bin/java.exe"/>
178 <include name="jdk/jre/bin/javaw.exe"/>
179 <include name="jdk/bin/*"/>
181 <zipfileset dir="${target.dir}/hdk" prefix="harmony-hdk-${harmony.version}">
183 <exclude name="jdk/jre/bin/java.exe"/>
184 <exclude name="jdk/jre/bin/javaw.exe"/>
185 <exclude name="jdk/bin/*"/>
186 <exclude name="jdk/jre/README"/>
188 <zipfileset dir="${target.dir}/hdk/jdk/jre"
189 prefix="harmony-hdk-${harmony.version}">
190 <include name="README"/>
194 <chksum dir="${target.dir}" file="${deploy.hdk.zip}" />
195 <chksum dir="${target.dir}" file="${deploy.hdk.zip}" type="sha" />
198 <!-- ============================================================== -->
199 <!-- creates the JDK bundle appropriate for the platform -->
200 <!-- ============================================================== -->
201 <target name="bundle-jdk"
202 depends="assemble-jdk-doc,
206 <target name="bundle-jdk-tgz" depends="init" if="is.unix">
208 <tar tarfile="${target.dir}/${deploy.jdk.tar}" compression="gzip" >
209 <tarfileset dir="${target.dir}/hdk/jdk" prefix="harmony-jdk-${harmony.version}" mode="755">
210 <include name="jre/bin/java"/>
211 <include name="bin/*"/>
213 <tarfileset dir="${target.dir}/hdk/jdk" prefix="harmony-jdk-${harmony.version}">
215 <exclude name="jre/bin/java"/>
216 <exclude name="bin/*"/>
217 <exclude name="jre/README"/>
219 <tarfileset dir="${target.dir}/hdk/jdk/jre"
220 prefix="harmony-jdk-${harmony.version}">
221 <include name="README"/>
225 <chksum dir="${target.dir}" file="${deploy.jdk.tar}" />
226 <chksum dir="${target.dir}" file="${deploy.jdk.tar}" type="sha" />
230 <target name="bundle-jdk-zip" depends="init" unless="is.unix">
231 <zip destfile="${target.dir}/${deploy.jdk.zip}">
232 <zipfileset dir="${target.dir}/hdk/jdk" prefix="harmony-jdk-${harmony.version}" filemode="755">
233 <include name="jre/bin/java.exe"/>
234 <include name="jre/bin/javaw.exe"/>
235 <include name="bin/*"/>
237 <zipfileset dir="${target.dir}/hdk/jdk" prefix="harmony-jdk-${harmony.version}">
239 <exclude name="jre/bin/java.exe"/>
240 <exclude name="jre/bin/javaw.exe"/>
241 <exclude name="bin/*"/>
242 <exclude name="jre/README"/>
244 <zipfileset dir="${target.dir}/hdk/jdk/jre"
245 prefix="harmony-jdk-${harmony.version}">
246 <include name="README"/>
249 <chksum dir="${target.dir}" file="${deploy.jdk.zip}" />
250 <chksum dir="${target.dir}" file="${deploy.jdk.zip}" type="sha" />
253 <!-- ============================================================== -->
254 <!-- creates the JRE bundle appropriate for the platform -->
255 <!-- ============================================================== -->
256 <target name="bundle-jre"
257 depends="assemble-jre-doc,
262 <target name="bundle-jre-tgz" depends="init" if="is.unix">
264 <tar tarfile="${target.dir}/${deploy.jre.tar}" compression="gzip" >
265 <tarfileset dir="${target.dir}/hdk/jdk/jre" prefix="harmony-jre-${harmony.version}" mode="755">
266 <include name="bin/java"/>
268 <tarfileset dir="${target.dir}/hdk/jdk/jre" prefix="harmony-jre-${harmony.version}">
270 <exclude name="bin/java"/>
274 <chksum dir="${target.dir}" file="${deploy.jre.tar}" />
275 <chksum dir="${target.dir}" file="${deploy.jre.tar}" type="sha" />
279 <target name="bundle-jre-zip" depends="init" unless="is.unix">
280 <zip destfile="${target.dir}/${deploy.jre.zip}">
281 <zipfileset dir="${target.dir}/hdk/jdk/jre" prefix="harmony-jre-${harmony.version}" filemode="755">
282 <include name="bin/java.exe"/>
283 <include name="bin/javaw.exe"/>
285 <zipfileset dir="${target.dir}/hdk/jdk/jre" prefix="harmony-jre-${harmony.version}">
287 <exclude name="bin/java.exe"/>
288 <exclude name="bin/javaw.exe"/>
291 <chksum dir="${target.dir}" file="${deploy.jre.zip}" />
292 <chksum dir="${target.dir}" file="${deploy.jre.zip}" type="sha" />
296 <!-- ============================================================== -->
297 <!-- from the classlib and vm builds, creates the hdk and jre -->
298 <!-- ============================================================== -->
299 <target name="assemble-artifacts"
304 <target name="assemble-stuff">
305 <!-- create the top-level hdk directory -->
306 <mkdir dir="${target.dir}/hdk"/>
308 <!-- copy the classlib/deploy tree as the hdk
309 filtering out the jre, as that comes from
311 <copy todir="${target.dir}/hdk">
312 <fileset dir="working_classlib/deploy">
313 <exclude name="**/jre/**/*" />
314 <exclude name="**/jdk/lib/*" />
315 <exclude name="**/jdk/include/*" />
316 <exclude name="**/*.pdb" unless="copy.progdb" />
320 <!-- now copy the drlvm/build/deploy -->
321 <!-- set overwrite flag to take hythr from VM -->
322 <copy todir="${target.dir}/hdk" overwrite="true">
323 <fileset dir="working_vm/deploy">
324 <exclude name="**/*.pdb" unless="copy.progdb" />
328 <!-- now copy the working_jdktools/deploy/jdk -->
329 <copy todir="${target.dir}/hdk/jdk/">
330 <fileset dir="working_jdktools/deploy/jdk">
331 <exclude name="**/*.pdb" unless="copy.progdb" />
336 <target name="chmod-stuff" if="is.unix">
337 <chmod file="${target.dir}/hdk/jdk/bin/*" perm="ugo+x" />
338 <chmod file="${target.dir}/hdk/jdk/jre/bin/java*" perm="ugo+x" />
339 <chmod file="${target.dir}/hdk/jdk/jre/bin/keytool*" perm="ugo+x" />
340 <chmod file="${target.dir}/hdk/jdk/jre/bin/policytool*" perm="ugo+x" />
341 <chmod file="${target.dir}/hdk/jdk/jre/bin/unpack200*" perm="ugo+x" />
342 <chmod file="${target.dir}/hdk/jdk/jre/bin/pack200*" perm="ugo+x" />
345 <target name="assemble-jdk">
347 <!-- create the top-level jdk directory -->
348 <mkdir dir="${target.dir}/jdk"/>
350 <!-- now copy the drlvm/build/deploy/jre
351 contents into the jre in the JDK -->
352 <copy todir="${target.dir}/jdk/jre">
353 <fileset dir="working_vm/build/deploy/jdk/jre">
354 <exclude name="**/*.pdb" unless="copy.progdb" />
358 <!-- now copy the drlvm/build/deploy/jre
359 contents into the jre in the JDK -->
360 <copy todir="${target.dir}/jdk/">
361 <fileset dir="working_jdktools/deploy/jdk">
362 <exclude name="**/*.pdb" unless="copy.progdb" />
368 <!-- ============================================================== -->
369 <!-- copies a license and notices into the root of the hdk -->
370 <!-- ============================================================== -->
371 <target name="assemble-hdk-doc">
373 <copy todir="${target.dir}/hdk" overwrite="true">
375 <include name="LICENSE" />
376 <include name="NOTICE" />
382 <!-- ============================================================== -->
383 <!-- copies a license and notices into the root of the JDK and JRE -->
384 <!-- ============================================================== -->
385 <target name="assemble-jre-doc">
387 <copy todir="${target.dir}/hdk/jdk/jre" overwrite="true">
389 <include name="LICENSE" />
390 <include name="NOTICE" />
395 <target name="assemble-jdk-doc">
396 <copy todir="${target.dir}/hdk/jdk/" overwrite="true">
398 <include name="LICENSE" />
399 <include name="NOTICE" />
404 <!-- ============================================================== -->
405 <!-- ensures dependencies are up to date, then builds classlib -->
406 <!-- ============================================================== -->
408 <propertyset id="required.props">
409 <propertyref name="hy.cfg" />
410 <propertyref name="hy.local.zlib" />
411 <propertyref name="use.libstdc++5" />
414 <target name="build-classlib" depends="auto-fetch-classlib-libs">
415 <ant antfile="working_classlib/build.xml" target="build" inheritAll="false" >
416 <propertyset refid="required.props" />
417 <property name="svn.info" value="${harmony.long.version}"/>
418 <property name="svn.revision" value="${harmony.version}"/>
419 <property name="keep.working" value="true" />
421 <!-- hack to make sure the vm doesn't use the classlib
422 LICENSE/NOTICE files as they don't cover ICU4C
424 <copy todir="working_classlib/deploy" overwrite="true">
426 <include name="LICENSE" />
427 <include name="NOTICE" />
432 <target name="auto-fetch-classlib-libs" if="auto.fetch">
433 <ant target="fetch-classlib-libs">
434 <propertyset refid="required.props" />
435 <property name="svn.info" value="${harmony.long.version}"/>
436 <property name="svn.revision" value="${harmony.version}"/>
440 <target name="fetch-classlib-libs">
441 <ant antfile="working_classlib/build.xml" target="fetch-depends" inheritall="false" >
442 <propertyset refid="required.props" />
443 <property name="svn.info" value="${harmony.long.version}"/>
444 <property name="svn.revision" value="${harmony.version}"/>
448 <target name="clean-classlib">
449 <ant antfile="working_classlib/build.xml" target="clean" inheritAll="false" >
450 <propertyset refid="required.props" />
451 <property name="svn.info" value="${harmony.long.version}"/>
452 <property name="svn.revision" value="${harmony.version}"/>
453 <property name="keep.working" value="true" />
457 <target name="init-classlib-hdk">
458 <ant antfile="working_classlib/make/build-native.xml"
459 target="copy-makefile-includes" inheritAll="false" >
460 <property name="hy.cfg" value="${hy.cfg}"/>
461 <property name="svn.info" value="${harmony.long.version}"/>
462 <property name="svn.revision" value="${harmony.version}"/>
463 <property name="keep.working" value="true" />
467 <!-- ============================================================== -->
468 <!-- ensures that dependencies are up to date and then builds a vm -->
469 <!-- ============================================================== -->
470 <target name="build-vm" depends="auto-fetch-vm-libs">
471 <ant antfile="working_vm/build.xml" target="build" inheritAll="false" >
472 <propertyset refid="required.props" />
473 <property name="svn.info" value="${harmony.long.version}"/>
474 <property name="svn.revision" value="${harmony.version}"/>
475 <property name="deploy.canonical.flag" value="true"/>
479 <target name="auto-fetch-vm-libs" if="auto.fetch">
480 <ant target="fetch-vm-libs">
481 <propertyset refid="required.props" />
482 <property name="svn.info" value="${harmony.long.version}"/>
483 <property name="svn.revision" value="${harmony.version}"/>
487 <target name="fetch-vm-libs">
488 <ant antfile="working_vm/build.xml" target="fetch-depends" inheritall="false" >
489 <propertyset refid="required.props" />
490 <property name="svn.info" value="${harmony.long.version}"/>
491 <property name="svn.revision" value="${harmony.version}"/>
495 <target name="clean-vm">
496 <ant antfile="working_vm/build.xml" target="clean" inheritall="false" >
497 <propertyset refid="required.props" />
498 <property name="svn.info" value="${harmony.long.version}"/>
499 <property name="svn.revision" value="${harmony.version}"/>
500 <property name="deploy.canonical.flag" value="true"/>
504 <!-- ============================================================== -->
505 <!-- fetches the common resources -->
506 <!-- ============================================================== -->
507 <target name="build-commonresources" depends="auto-fetch-commonresources"/>
509 <target name="auto-fetch-commonresources" if="auto.fetch">
510 <ant target="fetch-commonresources">
511 <propertyset refid="required.props" />
512 <property name="svn.info" value="${harmony.long.version}"/>
513 <property name="svn.revision" value="${harmony.version}"/>
517 <target name="fetch-commonresources">
518 <ant antfile="common_resources/build.xml" target="fetch-depends" inheritall="false" >
519 <property name="hy.cfg" value="${hy.cfg}"/>
520 <property name="svn.info" value="${harmony.long.version}"/>
521 <property name="svn.revision" value="${harmony.version}"/>
525 <!-- ============================================================== -->
526 <!-- ensures dependencies are up to date, then builds jdktools -->
527 <!-- ============================================================== -->
528 <target name="build-jdktools" depends="auto-fetch-jdktools-libs">
529 <ant antfile="working_jdktools/build.xml" target="build" inheritall="false" >
530 <property name="hy.cfg" value="${hy.cfg}"/>
531 <property name="svn.info" value="${harmony.long.version}"/>
532 <property name="svn.revision" value="${harmony.version}"/>
536 <target name="auto-fetch-jdktools-libs" if="auto.fetch">
537 <ant target="fetch-jdktools-libs" inheritall="false" >
538 <property name="hy.cfg" value="${hy.cfg}"/>
542 <target name="fetch-jdktools-libs">
543 <ant antfile="working_jdktools/build.xml" target="fetch-depends" inheritall="false" >
544 <property name="hy.cfg" value="${hy.cfg}"/>
548 <target name="clean-jdktools">
549 <ant antfile="working_jdktools/build.xml" target="clean" inheritall="false" >
550 <property name="hy.cfg" value="${hy.cfg}"/>
551 <property name="svn.info" value="${harmony.long.version}"/>
552 <property name="svn.revision" value="${harmony.version}"/>
556 <!-- ============================================================== -->
557 <!-- recreates distribution dir -->
558 <!-- ============================================================== -->
559 <target name="setup" depends="init, properties">
560 <delete dir="${target.dir}"/>
561 <mkdir dir="${target.dir}"/>
565 <!-- ============================================================== -->
566 <!-- hard reset - removes checked out classlib and vm tree -->
567 <!-- ============================================================== -->
569 description="removes vm and classlib dirs and resets - BE SURE YOU WANT TO DO THIS"
572 <!-- delete the working directories and then do an svn update to reset them -->
573 <delete dir="working_classlib"/>
574 <delete dir="working_vm"/>
576 <exec executable="svn" dir="." failonerror="true">
577 <arg line="update" />
583 depends="init-classlib-hdk,
587 <delete dir="${target.dir}" failonerror="false" />
590 <!-- ============================================================== -->
591 <!-- switches the working_vm directory to vm module (DRLVM for now) -->
592 <!-- ============================================================== -->
593 <target name="switch-svn-vm" depends="init" if="is.svn">
594 <exec executable="svn" dir="working_vm" failonerror="true">
595 <arg line="-r${svn.revision}"/>
596 <arg line="switch" />
597 <arg line="${vm.svn.url}" />
601 <!-- ============================================================== -->
602 <!-- switches the working_classlib directory to classlib -->
603 <!-- ============================================================== -->
604 <target name="switch-svn-classlib" depends="init" if="is.svn">
605 <exec executable="svn" dir="working_classlib" failonerror="true">
606 <arg line="-r${svn.revision}"/>
607 <arg line="switch" />
608 <arg line="${classlib.svn.url}" />
612 <!-- ============================================================== -->
613 <!-- switches the working_jdktools directory to jdktools -->
614 <!-- ============================================================== -->
615 <target name="switch-svn-jdktools" depends="init" if="is.svn">
616 <exec executable="svn" dir="working_jdktools" failonerror="true">
617 <arg line="-r${svn.revision}"/>
618 <arg line="switch" />
619 <arg line="${jdktools.svn.url}" />
623 <!-- ============================================================== -->
624 <!-- switches the common_resources directory to common_resources -->
625 <!-- ============================================================== -->
626 <target name="switch-svn-commonresources" depends="init" if="is.svn">
627 <exec executable="svn" dir="common_resources" failonerror="true">
628 <arg line="-r${svn.revision}"/>
629 <arg line="switch" />
630 <arg line="${commonresources.svn.url}" />
634 <!-- ============================================================== -->
635 <!-- sets up a platform -->
636 <!-- ============================================================== -->
637 <target name="init" depends="svn-prop">
638 <!-- Determine our operating system -->
639 <condition property="is.windows">
640 <os family="windows" />
643 <condition property="is.unix">
647 <condition property="is.linux">
651 <!-- this special case makes sense -->
652 <condition property="harmony.os" value="windows">
653 <isset property="is.windows"/>
655 <condition property="harmony.os" value="linux">
659 <property name="harmony.os" value="${os.name}" />
661 <!-- Conditions for different architectures -->
662 <condition property="is.x86_64">
665 <condition property="is.x86">
671 <condition property="is.ia64">
674 <condition property="is.64bit">
680 <condition property="is.32bit">
686 <condition property="harmony.bits" value="32">
687 <isset property="is.32bit" />
689 <property name="harmony.bits" value="64" />
691 <!-- Normalized architecture name -->
692 <condition property="harmony.arch" value="x86">
693 <isset property="is.x86" />
695 <condition property="harmony.arch" value="x86_64">
702 <property name="harmony.arch" value="${os.arch}" />
704 <property name="harmony.deploy.suffix" value="-snapshot" />
706 <property name="deploy.hdk.file.prefix"
707 value="apache-harmony-hdk-r${harmony.version}" />
708 <property name="deploy.hdk.tar"
709 value="${deploy.hdk.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.tar.gz" />
710 <property name="deploy.hdk.zip"
711 value="${deploy.hdk.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.zip" />
713 <property name="deploy.jdk.file.prefix"
714 value="apache-harmony-jdk-r${harmony.version}" />
715 <property name="deploy.jdk.tar"
716 value="${deploy.jdk.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.tar.gz" />
717 <property name="deploy.jdk.zip"
718 value="${deploy.jdk.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.zip" />
720 <property name="deploy.jre.file.prefix"
721 value="apache-harmony-jre-r${harmony.version}" />
722 <property name="deploy.jre.tar"
723 value="${deploy.jre.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.tar.gz" />
724 <property name="deploy.jre.zip"
725 value="${deploy.jre.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.zip" />
727 <property name="deploy.src.file.prefix"
728 value="apache-harmony-src-r${harmony.version}" />
729 <property name="deploy.src.tar"
730 value="${deploy.src.file.prefix}${harmony.deploy.suffix}.tar.gz" />
731 <property name="deploy.src.zip"
732 value="${deploy.src.file.prefix}${harmony.deploy.suffix}.zip" />
734 <!-- copy symbol debug info to debug build on Windows -->
735 <condition property="copy.progdb">
736 <equals arg1="${hy.cfg}" arg2="debug" />
739 <!-- workaround for drlvm build till it starts with a script-->
740 <condition property="custom.props" value="-Dhy.javac.compiler=${hy.javac.compiler}"
742 <isset property="hy.javac.compiler"/>
747 <target name="properties" depends="init">
749 Apache Harmony Federated Build
750 ==========================================
751 svn rev : ${harmony.version}
752 operating system : ${harmony.os}
753 CPU architecture : ${harmony.arch}
754 word length : ${harmony.bits}
755 ant os name/arch : ${os.name}/${os.arch}
756 hosting Java : ${java.version} (${java.vendor})
757 build mode : ${hy.cfg}
758 output location : ${target.dir}
759 SVN root : ${svn.root}
763 <!-- ============================================================== -->
764 <!-- svn-prop: gets svn revision number of the build.xml file -->
765 <!-- ============================================================== -->
766 <target name="svn-prop">
768 <tempfile suffix=".xml" property="svn.tmp"/>
769 <exec executable="svn" output="${svn.tmp}" resultproperty="svn.rc">
770 <arg line="info ${basedir} --non-interactive --xml" />
772 <condition property="svn.info.file" value="${svn.tmp}">
773 <equals arg1="0" arg2="${svn.rc}"/>
775 <xmlproperty file="${svn.info.file}" prefix="federated"
776 keeproot="no" collapseAttributes="yes"/>
777 <delete file="${svn.tmp}" quiet="true"/>
779 <condition property="is.svn">
780 <isset property="federated.entry.revision"/>
782 <condition property="svn.revision" value="${federated.entry.revision}" else="unknown">
783 <isset property="is.svn"/>
785 <condition property="svn.root"
786 value="${federated.entry.repository.root}"
787 else="http://svn.apache.org/repos/asf">
788 <isset property="is.svn"/>
791 <condition property="svn.info" value="${svn.root} ${svn.revision}">
792 <isset property="is.svn"/>
795 <format property="svn.info" pattern="'Unknown revision at' dd-MMM-yyyy hh:mm aa"/>
798 <property name="harmony.version" value="${svn.revision}" />
799 <property name="harmony.long.version" value="${svn.info}" />
801 <!-- default SVN URLs -->
802 <condition property="classlib.svn.url"
803 value="${svn.root}/harmony/enhanced/classlib/branches/java6"
804 else="${svn.root}/harmony/enhanced/classlib/trunk">
805 <isset property="java6" />
808 <property name="vm.svn.url" value="${svn.root}/harmony/enhanced/drlvm/trunk" />
810 <condition property="jdktools.svn.url"
811 value="${svn.root}/harmony/enhanced/jdktools/branches/java6"
812 else="${svn.root}/harmony/enhanced/jdktools/trunk">
813 <isset property="java6" />
816 <property name="commonresources.svn.url" value="${svn.root}/harmony/enhanced/common_resources/trunk" />
819 <target name="bundle-src-tgz" depends="init" if="is.unix">
821 <tar tarfile="${target.dir}/${deploy.src.tar}" compression="gzip"
823 <tarfileset dir="${target.dir}/src" prefix="apache-harmony-src-r${harmony.version}" mode="755">
824 <include name="debian/rules"/>
826 <tarfileset dir="${target.dir}/src" prefix="apache-harmony-src-r${harmony.version}">
828 <exclude name="debian/rules"/>
832 <chksum dir="${target.dir}" file="${deploy.src.tar}" />
833 <chksum dir="${target.dir}" file="${deploy.src.tar}" type="sha" />
837 <target name="bundle-src-zip" depends="init" unless="is.unix">
838 <zip destfile="${target.dir}/${deploy.src.zip}">
839 <zipfileset dir="${target.dir}/src" prefix="apache-harmony-src-r${harmony.version}" filemode="755">
840 <include name="debian/rules"/>
842 <zipfileset dir="${target.dir}/src" prefix="apache-harmony-src-r${harmony.version}">
844 <exclude name="debian/rules"/>
847 <chksum dir="${target.dir}" file="${deploy.src.zip}" />
848 <chksum dir="${target.dir}" file="${deploy.src.zip}" type="sha" />
851 <target name="copy-src" depends="init,populate-src">
852 <exec executable="svn">
853 <arg value="export" />
855 <arg value="${target.dir}/src" />
857 <echo file="${target.dir}/src/release.properties">
858 harmony.version=${harmony.version}
859 harmony.long.version=${harmony.long.version}
860 harmony.deploy.suffix=${harmony.deploy.suffix}
862 <chmod file="${target.dir}/src/debian/rules" perm="ugo+x" />
865 <!-- ============================================================== -->
866 <!-- produces a nice looking checksum -->
867 <!-- ============================================================== -->
868 <macrodef name="chksum">
869 <attribute name="dir" />
870 <attribute name="file" />
871 <attribute name="type" default="md5" />
873 <checksum property="@{file}.@{type}"
874 file="@{dir}/@{file}"
875 algorithm="@{type}" />
876 <echo file="@{dir}/@{file}.@{type}"
877 message="${@{file}.@{type}} @{file}${line.separator}" />