Hi, I would like to suggest to make svn revision stamping optional. In my use case, I do not have .svn directory in most of my workspaces, because I use other version control system for managing local patches, so 'java -version' says on my local builds
java version "1.5.0" pre-alpha : not complete or compatible svn = rsvn: '.' is not a working copy, (Aug 7 2006), Windows/ia32/msvc 1310, debug build http://incubator.apache.org/harmony and obviously is not helpful. However, having version_svn_tag.h file modified after each build is annoying -- it always shows up in diff, prevents me from merging with latest revision from SVN etc. The following patch solves the problem (also in HARMONY-1083) --- >8 --- Subject: [PATCH] Restricted svn revision stamping to svn workspaces --- build/make/build.xml | 6 +++++- build/make/components/vm/vmcore.xml | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git build/make/build.xml build/make/build.xml index 6fd3ef6..bf6a011 100755 --- build/make/build.xml +++ build/make/build.xml @@ -318,7 +318,11 @@ Version: $Revision: 1.16.2.20 $ <ant antfile="setup.xml" target="setup" inheritall="true" /> </target> - <target name="svn-prop"> + <target name="svn-detect"> + <available file=".svn" type="dir" property="svn.available"/> + </target> + + <target name="svn-prop" depends="svn-detect" if="svn.available"> <exec executable="svn"> <arg value="--non-interactive" /> <arg value="info" /> diff --git build/make/components/vm/vmcore.xml build/make/components/vm/vmcore.xml index 3fae6cd..577e77f 100755 --- build/make/components/vm/vmcore.xml +++ build/make/components/vm/vmcore.xml @@ -26,7 +26,17 @@ Version: $Revision: 1.5.2.3 $ --> <project name="vm.vmcore"> - <target name="init" depends="common_vm"> + + <target name="stamp_version" depends="common_vm" if="svn.revision"> + <copy file="${build.vm.home}/vmcore/include/version_svn_tag_orig.h" + tofile="${build.vm.home}/vmcore/include/version_svn_tag.h" overwrite="true"> + <filterset> + <filter token="svn.revision" value="${svn.revision}"/> + </filterset> + </copy> + </target> + + <target name="init" depends="common_vm, stamp_version"> <property name="build.depends" value="extra.apr, extra.aprutil, extra.log4cxx, @@ -38,13 +48,6 @@ Version: $Revision: 1.5.2.3 $ <property name="outtype" value="shared" /> <property name="src" location="${build.vm.home}" /> - <copy file="${build.vm.home}/vmcore/include/version_svn_tag_orig.h" - tofile="${build.vm.home}/vmcore/include/version_svn_tag.h" overwrite="true"> - <filterset> - <filter token="svn.revision" value="${svn.revision}"/> - </filterset> - </copy> - <compiler id="c.compiler" extends="common.c.compiler"> <includepath> <pathelement location="${build.vm.home}/include" /> --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]