+ if (targets == null || targets.Length == 0)
+ return true;
+
+ Hashtable targets_table = new Hashtable ();
+
+ if (!RunEachTargetSeparately) {
+ bool ret = BuildEngine.BuildProjectFile (BuildEngine.ProjectFileOfTaskNode,
+ targets, null, targets_table);
+ foreach (ITaskItem[] items in targets_table.Values) {
+ if (items != null)
+ targetOutputs_list.AddRange (items);
+ }
+
+ return ret;
+ }
+
+ // RunEachTargetSeparately
+ bool allPassed = true;
+ for (int i = 0; i < targets.Length; i ++) {
+ string target = targets [i];
+ bool result = BuildEngine.BuildProjectFile (BuildEngine.ProjectFileOfTaskNode,
+ new string[] { target }, null, targets_table);
+
+ if (allPassed && !result)
+ allPassed = false;
+
+ if (!targets_table.Contains (target))
+ continue;
+
+ ITaskItem [] items = (ITaskItem[]) targets_table [target];
+ if (items != null)
+ targetOutputs_list.AddRange (items);
+ }
+
+ return allPassed;