Stop Prebuild from generating <copy> statements which unnecessarily copy files into bin/Debug or bin/Release

nant_0.91~alpha2+dfsg-3_all.deb in Ubuntu 12.04 and earlier actually ignored these due to a bug
However, nant 0.92~rc1+dfsg-2 in Ubuntu 12.10 fixes this bug (possibly https://github.com/nant/nant/pull/39).
Which makes nant time-consumingly copy these files when the aren't actually used.
Tested removal of <copy> on both nant 0.91 and nant 0.92
Will be submitting this patch to prebuild project for comment though I suspect there's nobody there to pay attention.
0.7.3-extended
Justin Clark-Casey (justincc) 2012-11-14 02:25:07 +00:00
parent 8638766d79
commit cce6e6c841
3 changed files with 0 additions and 43 deletions

Binary file not shown.

View File

@ -209,49 +209,6 @@ namespace Prebuild.Core.Targets
ss.WriteLine(" <target name=\"{0}\">", "build"); ss.WriteLine(" <target name=\"{0}\">", "build");
ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />"); ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />");
ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />"); ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />");
ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/${build.dir}\" flatten=\"true\">");
ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">");
foreach (ReferenceNode refr in project.References)
{
if (refr.LocalCopy)
{
ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)) + "\" />", '/'));
}
}
ss.WriteLine(" </fileset>");
ss.WriteLine(" </copy>");
if (project.ConfigFile != null && project.ConfigFile.Length!=0)
{
ss.Write(" <copy file=\"" + project.ConfigFile + "\" tofile=\"${project::get-base-directory()}/${build.dir}/${project::get-name()}");
if (project.Type == ProjectType.Library)
{
ss.Write(".dll.config\"");
}
else
{
ss.Write(".exe.config\"");
}
ss.WriteLine(" />");
}
// Add the content files to just be copied
ss.WriteLine(" {0}", "<copy todir=\"${project::get-base-directory()}/${build.dir}\">");
ss.WriteLine(" {0}", "<fileset basedir=\".\">");
foreach (string file in project.Files)
{
// Ignore if we aren't content
if (project.Files.GetBuildAction(file) != BuildAction.Content)
continue;
// Create a include tag
ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
}
ss.WriteLine(" {0}", "</fileset>");
ss.WriteLine(" {0}", "</copy>");
ss.Write(" <csc "); ss.Write(" <csc ");
ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower()); ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower());

Binary file not shown.