[xbuild] Fix #628525. Fix incremental rebuild.

When doing a rebuild for an already built project, the common
files (CopyLocal) should not be deleted by a project, as
other projects might be depending on them. This becomes a problem
when a common output dir is used.
This commit is contained in:
Ankit Jain committed 2010-08-05 17:34:57 +05:30
1 parent 3521888347
commit 4c37debc11
3 files changed
+27 -3

No files matched your search

@@ -237,7 +237,7 @@
SourceFiles="@(ReferenceCopyLocalPaths)"
DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
SkipUnchangedFiles="true">
<Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/>
<Output TaskParameter = "DestinationFiles" ItemName = "FileWritesShareable"/>
</Copy>
</Target>
@@ -674,6 +674,14 @@
<Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
</RemoveDuplicates>
<!-- CopyLocal files: In case all the projects build to common output
directory, then other projects might depend on some of these
CopyLocal files, so delete only the ones under *this* project
directory -->
<FindUnderPath Path="$(MSBuildProjectDirectory)" Files="@(FileWritesShareable)">
<Output TaskParameter="InPath" ItemName="FileWrites"/>
</FindUnderPath>
<WriteLinesToFile
File="$(IntermediateOutputPath)$(CleanFile)"
Lines="@(CombinedFileWrites)"
@@ -237,7 +237,7 @@
SourceFiles="@(ReferenceCopyLocalPaths)"
DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
SkipUnchangedFiles="true">
<Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/>
<Output TaskParameter = "DestinationFiles" ItemName = "FileWritesShareable"/>
</Copy>
</Target>
@@ -674,6 +674,14 @@
<Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
</RemoveDuplicates>
<!-- CopyLocal files: In case all the projects build to common output
directory, then other projects might depend on some of these
CopyLocal files, so delete only the ones under *this* project
directory -->
<FindUnderPath Path="$(MSBuildProjectDirectory)" Files="@(FileWritesShareable)">
<Output TaskParameter="InPath" ItemName="FileWrites"/>
</FindUnderPath>
<WriteLinesToFile
File="$(IntermediateOutputPath)$(CleanFile)"
Lines="@(CombinedFileWrites)"
@@ -240,7 +240,7 @@
SourceFiles="@(ReferenceCopyLocalPaths)"
DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
SkipUnchangedFiles="true">
<Output TaskParameter = "DestinationFiles" ItemName = "FileWrites"/>
<Output TaskParameter = "DestinationFiles" ItemName = "FileWritesShareable"/>
</Copy>
</Target>
@@ -677,6 +677,14 @@
<Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
</RemoveDuplicates>
<!-- CopyLocal files: In case all the projects build to common output
directory, then other projects might depend on some of these
CopyLocal files, so delete only the ones under *this* project
directory -->
<FindUnderPath Path="$(MSBuildProjectDirectory)" Files="@(FileWritesShareable)">
<Output TaskParameter="InPath" ItemName="FileWrites"/>
</FindUnderPath>
<WriteLinesToFile
File="$(IntermediateOutputPath)$(CleanFile)"
Lines="@(CombinedFileWrites)"