Hello Ryan,

Thanks for looking into this. Yeah I follow what you are saying (but I couldn't 
really test it ... see my other post.)

The question basically comes down to this: If the target has a conditional 
expression. What order is it evaluated in? (I checked the NAnt doc. but it did 
not specify this clearly.)

eg.
    <target name="install-windows" depends="userdoc" 
if="${platform::is-win32()}">

Base on your comments, right now, the depends target is executed BEFORE the 
condition is tested on a Linux system.

Logically, however, if the condition expression is false, then the current 
target is not going to be executed, and in this case, neither should the 
depends target.

So ... to ensure .build scrips are executed as efficiently as possible, yeah, I 
agree in this case it probably *should* be fixed. ie. only execute the depends 
and target IFF if/unless attribute tests is true.

On the other hand, since I don't know the history behind this, I would like to 
listen to what the senior developers have to say first. This behavior might be 
used in production and my concern is that changing it now might affect these 
users during an upgrade -- even if it was a bug in the software.

Regards,
Charles

--- On Fri, 3/5/10, Ryan Boggs <rmboggs.obsd.po...@gmail.com> wrote:

> From: Ryan Boggs <rmboggs.obsd.po...@gmail.com>
> Subject: Re: [nant-dev] Task/planning for 0.87 release
> To: "cchan...@users.sourceforge.net" <cchan...@users.sourceforge.net>
> Cc: "Gert Driesen" <gert.drie...@telenet.be>, 
> "nant-developers@lists.sourceforge.net" 
> <nant-developers@lists.sourceforge.net>
> Received: Friday, March 5, 2010, 1:35 AM
> Hi,
> 
> Me again.  I noticed something in the current
> NAnt.build file that may
> be causing the massive *nix delay, or at least making it
> worse.  The
> install target on line 822, which I believe is being called
> by
> (n)make, lists two depending targets called install-windows
> and
> install-linux.  Looking at these targets, only the
> install-windows
> depends on the userdoc target which takes 30 minutes to run
> on
> Mono/*nix.  The install-linux target only depends on
> the build target.
>  As a test, I removed the install-windows target from the
> install
> target depends list and reran on Linux.  NAnt was
> installed in less
> than 5 minutes.  This makes me think that NAnt is
> building the target
> depends before it is checking the target's if
> statement.  If that is
> true, is this functionality intended?  I would think
> that the if
> statement would need to be checked prior to running the
> depended
> targets.
> 
> Hope this makes sense.
> 
> Thanks,
> Ryan



      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to