You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Salikh Zakirov <Sa...@Intel.com> on 2006/08/07 16:36:34 UTC
[drlvm][build] Avoid touching svn_version_tag.h if svn information
is not available
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: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [drlvm][build] Avoid touching svn_version_tag.h if svn information
is not available
Posted by Salikh Zakirov <Sa...@Intel.com>.
Geir Magnusson Jr wrote:
> Salikh Zakirov wrote:
>> The following patch solves the problem (also in HARMONY-1083)
>
> Thanks - quick scan, that works for me.
I have forgotten to specify "component" in HARMONY-1083,
is there any way to modify it? I do not see any "edit" links.
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [drlvm][build] Avoid touching svn_version_tag.h if svn information
is not available
Posted by Geir Magnusson Jr <ge...@pobox.com>.
Salikh Zakirov wrote:
> 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.
There's no helpful info for your system then, is there... :)
>
> 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)
Thanks - quick scan, that works for me.
geir
> --- >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: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org