[xbuild] Add new reserved properties $(MSBuildThisFile*).
[mono.git] / mcs / class / Microsoft.Build.Engine / Microsoft.Build.BuildEngine / Target.cs
index beb7c581dab54b864d0a62148b62ec5f5c64bee7..439c56fd94b14b4887d57ace200ec0d5f5e82e71 100644 (file)
@@ -122,6 +122,16 @@ namespace Microsoft.Build.BuildEngine {
                }
 
                bool Build (string built_targets_key, out bool executeOnErrors)
+               {
+                       project.PushThisFileProperty (TargetFile);
+                       try {
+                               return BuildActual (built_targets_key, out executeOnErrors);
+                       } finally {
+                               project.PopThisFileProperty ();
+                       }
+               }
+
+               bool BuildActual (string built_targets_key, out bool executeOnErrors)
                {
                        bool result = false;
                        executeOnErrors = false;