Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/tools
diff options
context:
space:
mode:
authorAnkit Jain <radical@corewars.org>2009-10-12 16:23:53 +0400
committerAnkit Jain <radical@corewars.org>2009-10-12 16:23:53 +0400
commit75d91d9c99ae41b9c75169cbd6127fe36e80add3 (patch)
treed8d9b5543322600bc93218ad962b78f560ef7c6c /mcs/tools
parent2fefe83b93e57efc16764937dad89e117df7b9b7 (diff)
Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild: 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 project file load errors. Raise warnings instead of failing. * xbuild/Microsoft.Common.targets: Handle non-existant Project references, skip instead of failing. In class/Microsoft.Build.Tasks: 2009-10-12 Ankit Jain <jankit@novell.com> * Makefile: Add reference to Microsoft.Build.Engine . In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks: 2009-10-12 Ankit Jain <jankit@novell.com> * ResolveAssemblyReference.cs: Remove unnecessary tab in the warning messages. 2009-10-12 Ankit Jain <jankit@novell.com> * MSBuild.cs (Execute): Handle build errors. In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine: 2009-10-12 Ankit Jain <jankit@novell.com> * Target.cs (TargetFile): New. Gives the name of the file containing the target definition. * BuildEngine.cs (.ctor): Add a 'taskfile' parameters, and return this for ProjectFileOfTaskNode. * BuildTask.cs (LogTaskStarted): (LogTaskFinished): Use parentTarget.ProjectFileOfTaskNode for the event. (InitializeTask): Set BuildEngine's task file to parent target's TargetFile. * Engine.cs (LogProjectStarted): Incase of default targets, set TargetNames to String.Empty . * TargetBatchingImpl.cs (LogTargetStarted): (LogTargetFinished): Use target.TargetFile for the event. * ConsoleLogger.cs: Keep a stack of project/target/task being executed. And corresponding list of errors and warnings. (EventsToString): Stringifies the current "stack", to be used as key to the table of errors/warnings and for show messages at the end of the build. 2009-10-12 Ankit Jain <jankit@novell.com> * Project.cs (Load): Add argument checks. In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities: 2009-10-12 Ankit Jain <jankit@novell.com> * TaskLoggingHelper.cs: Use the buildEngine.ProjectFileOfTaskNode in the event args. 2009-10-12 Ankit Jain <jankit@novell.com> * ToolTask.cs (ExecuteTool): Don't set toolOutput to null. (HandleTaskExecutionErrors): toolOutput can be null. Set toolOutput to null here. svn path=/branches/mono-2-6/mcs/; revision=143964
Diffstat (limited to 'mcs/tools')
-rw-r--r--mcs/tools/xbuild/ChangeLog15
-rw-r--r--mcs/tools/xbuild/SolutionParser.cs17
-rw-r--r--mcs/tools/xbuild/xbuild/Microsoft.Common.targets42
3 files changed, 60 insertions, 14 deletions
diff --git a/mcs/tools/xbuild/ChangeLog b/mcs/tools/xbuild/ChangeLog
index 28ad2145cbc..3032b94bcbe 100644
--- a/mcs/tools/xbuild/ChangeLog
+++ b/mcs/tools/xbuild/ChangeLog
@@ -1,3 +1,18 @@
+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
+ project file load errors. Raise warnings instead of failing.
+ * xbuild/Microsoft.Common.targets: Handle non-existant
+ Project references, skip instead of failing.
+
2009-10-11 Ankit Jain <jankit@novell.com>
* Main.cs: Add support for emitting messages in color.
diff --git a/mcs/tools/xbuild/SolutionParser.cs b/mcs/tools/xbuild/SolutionParser.cs
index eb62468c8b6..a9fecfd74ce 100644
--- a/mcs/tools/xbuild/SolutionParser.cs
+++ b/mcs/tools/xbuild/SolutionParser.cs
@@ -180,9 +180,22 @@ namespace Mono.XBuild.CommandLine {
}
foreach (ProjectInfo projectInfo in projectInfos.Values) {
+ string filename = Path.Combine (solutionDir,
+ projectInfo.FileName.Replace ('\\', Path.DirectorySeparatorChar));
+
+ if (!File.Exists (filename)) {
+ RaiseWarning (0, String.Format ("Project file {0} referenced in the solution file, " +
+ "not found. Ignoring.", filename));
+ continue;
+ }
+
Project currentProject = p.ParentEngine.CreateNewProject ();
- currentProject.Load (Path.Combine (solutionDir,
- projectInfo.FileName.Replace ('\\', Path.DirectorySeparatorChar)));
+ try {
+ currentProject.Load (filename);
+ } catch (InvalidProjectFileException e) {
+ RaiseWarning (0, e.Message);
+ continue;
+ }
foreach (BuildItem bi in currentProject.GetEvaluatedItemsByName ("ProjectReference")) {
string projectReferenceGuid = bi.GetEvaluatedMetadata ("Project");
diff --git a/mcs/tools/xbuild/xbuild/Microsoft.Common.targets b/mcs/tools/xbuild/xbuild/Microsoft.Common.targets
index 972dd75a97c..0fd768864e6 100644
--- a/mcs/tools/xbuild/xbuild/Microsoft.Common.targets
+++ b/mcs/tools/xbuild/xbuild/Microsoft.Common.targets
@@ -161,30 +161,48 @@
</Target>
+ <!-- Split projects into 2 lists
+ ProjectReferenceWithConfigurationExistent: Projects existent on disk
+ ProjectReferenceWithConfigurationNonExistent: Projects non-existent on disk -->
+
+ <Target Name="SplitProjectReferencesByExistent"
+ DependsOnTargets="AssignProjectConfigurations">
+
+ <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="AssignProjectConfigurations"
+ 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
- Projects="@(ProjectReferenceWithConfiguration)"
+ Projects="@(ProjectReferenceWithConfigurationExistent)"
Targets="GetTargetPath"
- Properties="%(ProjectReferenceWithConfiguration.SetConfiguration); %(ProjectReferenceWithConfiguration.SetPlatform)"
- Condition="'@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingSolutionFile)' == 'true' or '$(BuildingInsideVisualStudio)' == 'true')">
+ Properties="%(ProjectReferenceWithConfigurationExistent.SetConfiguration); %(ProjectReferenceWithConfigurationExistent.SetPlatform)"
+ Condition="'@(ProjectReferenceWithConfigurationExistent)' != '' and ('$(BuildingSolutionFile)' == 'true' or '$(BuildingInsideVisualStudio)' == 'true')">
<Output TaskParameter="TargetOutputs" ItemName="ChildProjectReferences" />
</MSBuild>
<!-- Building a project directly, build the referenced the projects also -->
<MSBuild
- Projects="@(ProjectReferenceWithConfiguration)"
- Properties="%(ProjectReferenceWithConfiguration.SetConfiguration); %(ProjectReferenceWithConfiguration.SetPlatform)"
- Condition="'@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingSolutionFile)' != 'true' and '$(BuildingInsideVisualStudio)' != 'true' ">
+ Projects="@(ProjectReferenceWithConfigurationExistent)"
+ Properties="%(ProjectReferenceWithConfigurationExistent.SetConfiguration); %(ProjectReferenceWithConfigurationExistent.SetPlatform)"
+ Condition="'@(ProjectReferenceWithConfigurationExistent)' != '' and '$(BuildingSolutionFile)' != 'true' and '$(BuildingInsideVisualStudio)' != 'true' ">
<Output TaskParameter="TargetOutputs" ItemName="ChildProjectReferences" />
</MSBuild>
+
+ <Warning Text="Referenced Project %(ProjectReferenceWithConfigurationNonExistent.Identity) not found, ignoring."
+ Condition="'@(ProjectReferenceWithConfigurationNonExistent)' != ''"/>
</Target>
<Target Name = "CopyFilesMarkedCopyLocal">
@@ -441,15 +459,15 @@
<Target Name="GetCopyToOutputDirectoryItems"
Outputs="@(AllItemsFullPathWithTargetPath)"
- DependsOnTargets="AssignTargetPaths">
+ DependsOnTargets="AssignTargetPaths;SplitProjectReferencesByExistent">
<!-- FIXME: handle .vcproj
FIXME: Private ProjectReferences are honored only in 3.5
-->
<MSBuild
- Projects="@(ProjectReference)"
+ Projects="@(ProjectReferenceWithConfigurationExistent)"
Targets="GetCopyToOutputDirectoryItems"
- Condition="'@(ProjectReference)' != '' and '%(ProjectReference.Private)' != 'false'">
+ Condition="'@(ProjectReferenceWithConfigurationExistent)' != '' and '%(ProjectReferenceWithConfigurationExistent.Private)' != 'false'">
<Output TaskParameter="TargetOutputs" ItemName="AllChildProjectItemsWithTargetPath"/>
</MSBuild>
@@ -619,9 +637,9 @@
<!-- If building from .sln.proj or from IDE, clean will get handled by them,
else we are building a project directly, from the command line, so
clean the referenced projects -->
- <MSBuild Projects="@(ProjectReferenceWithConfiguration)"
+ <MSBuild Projects="@(ProjectReferenceWithConfigurationExistent)"
Targets="Clean"
- Condition=" '$(BuildingSolutionFile)' != 'true' and '$(BuildingInsideVisualStudio)' != 'true' and '@(ProjectReferenceWithConfiguration)' != ''" />
+ Condition=" '$(BuildingSolutionFile)' != 'true' and '$(BuildingInsideVisualStudio)' != 'true' and '@(ProjectReferenceWithConfigurationExistent)' != ''" />
</Target>