You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by va...@apache.org on 2008/05/20 13:03:52 UTC
svn commit: r658200 - in /harmony/enhanced:
common_resources/trunk/make/depends.xml drlvm/trunk/make/depends.xml
Author: varlax
Date: Tue May 20 04:03:52 2008
New Revision: 658200
URL: http://svn.apache.org/viewvc?rev=658200&view=rev
Log:
Enhancing common dependencies (for easier migration of jdktools):
- poll-modules adapted to support build.module/exclude.module settings;
- enable wildcard patterns for auto-unzip;
Modified:
harmony/enhanced/common_resources/trunk/make/depends.xml
harmony/enhanced/drlvm/trunk/make/depends.xml
Modified: harmony/enhanced/common_resources/trunk/make/depends.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/common_resources/trunk/make/depends.xml?rev=658200&r1=658199&r2=658200&view=diff
==============================================================================
--- harmony/enhanced/common_resources/trunk/make/depends.xml (original)
+++ harmony/enhanced/common_resources/trunk/make/depends.xml Tue May 20 04:03:52 2008
@@ -38,10 +38,11 @@
<macrodef name="poll-modules">
<attribute name="target" />
<attribute name="dir" />
- <attribute name="includes" default="**/*.xml"/>
+ <attribute name="includes" default="${build.module}/*.xml"/>
+ <attribute name="excludes" default="${exclude.module}/*.xml"/>
<sequential>
<subant target="@{target}">
- <fileset dir="@{dir}" includes="@{includes}">
+ <fileset dir="@{dir}" includes="@{includes}" excludes="@{excludes}">
<containsregexp expression="<target[^>]*name="@{target}""/>
</fileset>
</subant>
@@ -68,13 +69,11 @@
<unzip src="${src}" dest="${tmp}" >
<patternset includes="${unzip.path}"/>
</unzip>
- <!-- touch does not work with filesets for me though -->
<touch>
<fileset dir="${tmp}">
<patternset includes="${unzip.path}"/>
</fileset>
</touch>
- <touch file="${tmp}/${unzip.path}"/>
<move todir="${dest}" flatten="yes" failonerror="no">
<fileset dir="${tmp}">
<patternset includes="${unzip.path}"/>
@@ -87,11 +86,30 @@
<attribute name="dep" />
<sequential>
<dirname file="${@{dep}}" property="@{dep}.dir"/>
+ <!-- quite tricky way to detect if unzip operation is pending,
+ still not very robust ...
+ Life could be simpler if unzip supported nested mappers
+ -->
+ <basename file="${@{dep}}" property="@{dep}.basename"/>
<basename file="${@{dep}.unzip.path}" property="@{dep}.unzip.basename"/>
+ <pathconvert property="@{dep}.matching.list" setonempty="no">
+ <path><fileset dir="${@{dep}.dir}" includes="${@{dep}.unzip.basename}"/></path>
+ </pathconvert>
+ <pathconvert property="@{dep}.uptodate.list" setonempty="no">
+ <path>
+ <fileset dir="${@{dep}.dir}" includes="${@{dep}.unzip.basename}">
+ <depend targetdir="${@{dep}.dir}">
+ <mapper type="merge" to="${@{dep}.basename}"/>
+ </depend>
+ </fileset>
+ </path>
+ </pathconvert>
<condition property="@{dep}.unzipped">
- <uptodate srcfile="${@{dep}}"
- targetfile="${@{dep}.dir}/${@{dep}.unzip.basename}"/>
+ <equals arg1="${@{dep}.uptodate.list}" arg2="${@{dep}.matching.list}"/>
+ <!--uptodate srcfile="${@{dep}}"
+ targetfile="${@{dep}.dir}/${@{dep}.unzip.basename}"/-->
</condition>
+
<antcall target="-really-unzip">
<param name="src" value="${@{dep}}" />
<param name="dest" value="${@{dep}.dir}" />
@@ -167,11 +185,11 @@
</condition>
...
-Missing dependency. The jar from:
+Missing dependency. The file from:
@{src}
-should be downloaded to:
+should be downloaded (extracted) to:
@{dest}
Modified: harmony/enhanced/drlvm/trunk/make/depends.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/make/depends.xml?rev=658200&r1=658199&r2=658200&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/make/depends.xml (original)
+++ harmony/enhanced/drlvm/trunk/make/depends.xml Tue May 20 04:03:52 2008
@@ -22,7 +22,7 @@
<target name="check">
<check-one-file dest="${cpptasks.jar}" src="${cpptasks.url}"/>
- <poll-modules target="check-depends" dir="${dd.basedir}"/>
+ <poll-modules target="check-depends" dir="${dd.basedir}" includes="**/*.xml"/>
<fail>
<condition>
<not>
@@ -43,7 +43,7 @@
<target name="fetch">
<fetch dep="cpptasks"/>
- <poll-modules target="fetch-depends" dir="${dd.basedir}"/>
+ <poll-modules target="fetch-depends" dir="${dd.basedir}" includes="**/*.xml"/>
</target>
</project>
Re: svn commit: r658200 - in /harmony/enhanced: common_resources/trunk/make/depends.xml drlvm/trunk/make/depends.xml
Posted by Alexey Varlamov <al...@gmail.com>.
2008/5/20, Mark Hindess <ma...@googlemail.com>:
>
> In message <20...@eris.apache.org>, varlax@apache.org wri
> tes:
> >
> > Author: varlax
> > Date: Tue May 20 04:03:52 2008
> > New Revision: 658200
> >
> > URL: http://svn.apache.org/viewvc?rev=658200&view=rev
> > Log:
> > Enhancing common dependencies (for easier migration of jdktools):
> > - poll-modules adapted to support build.module/exclude.module settings;
>
> Cool. I was wondering about how to do this because I think it might help
> simplify some of the classlib/make/build-native.xml code[0].
Agree, I keep this possibility in mind.
>
> > <macrodef name="poll-modules">
> > <attribute name="target" />
> > <attribute name="dir" />
> > - <attribute name="includes" default="**/*.xml"/>
> > + <attribute name="includes" default="${build.module}/*.xml"/>
> > + <attribute name="excludes" default="${exclude.module}/*.xml"/>
> > <sequential>
> > <subant target="@{target}">
> > - <fileset dir="@{dir}" includes="@{includes}">
> > + <fileset dir="@{dir}" includes="@{includes}" excludes="@{excludes}">
> > <containsregexp expression="<target[^>]*name="@{target}""/>
> > </fileset>
> > </subant>
>
> I can see that this should work for values with one module name but do
> it work with "-Dexclude.module=awt,swing" for example?
You are right, the combined solution appears not complete. Then we
need to separate directory- and file-based variants, I'll add another
macros.
THanks,
Alexey
>
> Regards,
> -Mark
>
> [0] Enable the removal of some of the hard-coded references to which modules
> have native code - just have the poll-modules to check for a build-native
> target. (It's a little more complicated in reality but it would still be
> easier to maintain with fewer hard-coded module names.)
>
>
>
Re: svn commit: r658200 - in /harmony/enhanced:
common_resources/trunk/make/depends.xml drlvm/trunk/make/depends.xml
Posted by Mark Hindess <ma...@googlemail.com>.
In message <20...@eris.apache.org>, varlax@apache.org wri
tes:
>
> Author: varlax
> Date: Tue May 20 04:03:52 2008
> New Revision: 658200
>
> URL: http://svn.apache.org/viewvc?rev=658200&view=rev
> Log:
> Enhancing common dependencies (for easier migration of jdktools):
> - poll-modules adapted to support build.module/exclude.module settings;
Cool. I was wondering about how to do this because I think it might help
simplify some of the classlib/make/build-native.xml code[0].
> <macrodef name="poll-modules">
> <attribute name="target" />
> <attribute name="dir" />
> - <attribute name="includes" default="**/*.xml"/>
> + <attribute name="includes" default="${build.module}/*.xml"/>
> + <attribute name="excludes" default="${exclude.module}/*.xml"/>
> <sequential>
> <subant target="@{target}">
> - <fileset dir="@{dir}" includes="@{includes}">
> + <fileset dir="@{dir}" includes="@{includes}" excludes="@{excludes}">
> <containsregexp expression="<target[^>]*name="@{target}""/>
> </fileset>
> </subant>
I can see that this should work for values with one module name but do
it work with "-Dexclude.module=awt,swing" for example?
Regards,
-Mark
[0] Enable the removal of some of the hard-coded references to which modules
have native code - just have the poll-modules to check for a build-native
target. (It's a little more complicated in reality but it would still be
easier to maintain with fewer hard-coded module names.)