Bugs item #1190782, was opened at 2005-04-27 08:03
Message generated for change (Comment added) made by drieseng
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1190782&group_id=31650
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: Tasks
>Group: 0.85
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Robert Blum (rblum)
>Assigned to: Gert Driesen (drieseng)
Summary: .vcproj .LIB target gets always rebuilt
Initial Comment:
ANy .vcproj that generates a .LIB file reruns the [lib]
task every single time you execute nant - i.e., no
dependency checking between the final target and the
intermediate .OBJ files
Obviously, this causes pain and suffering if lots of
other projects depend on the .LIB file.
(Last tested with 2005-04-20 nightly)
----------------------------------------------------------------------
>Comment By: Gert Driesen (drieseng)
Date: 2005-05-20 17:39
Message:
Logged In: YES
user_id=707851
This is now fixed in cvs.
Thanks for the "patch".
----------------------------------------------------------------------
Comment By: Robert Blum (rblum)
Date: 2005-04-27 08:43
Message:
Logged In: YES
user_id=25786
Since I'm an impatient person :), here's a proposed fix:
(Sorry, don't have patch/diff running, so it's a bit manual)
In LibTask.ExecuteTask, add the following lines after
setting up the BaseDirs:
if (!NeedsRebuilding()) {
return;
}
Also, add the following function to LibTask:
#region Protected Instance Methods
/// <summary>
/// Determines if the output needs to be rebuilt.
/// </summary>
protected virtual bool NeedsRebuilding()
{
if (OutputFile != null)
{
// check if output file exists - if not, rebuild
if (!OutputFile.Exists)
{
Log(Level.Verbose, "Output file '{0}'
does not exist,
rebuilding library.",
OutputFile.FullName);
return true;
}
// check if .OBJ files were updated
string fileName =
FileSet.FindMoreRecentLastWriteTime(Sources.FileNames,
OutputFile.LastWriteTime);
if (fileName != null)
{
Log(Level.Verbose, "'{0}' has been
updated,
relinking.", fileName);
return true;
}
}
return false;
}
#endregion Protected Instance Methods
... That does the trick at least locally. I'd appreciate a
quick ping when/if the fix is landed. Thanks!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1190782&group_id=31650
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
nant-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-developers