Correctly handle global properties. Correctly log
project/build events.
In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
Correctly handle global properties. Correctly log
project/build events.
* BuildPropertyGroup.cs (Clone): Implement.
* Engine.cs (globalProperties): Rename to ..
(global_properties): .. this.
(currentlyBuildingProjectsStack): New. Used to correctly
log and raise project/build start/finish events.
(BuildProjectFile): Override any project global properties
with explicitly specified ones, here in the param @globalProperties.
Mark project for reevaluation, which will update the engine's
global properties also.
Reset both engine and project's old global properties at the end.
(UnregisterAllLoggers): Log build finished only if we are currently
building.
(StartBuild): Rename to ..
(StartProjectBuild): .. this. Keeps track of the projects being built
in the new stack, and logs project and build events accordingly.
(EndProjectBuild): New. Uses the stack to keep track of projects
finishing builds, and raises project and build events accordingly.
(LogProjectStarted): Move here from Project.cs
(LogProjectFinished): Likewise.
* Project.cs (Build): Log start of project build.
Set current directory to the project file's dir, and reset at end.
(BuildInternal): Don't log here, its done in Build.
(BuildTarget): Already built targets are keyed by the set of global
properties that they were built with.
(GlobalPropertiesToString): New.
(ResetBuildStatus): 'building' must be true to allow built targets to be reset.
(RemoveBuiltTargets): Initialize builtTargetKeys in .ctor
(Evaluate): Remove built targets only if we are currently building and
build settings are None.
Merge project's global properties with those of the parent engine.
Add missing properties from engine's global properties.
(LogTargetSkipped): Fix format string, add the reqd argument.
In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:
* EngineTest.cs (TestGlobalProperties*): New tests
and some helper methods.
* ProjectTest.cs (TestResetBuildStatus): Reset twice. Update
the event counts.
In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks:
* TestMessageLogger.cs: Add counts for project/build start/finish
events.
git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mcs@135019 e3ebcda4-bce8-0310-ba0a-eca2169e7518