Currently, targets in master build files look like this:
<project
name="myProject"
default="build">
...
<target
name="build"
depends="init"
description="Builds the current configuration">
<property
name="target"
value="build"/> <!-- target to forward -->
<nant buildfile="src/default.build"/>
</target>
...
</project>
Then, if the NAnt group decides to accept this my
proposal, targets in master build files will look
like this:
<project
name="myProject"
default="build">
...
<target
name="build"
depends="init"
description="Builds the current configuration">
<nant
buildfile="src/default.build"
target="${target::get-current-target()}"/>
</target>
...
</project>
... and gateway build files like this:
<project
name="myProject"
default="*">
<target
name="*"
description="Builds recursively all subprojects">
<foreach
item="Folder"
property="foldername">
<in>
<items>
<includes name="*"/>
<excludes name="CVS"/>
</items>
</in>
<do>
<nant
buildfile="${foldername}/default.build"
target="${project.config} ${target::get-current-target()}"/>
</do>
</foreach>
</target>
</project>
j3d.
> Giuseppe Greco wrote:
>
>>>As a curiousity, wouldn't you be able to use a regular target and
>>>properties to define what to call? For instance, your gateway project
>>>can just do this:
>
>> Yes, but this is exactly what I'm trying to avoid...
>>
>> When a master build file contains more than 3 or 4 targets
>> to forward, you have to define lots of properties just to handle that.
>>
>> I think a wild target would be much more elegant. Furthermore,
>> be able to define a wild target that is executed when the user
>> specifies a target that does not exist in the current build file,
>> would be handy...
>>
>> Of course, that's nothing vital, but...
>
> Sorry. :) I just noticed your first post, describing exactly what I
> put in my message here.
>
> I suppose it's good for allowing you to specify targets for your
> subprojects without having to know about them in your master build file.
> Would you be rewriting your master to use wildcards as well?
>
> Matt.
>
----------------------------------------
Giuseppe Greco
::agamura::
phone: +41 (0)91 604 67 65
mobile: +41 (0)76 390 60 32
email: [EMAIL PROTECTED]
web: www.agamura.com
----------------------------------------
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers