Bugs item #1190782, was opened at 2005-04-27 01:03
Message generated for change (Comment added) made by rblum
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1190782&group_id=31650
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Robert Blum (rblum)
Assigned to: Nobody/Anonymous (nobody)
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: Robert Blum (rblum)
Date: 2005-04-27 01: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
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
nant-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-developers