* xbuild/Microsoft.Common.targets: For referenced projects,
authorAnkit Jain <radical@corewars.org>
Sun, 11 Oct 2009 23:25:50 +0000 (23:25 -0000)
committerAnkit Jain <radical@corewars.org>
Sun, 11 Oct 2009 23:25:50 +0000 (23:25 -0000)
when trying to get the deploy items, ensure that the split
lists of project references are available.
(SplitProjectReferencesByExistent): New.
Set DependsOnTargets appropriately.

svn path=/trunk/mcs/; revision=143933

mcs/tools/xbuild/ChangeLog
mcs/tools/xbuild/xbuild/Microsoft.Common.targets

index 27eeb3a0fe8d99aa7e0220a66365d3cae36ad68c..3032b94bcbed12d293fc3887674e3c41bbd50c06 100644 (file)
@@ -1,3 +1,11 @@
+2009-10-12  Ankit Jain  <jankit@novell.com>
+
+       * xbuild/Microsoft.Common.targets: For referenced projects,
+       when trying to get the deploy items, ensure that the split
+       lists of project references are available.
+       (SplitProjectReferencesByExistent): New.
+       Set DependsOnTargets appropriately.
+
 2009-10-12  Ankit Jain  <jankit@novell.com>
 
        * SolutionParser.cs: Handle non-existing project files, and
index 59fa40cf89c26b6b1c50731db25009d9074020cf..0fd768864e6b99fb20587e785588389028ea3f4e 100644 (file)
 
        </Target>
 
+       <!-- Split projects into 2 lists
+               ProjectReferenceWithConfigurationExistent: Projects existent on disk
+               ProjectReferenceWithConfigurationNonExistent: Projects non-existent on disk -->
 
-       <Target
-               Name="ResolveProjectReferences"
-               DependsOnTargets="AssignProjectConfigurations"
-       >
-               <!-- Build only project files that can be found on disk, ignore others -->
+       <Target Name="SplitProjectReferencesByExistent"
+               DependsOnTargets="AssignProjectConfigurations">
 
-               <CreateItem Include="@(ProjectReferenceWithConfiguration)">
+               <CreateItem Include="@(ProjectReferenceWithConfiguration)" Condition="'@(ProjectReferenceWithConfiguration)' != ''">
                        <Output TaskParameter="Include" ItemName="ProjectReferenceWithConfigurationExistent"
                                Condition="Exists ('%(ProjectReferenceWithConfiguration.Identity)')"/>
 
                        <Output TaskParameter="Include" ItemName="ProjectReferenceWithConfigurationNonExistent"
                                Condition="!Exists ('%(ProjectReferenceWithConfiguration.Identity)')"/>
                </CreateItem>
+       </Target>
 
+       <Target
+               Name="ResolveProjectReferences"
+               DependsOnTargets="SplitProjectReferencesByExistent"
+       >
                <!-- If building from a .sln.proj or from IDE, then referenced projects have already
                     been built, so just get the target paths -->
                <MSBuild
                        <Output TaskParameter="TargetOutputs" ItemName="ChildProjectReferences" />
                </MSBuild>
 
-               <!-- Emit warning about missing project files -->
                <Warning Text="Referenced Project %(ProjectReferenceWithConfigurationNonExistent.Identity) not found, ignoring."
                         Condition="'@(ProjectReferenceWithConfigurationNonExistent)' != ''"/>
        </Target>
 
        <Target Name="GetCopyToOutputDirectoryItems"
                Outputs="@(AllItemsFullPathWithTargetPath)"
-               DependsOnTargets="AssignTargetPaths">
+               DependsOnTargets="AssignTargetPaths;SplitProjectReferencesByExistent">
 
                <!-- FIXME: handle .vcproj
                     FIXME: Private ProjectReferences are honored only in 3.5