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="default" basedir=".">
23 <!-- name of the target directory to use for building and final assembly -->
24 <property name="target.dir" value="target" />
26 <!-- classlib location to tell DRLVM build -->
27 <property name="drlvm.classlib.offset" value="../../../working_classlib"/>
29 <!-- release property file which is added to source release -->
30 <property file="release.properties" />
32 <!-- debug or release version -->
33 <property name="hy.cfg" value="release" />
35 <property name="hy.no.sig" value="false" />
36 <property name="hy.local.zlib" value="false" />
39 Apache Harmony subproject federation script
42 <!-- ================================================================================ -->
43 <!-- main target - should checkout, build and package hdk, jdk and jre -->
44 <!-- ================================================================================ -->
45 <target name="default"
46 description="setup and build complete implementation"
55 <target name="make-snapshot"
56 description="setup and build complete src + binaries set"
64 <target name="build-all"
65 description="build complete implementation"
69 build_commonresources,
72 <target name="bundle_src"
73 description="assemble source snapshot"
74 depends="setup,copy_source,bundle_src_tgz,bundle_src_zip" />
76 <!-- =============================================================================== -->
77 <!-- populates the source directories, working_classlib and working_vm -->
78 <!-- =============================================================================== -->
79 <target name="populate_source" depends="init, show_props, switch_svn_vm, switch_svn_classlib,
80 switch_svn_jdktools, switch_svn_commonresources"
81 description="checkout the class library and VM source trees"/>
83 <!-- ================================================================================ -->
84 <!-- creates the HDK bundle appropriate for the platform -->
85 <!-- ================================================================================ -->
86 <target name="bundle_hdk" depends="assemble_artifacts, assemble_hdk_doc,bundle_hdk_tgz,bundle_hdk_zip"/>
88 <target name="bundle_hdk_tgz" depends="init" if="is.unix">
90 <!-- create the tar file and then md5 checksum using harmony-hdk-rev as the root,
91 and setting exec bits as needed -->
92 <tar tarfile="${target.dir}/${deploy.hdk.tar}" compression="gzip">
93 <tarfileset dir="${target.dir}/hdk" prefix="harmony-hdk-${harmony.version}" mode="755">
94 <include name="jdk/jre/bin/java"/>
95 <include name="jdk/bin/*"/>
97 <tarfileset dir="${target.dir}/hdk" prefix="harmony-hdk-${harmony.version}">
99 <exclude name="jdk/jre/bin/java"/>
100 <exclude name="jdk/bin/*"/>
104 <chksum dir="${target.dir}" file="${deploy.hdk.tar}" />
105 <chksum dir="${target.dir}" file="${deploy.hdk.tar}" type="sha" />
109 <target name="bundle_hdk_zip" depends="init" unless="is.unix">
110 <!-- create the tar file and then md5 checksum using harmony-hdk-rev as the root,
111 and setting exec bits as needed -->
112 <zip destfile="${target.dir}/${deploy.hdk.zip}" >
113 <zipfileset dir="${target.dir}/hdk" prefix="harmony-hdk-${harmony.version}" filemode="755">
114 <include name="jdk/jre/bin/java.exe"/>
115 <include name="jdk/jre/bin/javaw.exe"/>
116 <include name="jdk/bin/*"/>
118 <zipfileset dir="${target.dir}/hdk" prefix="harmony-hdk-${harmony.version}">
120 <exclude name="jdk/jre/bin/java.exe"/>
121 <exclude name="jdk/jre/bin/javaw.exe"/>
122 <exclude name="jdk/bin/*"/>
126 <chksum dir="${target.dir}" file="${deploy.hdk.zip}" />
127 <chksum dir="${target.dir}" file="${deploy.hdk.zip}" type="sha" />
130 <!-- ================================================================================ -->
131 <!-- creates the JDK bundle appropriate for the platform -->
132 <!-- ================================================================================ -->
133 <target name="bundle_jdk" depends="assemble_jdk_doc,bundle_jdk_tgz,bundle_jdk_zip"/>
135 <target name="bundle_jdk_tgz" depends="init" if="is.unix">
137 <tar tarfile="${target.dir}/${deploy.jdk.tar}" compression="gzip" >
138 <tarfileset dir="${target.dir}/hdk/jdk" prefix="harmony-jdk-${harmony.version}" mode="755">
139 <include name="jre/bin/java"/>
140 <include name="bin/*"/>
142 <tarfileset dir="${target.dir}/hdk/jdk" prefix="harmony-jdk-${harmony.version}">
144 <exclude name="jre/bin/java"/>
145 <exclude name="bin/*"/>
149 <chksum dir="${target.dir}" file="${deploy.jdk.tar}" />
150 <chksum dir="${target.dir}" file="${deploy.jdk.tar}" type="sha" />
154 <target name="bundle_jdk_zip" depends="init" unless="is.unix">
155 <zip destfile="${target.dir}/${deploy.jdk.zip}">
156 <zipfileset dir="${target.dir}/hdk/jdk" prefix="harmony-jdk-${harmony.version}" filemode="755">
157 <include name="jre/bin/java.exe"/>
158 <include name="jre/bin/javaw.exe"/>
159 <include name="bin/*"/>
161 <zipfileset dir="${target.dir}/hdk/jdk" prefix="harmony-jdk-${harmony.version}">
163 <exclude name="jre/bin/java.exe"/>
164 <exclude name="jre/bin/javaw.exe"/>
165 <exclude name="bin/*"/>
168 <chksum dir="${target.dir}" file="${deploy.jdk.zip}" />
169 <chksum dir="${target.dir}" file="${deploy.jdk.zip}" type="sha" />
172 <!-- ================================================================================ -->
173 <!-- creates the JRE bundle appropriate for the platform -->
174 <!-- ================================================================================ -->
175 <target name="bundle_jre" depends="assemble_jre_doc,bundle_jre_tgz,bundle_jre_zip"/>
178 <target name="bundle_jre_tgz" depends="init" if="is.unix">
180 <tar tarfile="${target.dir}/${deploy.jre.tar}" compression="gzip" >
181 <tarfileset dir="${target.dir}/hdk/jdk/jre" prefix="harmony-jre-${harmony.version}" mode="755">
182 <include name="bin/java"/>
184 <tarfileset dir="${target.dir}/hdk/jdk/jre" prefix="harmony-jre-${harmony.version}">
186 <exclude name="bin/java"/>
190 <chksum dir="${target.dir}" file="${deploy.jre.tar}" />
191 <chksum dir="${target.dir}" file="${deploy.jre.tar}" type="sha" />
195 <target name="bundle_jre_zip" depends="init" unless="is.unix">
196 <zip destfile="${target.dir}/${deploy.jre.zip}">
197 <zipfileset dir="${target.dir}/hdk/jdk/jre" prefix="harmony-jre-${harmony.version}" filemode="755">
198 <include name="bin/java.exe"/>
199 <include name="bin/javaw.exe"/>
201 <zipfileset dir="${target.dir}/hdk/jdk/jre" prefix="harmony-jre-${harmony.version}">
203 <exclude name="bin/java.exe"/>
204 <exclude name="bin/javaw.exe"/>
207 <chksum dir="${target.dir}" file="${deploy.jre.zip}" />
208 <chksum dir="${target.dir}" file="${deploy.jre.zip}" type="sha" />
212 <!-- ================================================================================ -->
213 <!-- from the classlib and vm builds, creates the hdk and jre -->
214 <!-- ================================================================================ -->
215 <target name="assemble_artifacts" depends="init, assemble_stuff, chmod_stuff"/>
217 <target name="assemble_stuff">
218 <!-- create the top-level hdk directory -->
219 <mkdir dir="${target.dir}/hdk"/>
221 <!-- copy the classlib/deploy tree as the hdk
222 filtering out the jre, as that comes from
224 <copy todir="${target.dir}/hdk">
225 <fileset dir="working_classlib/deploy">
226 <exclude name="**/jre/**/*" />
227 <exclude name="**/jdk/lib/*" />
228 <exclude name="**/jdk/include/*" />
229 <exclude name="**/*.pdb" unless="copy.progdb" />
233 <!-- now copy the drlvm/build/deploy -->
234 <!-- set overwrite flag to take hythr from VM -->
235 <copy todir="${target.dir}/hdk" overwrite="true">
236 <fileset dir="working_vm/build/deploy">
237 <exclude name="**/*.pdb" unless="copy.progdb" />
241 <!-- now copy the working_jdktools/deploy/jdk -->
242 <copy todir="${target.dir}/hdk/jdk/">
243 <fileset dir="working_jdktools/deploy/jdk">
244 <exclude name="**/*.pdb" unless="copy.progdb" />
249 <target name="chmod_stuff" if="is.unix">
250 <chmod file="${target.dir}/hdk/jdk/bin/*" perm="ugo+x" />
251 <chmod file="${target.dir}/hdk/jdk/jre/bin/java*" perm="ugo+x" />
254 <target name="assemble_jdk">
256 <!-- create the top-level jdk directory -->
257 <mkdir dir="${target.dir}/jdk"/>
259 <!-- now copy the drlvm/build/deploy/jre
260 contents into the jre in the JDK -->
261 <copy todir="${target.dir}/jdk/jre">
262 <fileset dir="working_vm/build/deploy/jdk/jre">
263 <exclude name="**/*.pdb" unless="copy.progdb" />
267 <!-- now copy the drlvm/build/deploy/jre
268 contents into the jre in the JDK -->
269 <copy todir="${target.dir}/jdk/">
270 <fileset dir="working_jdktools/deploy/jdk">
271 <exclude name="**/*.pdb" unless="copy.progdb" />
277 <!-- ================================================================================ -->
278 <!-- copy license and notices into the root of the hdk -->
279 <!-- ================================================================================ -->
280 <target name="assemble_hdk_doc">
282 <copy todir="${target.dir}/hdk">
284 <include name="COPYRIGHT" />
285 <include name="LICENSE" />
286 <include name="NOTICE" />
287 <include name="THIRD_PARTY_NOTICES.txt" />
293 <!-- ================================================================================ -->
294 <!-- copy license and notices into the root of the JDK and JRE -->
295 <!-- ================================================================================ -->
296 <target name="assemble_jre_doc">
298 <copy todir="${target.dir}/hdk/jdk/jre">
300 <include name="COPYRIGHT" />
301 <include name="LICENSE" />
302 <include name="NOTICE" />
303 <include name="THIRD_PARTY_NOTICES.txt" />
308 <target name="assemble_jdk_doc">
309 <copy todir="${target.dir}/hdk/jdk/">
311 <include name="COPYRIGHT" />
312 <include name="LICENSE" />
313 <include name="NOTICE" />
314 <include name="THIRD_PARTY_NOTICES.txt" />
319 <!-- ================================================================================ -->
320 <!-- build the classlib - ensure depends are up to date an then rebuild -->
321 <!-- ================================================================================ -->
322 <target name="build_classlib" depends="auto_fetch_classlib_libs">
323 <ant antfile="working_classlib/build.xml" target="rebuild" inheritAll="false" >
324 <property name="hy.cfg" value="${hy.cfg}"/>
325 <property name="hy.no.sig" value="${hy.no.sig}"/>
326 <property name="hy.local.zlib" value="${hy.local.zlib}"/>
327 <property name="svn.info" value="${harmony.long.version}"/>
328 <property name="svn.version" value="${harmony.version}"/>
329 <property name="keep.working" value="true" />
333 <target name="auto_fetch_classlib_libs" if="auto.fetch">
334 <ant target="fetch_classlib_libs">
335 <property name="hy.cfg" value="${hy.cfg}"/>
336 <property name="hy.no.sig" value="${hy.no.sig}"/>
337 <property name="hy.local.zlib" value="${hy.local.zlib}"/>
338 <property name="svn.info" value="${harmony.long.version}"/>
339 <property name="svn.version" value="${harmony.version}"/>
343 <target name="fetch_classlib_libs">
344 <ant antfile="working_classlib/build.xml" target="fetch-depends" inheritall="false" >
345 <property name="hy.cfg" value="${hy.cfg}"/>
346 <property name="hy.no.sig" value="${hy.no.sig}"/>
347 <property name="hy.local.zlib" value="${hy.local.zlib}"/>
348 <property name="svn.info" value="${harmony.long.version}"/>
349 <property name="svn.version" value="${harmony.version}"/>
353 <target name="clean_classlib">
354 <ant antfile="working_classlib/build.xml" target="clean" inheritAll="false" >
355 <property name="hy.cfg" value="${hy.cfg}"/>
356 <property name="hy.no.sig" value="${hy.no.sig}"/>
357 <property name="hy.local.zlib" value="${hy.local.zlib}"/>
358 <property name="svn.info" value="${harmony.long.version}"/>
359 <property name="svn.version" value="${harmony.version}"/>
360 <property name="keep.working" value="true" />
364 <target name="init_classlib_hdk">
365 <ant antfile="working_classlib/make/build-native.xml"
366 target="copy-makefile-includes" inheritAll="false" >
367 <property name="hy.cfg" value="${hy.cfg}"/>
368 <property name="svn.info" value="${harmony.long.version}"/>
369 <property name="svn.version" value="${harmony.version}"/>
370 <property name="keep.working" value="true" />
374 <!-- ================================================================================ -->
375 <!-- build the vm - ensure depends are up to date an then rebuild -->
376 <!-- ================================================================================ -->
377 <target name="build_vm" depends="init,build_vm_unix,build_vm_windows"/>
379 <target name="clean_vm"
380 depends="init,build_vm_unix_clean,build_vm_windows_clean"/>
382 <target name="build_vm_unix"
383 depends="build_vm_unix_auto_update, build_vm_unix_clean, build_vm_unix_build"
386 <target name="build_vm_unix_update" depends="init" if="is.unix">
387 <exec executable="sh" dir="working_vm/build" failonerror="true">
388 <arg line="build.sh update -Dexternal.dep.CLASSLIB.loc=${drlvm.classlib.offset}"/>
389 <arg line="-Ddeploy.canonical.flag=true"/>
390 <env key="BUILD_CFG" value="${hy.cfg}"/>
394 <target name="build_vm_unix_auto_update" if="auto.fetch">
395 <ant target="build_vm_unix_update" inheritall="true"/>
398 <target name="build_vm_unix_clean" depends="init" if="is.unix">
399 <exec executable="sh" dir="working_vm/build" failonerror="true">
400 <arg line="build.sh clean -Dexternal.dep.CLASSLIB.loc=${drlvm.classlib.offset}"/>
401 <arg line="-Ddeploy.canonical.flag=true"/>
402 <env key="BUILD_CFG" value="${hy.cfg}"/>
406 <target name="build_vm_unix_build" depends="init" if="is.unix">
407 <exec executable="sh" dir="working_vm/build" failonerror="true">
408 <arg line="build.sh -Dexternal.dep.CLASSLIB.loc=${drlvm.classlib.offset}"/>
409 <arg line="-Ddeploy.canonical.flag=true"/>
410 <arg line="-Dsvn.revision=${harmony.version}" />
411 <arg line="-Dhy.no.sig=${hy.no.sig}"/>
412 <arg line="-Dhy.local.zlib=${hy.local.zlib}"/>
413 <arg line="${custom.props}"/>
414 <env key="BUILD_CFG" value="${hy.cfg}"/>
418 <target name="build_vm_windows"
419 depends="build_vm_windows_auto_update, build_vm_windows_clean, build_vm_windows_build"
422 <target name="build_vm_windows_update" unless="is.unix">
423 <exec executable="cmd" dir="working_vm/build" failonerror="true">
424 <arg line="/c build.bat update -Dexternal.dep.CLASSLIB.loc=${drlvm.classlib.offset}"/>
425 <arg line="-Ddeploy.canonical.flag=true"/>
426 <env key="BUILD_CFG" value="${hy.cfg}"/>
427 <env key="CXX" value="msvc"/>
431 <target name="build_vm_windows_auto_update" if="auto.fetch">
432 <ant target="build_vm_windows_update" inheritall="true"/>
435 <target name="build_vm_windows_clean" depends="init" unless="is.unix">
436 <exec executable="cmd" dir="working_vm/build" failonerror="true">
437 <arg line="/c build.bat clean -Dexternal.dep.CLASSLIB.loc=${drlvm.classlib.offset}"/>
438 <arg line="-Ddeploy.canonical.flag=true"/>
439 <env key="BUILD_CFG" value="${hy.cfg}"/>
440 <env key="CXX" value="msvc"/>
444 <target name="build_vm_windows_build" depends="init" unless="is.unix">
445 <exec executable="cmd" dir="working_vm/build" failonerror="true">
446 <arg line="/c build.bat -Dexternal.dep.CLASSLIB.loc=${drlvm.classlib.offset}"/>
447 <arg line="-Ddeploy.canonical.flag=true"/>
448 <arg line="-Dhy.no.sig=${hy.no.sig}"/>
449 <arg line="-Dhy.local.zlib=${hy.local.zlib}"/>
450 <arg line="${custom.props}"/>
451 <env key="BUILD_CFG" value="${hy.cfg}"/>
452 <env key="CXX" value="msvc"/>
456 <!-- ================================================================================ -->
457 <!-- build the common resources - ensure depends are up to date an then rebuild -->
458 <!-- ================================================================================ -->
459 <target name="build_commonresources">
460 <ant antfile="common_resources/build.xml" target="fetch-depends" inheritall="false" >
461 <property name="hy.cfg" value="${hy.cfg}"/>
462 <property name="svn.info" value="${harmony.long.version}"/>
463 <property name="svn.version" value="${harmony.version}"/>
467 <!-- ================================================================================ -->
468 <!-- build the common resources - ensure depends are up to date an then rebuild -->
469 <!-- ================================================================================ -->
470 <target name="build_jdktools" depends="auto_fetch_jdktools_libs">
471 <ant antfile="working_jdktools/build.xml" target="rebuild" inheritall="false" >
472 <property name="hy.cfg" value="${hy.cfg}"/>
473 <property name="svn.info" value="${harmony.long.version}"/>
474 <property name="svn.version" value="${harmony.version}"/>
478 <target name="auto_fetch_jdktools_libs" if="auto.fetch">
479 <ant target="fetch_jdktools_libs" inheritall="false" >
480 <property name="hy.cfg" value="${hy.cfg}"/>
484 <target name="fetch_jdktools_libs" if="auto.fetch">
485 <ant antfile="working_jdktools/build.xml" target="fetch-depends" inheritall="false" >
486 <property name="hy.cfg" value="${hy.cfg}"/>
490 <target name="clean_jdktools">
491 <ant antfile="working_jdktools/build.xml" target="clean" inheritall="false" >
492 <property name="hy.cfg" value="${hy.cfg}"/>
493 <property name="svn.info" value="${harmony.long.version}"/>
494 <property name="svn.version" value="${harmony.version}"/>
498 <!-- ================================================================================ -->
499 <!-- trivial setup -->
500 <!-- ================================================================================ -->
501 <target name="setup" depends="init, show_props">
502 <delete dir="${target.dir}"/>
503 <mkdir dir="${target.dir}"/>
507 <!-- ================================================================================ -->
508 <!-- hard reset - remove checked out classlib and vm tree- be sure you want this -->
509 <!-- ================================================================================ -->
511 description="removes vm and classlib dirs and resets - BE SURE YOU WANT TO DO THIS"
514 <!-- delete the working directories and then do an svn update to reset them -->
515 <delete dir="working_classlib"/>
516 <delete dir="working_vm"/>
518 <exec executable="svn" dir="." failonerror="true">
519 <arg line="update" />
525 depends="init_classlib_hdk,clean_jdktools,clean_classlib,clean_vm" >
526 <delete dir="${target.dir}" failonerror="false" />
529 <!-- ================================================================================ -->
530 <!-- Switches the working_vm directory to vm choice - wired for DRLVM for now -->
531 <!-- ================================================================================ -->
532 <target name="switch_svn_vm" depends="init" if="is.svn">
533 <exec executable="svn" dir="working_vm" failonerror="true">
534 <arg line="-r${svn.revision}"/>
535 <arg line="switch" />
536 <arg line="${vm.svn.url}" />
540 <!-- ================================================================================ -->
541 <!-- Switches the working_vm directory to classlib choice -->
542 <!-- ================================================================================ -->
543 <target name="switch_svn_classlib" depends="init" if="is.svn">
544 <exec executable="svn" dir="working_classlib" failonerror="true">
545 <arg line="-r${svn.revision}"/>
546 <arg line="switch" />
547 <arg line="${classlib.svn.url}" />
551 <!-- ================================================================================ -->
552 <!-- Switches the working_jdktools directory to jdktools -->
553 <!-- ================================================================================ -->
554 <target name="switch_svn_jdktools" depends="init" if="is.svn">
555 <exec executable="svn" dir="working_jdktools" failonerror="true">
556 <arg line="-r${svn.revision}"/>
557 <arg line="switch" />
558 <arg line="${jdktools.svn.url}" />
562 <!-- ================================================================================ -->
563 <!-- Switches the common_resources directory to common_resources -->
564 <!-- ================================================================================ -->
565 <target name="switch_svn_commonresources" depends="init" if="is.svn">
566 <exec executable="svn" dir="common_resources" failonerror="true">
567 <arg line="-r${svn.revision}"/>
568 <arg line="switch" />
569 <arg line="${commonresources.svn.url}" />
573 <!-- ================================================================================ -->
575 <!-- basic setup - reused stuff from classlib/properties.xml for expediency -->
576 <!-- ================================================================================ -->
577 <target name="init" depends="svn-prop">
578 <!-- Determine our operating system -->
579 <condition property="is.windows">
580 <os family="windows" />
583 <condition property="is.unix">
587 <condition property="is.linux">
591 <!-- this special case makes sense -->
592 <condition property="harmony.os" value="windows">
593 <isset property="is.windows"/>
595 <condition property="harmony.os" value="linux">
599 <property name="harmony.os" value="${os.name}" />
601 <!-- Conditions for different architectures -->
602 <condition property="is.x86_64">
605 <condition property="is.x86">
611 <condition property="is.ia64">
614 <condition property="is.64bit">
620 <condition property="is.32bit">
626 <condition property="harmony.bits" value="32">
627 <isset property="is.32bit" />
629 <property name="harmony.bits" value="64" />
631 <!-- Normalized architecture name -->
632 <condition property="harmony.arch" value="x86">
633 <isset property="is.x86" />
635 <condition property="harmony.arch" value="x86_64">
642 <property name="harmony.arch" value="${os.arch}" />
644 <property name="harmony.deploy.suffix" value="-snapshot" />
646 <property name="deploy.hdk.file.prefix"
647 value="apache-harmony-hdk-r${harmony.version}" />
648 <property name="deploy.hdk.tar"
649 value="${deploy.hdk.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.tar.gz" />
650 <property name="deploy.hdk.zip"
651 value="${deploy.hdk.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.zip" />
653 <property name="deploy.jdk.file.prefix"
654 value="apache-harmony-jdk-r${harmony.version}" />
655 <property name="deploy.jdk.tar"
656 value="${deploy.jdk.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.tar.gz" />
657 <property name="deploy.jdk.zip"
658 value="${deploy.jdk.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.zip" />
660 <property name="deploy.jre.file.prefix"
661 value="apache-harmony-jre-r${harmony.version}" />
662 <property name="deploy.jre.tar"
663 value="${deploy.jre.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.tar.gz" />
664 <property name="deploy.jre.zip"
665 value="${deploy.jre.file.prefix}-${harmony.os}-${harmony.arch}-${harmony.bits}${harmony.deploy.suffix}.zip" />
667 <property name="deploy.src.file.prefix"
668 value="apache-harmony-src-r${harmony.version}" />
669 <property name="deploy.src.tar"
670 value="${deploy.src.file.prefix}${harmony.deploy.suffix}.tar.gz" />
671 <property name="deploy.src.zip"
672 value="${deploy.src.file.prefix}${harmony.deploy.suffix}.zip" />
674 <!-- copy symbol debug info to debug build on Windows -->
675 <condition property="copy.progdb">
676 <equals arg1="${hy.cfg}" arg2="debug" />
679 <!-- workaround for drlvm build till it starts with a script-->
680 <condition property="custom.props" value="-Dhy.javac.compiler=${hy.javac.compiler}"
682 <isset property="hy.javac.compiler"/>
687 <target name="show_props" depends="init">
689 Apache Harmony Federated Build
690 ==========================================
691 svn rev : ${harmony.version}
692 operating system : ${harmony.os}
693 architecture : ${harmony.arch}-${harmony.bits}
694 ant os name/arch : ${os.name}/${os.arch}
695 hosting Java : ${java.version} (${java.vendor})
696 build mode : ${hy.cfg}
697 output location : ${target.dir}
698 DRLVM classlib : ${drlvm.classlib.offset}
699 SVN root : ${svn.root}
703 <!-- ================================================================================ -->
704 <!-- svn-prop : get svn revision number of the build.xml file -->
706 <!-- taken from classlib/properties.xml, because of uncertainty -->
707 <!-- of state of the working_classlib dir, I need a copy -->
708 <!-- TODO - we want to be able to pass property in to ant so we don't need a -->
709 <!-- pause and it's reproducable -->
710 <!-- ================================================================================ -->
711 <target name="svn-prop">
712 <exec executable="svn"
714 failifexecutionfails="false"
715 resultproperty="svn.rc">
717 <arg value="build.xml" />
718 <redirector outputproperty="svn.revision.tmp">
721 <contains value="Revision: " />
724 <replacestring from="Revision: " to=""/>
729 <condition property="is.svn" value="true">
730 <equals arg1="${svn.rc}" arg2="0" />
732 <condition property="svn.revision" value="${svn.revision.tmp}" >
733 <equals arg1="${svn.rc}" arg2="0" />
735 <property name="svn.revision" value="unknown" />
736 <property name="harmony.version" value="${svn.revision}" />
738 <exec executable="svn"
739 failifexecutionfails="false"
740 resultproperty="svn.rc">
742 <redirector outputproperty="svn.root.tmp">
745 <regexp pattern="Repository Root:" />
746 </linecontainsregexp>
748 <replacestring from="Repository Root: " to=""/>
754 <condition property="svn.info" value="${svn.root.tmp} ${svn.revision}" >
755 <equals arg1="${svn.rc}" arg2="0" />
758 <format property="svn.info"
759 pattern="'Unknown revision at' dd-MMM-yyyy hh:mm aa"/>
761 <property name="harmony.long.version" value="${svn.info}" />
763 <condition property="svn.root" value="${svn.root.tmp}" >
764 <equals arg1="${svn.rc}" arg2="0" />
767 <!-- default SVN URLs -->
768 <property name="svn.root" value="http://svn.apache.org/repos/asf"/>
770 <condition property="classlib.svn.url"
771 value="${svn.root}/harmony/enhanced/classlib/branches/java6"
772 else="${svn.root}/harmony/enhanced/classlib/trunk">
773 <isset property="java6" />
776 <property name="vm.svn.url" value="${svn.root}/harmony/enhanced/drlvm/trunk" />
777 <property name="jdktools.svn.url" value="${svn.root}/harmony/enhanced/jdktools/trunk" />
778 <property name="commonresources.svn.url" value="${svn.root}/harmony/enhanced/common_resources" />
781 <target name="bundle_src_tgz" depends="init" if="is.unix">
783 <tar tarfile="${target.dir}/${deploy.src.tar}" compression="gzip"
785 <tarfileset dir="${target.dir}/src" prefix="apache-harmony-src-r${harmony.version}">
790 <chksum dir="${target.dir}" file="${deploy.src.tar}" />
791 <chksum dir="${target.dir}" file="${deploy.src.tar}" type="sha" />
795 <target name="bundle_src_zip" depends="init" unless="is.unix">
796 <zip destfile="${target.dir}/${deploy.src.zip}">
797 <zipfileset dir="${target.dir}/src" prefix="apache-harmony-src-r${harmony.version}">
801 <chksum dir="${target.dir}" file="${deploy.src.zip}" />
802 <chksum dir="${target.dir}" file="${deploy.src.zip}" type="sha" />
805 <target name="copy_source" depends="init,populate_source">
806 <exec executable="svn">
807 <arg value="export" />
809 <arg value="${target.dir}/src" />
811 <exec executable="svn">
812 <arg value="export" />
813 <arg value="working_classlib/modules/concurrent/standard" />
814 <arg value="${target.dir}/src/working_classlib/modules/concurrent/standard" />
816 <echo file="${target.dir}/src/release.properties">
817 harmony.version=${harmony.version}
818 harmony.long.version=${harmony.long.version}
819 harmony.deploy.suffix=${harmony.deploy.suffix}
823 <!-- ================================================================================ -->
824 <!-- produces a nicer looking checksum - taken from classlib/build.xml -->
825 <!-- ================================================================================ -->
826 <macrodef name="chksum">
827 <attribute name="dir" />
828 <attribute name="file" />
829 <attribute name="type" default="md5" />
831 <checksum property="@{file}.@{type}"
832 file="@{dir}/@{file}"
833 algorithm="@{type}" />
834 <echo file="@{dir}/@{file}.@{type}"
835 message="${@{file}.@{type}} @{file}${line.separator}" />