Author: msierad
Date: 2006-12-04 10:56:36 -0500 (Mon, 04 Dec 2006)
New Revision: 68957

Modified:
   trunk/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AL.cs
   trunk/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ChangeLog
   
trunk/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ManagedCompiler.cs
Log:
2006-12-04  Marek Sieradzki  <[EMAIL PROTECTED]>

        * ManagedCompiler.cs: AddCommandLineCommands (): Changes according to
        new tests. CheckAllReferences (): Added a null check.
        * AL.cs (AddResponseFileCommands): Changes according to new tests.



Modified: trunk/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AL.cs
===================================================================
--- trunk/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AL.cs   
2006-12-04 15:51:02 UTC (rev 68956)
+++ trunk/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AL.cs   
2006-12-04 15:56:36 UTC (rev 68957)
@@ -51,23 +51,27 @@
                        commandLine.AppendSwitchIfNotNull ("/baseaddress:", 
BaseAddress);
                        commandLine.AppendSwitchIfNotNull ("/company:", 
CompanyName);
                        commandLine.AppendSwitchIfNotNull ("/configuration:", 
Configuration);
+                       commandLine.AppendSwitchIfNotNull ("/culture:", 
Culture);
                        commandLine.AppendSwitchIfNotNull ("/copyright:", 
Copyright);
-                       commandLine.AppendSwitchIfNotNull ("/culture:", 
Culture);
-                       if (DelaySign == true)
-                               commandLine.AppendSwitch ("/delaysign");
+                       if (Bag ["DelaySign"] != null)
+                               if (DelaySign)
+                                       commandLine.AppendSwitch 
("/delaysign+");
+                               else
+                                       commandLine.AppendSwitch 
("/delaysign-");
+                       commandLine.AppendSwitchIfNotNull ("/description:", 
Description);
                        if (EmbedResources != null)
                                foreach (ITaskItem item in EmbedResources)
-                                       commandLine.AppendSwitchIfNotNull 
("/embedresource:", item.ItemSpec);
+                                       commandLine.AppendSwitchIfNotNull 
("/embed:", item.ItemSpec);
                        commandLine.AppendSwitchIfNotNull ("/evidence:", 
EvidenceFile);
                        commandLine.AppendSwitchIfNotNull ("/fileversion:", 
FileVersion);
                        commandLine.AppendSwitchIfNotNull ("/flags:", Flags);
-                       if (GenerateFullPaths == true)
+                       if (GenerateFullPaths)
                                commandLine.AppendSwitch ("/fullpaths");
                        commandLine.AppendSwitchIfNotNull ("/keyname:", 
KeyContainer);
                        commandLine.AppendSwitchIfNotNull ("/keyfile:", 
KeyFile);
                        if (LinkResources != null)
                                foreach (ITaskItem item in LinkResources)
-                                       commandLine.AppendSwitchIfNotNull 
("/linkresource:", item.ItemSpec);
+                                       commandLine.AppendSwitchIfNotNull 
("/link:", item.ItemSpec);
                        commandLine.AppendSwitchIfNotNull ("/main:", 
MainEntryPoint);
                        if (OutputAssembly != null)
                                commandLine.AppendSwitchIfNotNull ("/out:", 
OutputAssembly.ItemSpec);
@@ -267,4 +271,4 @@
        }
 }
 
-#endif
\ No newline at end of file
+#endif

Modified: trunk/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ChangeLog
===================================================================
--- trunk/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ChangeLog       
2006-12-04 15:51:02 UTC (rev 68956)
+++ trunk/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ChangeLog       
2006-12-04 15:56:36 UTC (rev 68957)
@@ -1,5 +1,11 @@
 2006-12-04  Marek Sieradzki  <[EMAIL PROTECTED]>
 
+       * ManagedCompiler.cs: AddCommandLineCommands (): Changes according to
+       new tests. CheckAllReferences (): Added a null check.
+       * AL.cs (AddResponseFileCommands): Changes according to new tests.
+
+2006-12-04  Marek Sieradzki  <[EMAIL PROTECTED]>
+
        * MSBuild.cs: Added MonoTODO.
        * MakeDir.cs: Added logging.
        * Exec.cs: Added FIXME and commented unused variables.

Modified: 
trunk/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ManagedCompiler.cs
===================================================================
--- 
trunk/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ManagedCompiler.cs  
    2006-12-04 15:51:02 UTC (rev 68956)
+++ 
trunk/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ManagedCompiler.cs  
    2006-12-04 15:56:36 UTC (rev 68957)
@@ -44,6 +44,8 @@
                protected internal override void AddCommandLineCommands (
                                                 CommandLineBuilderExtension 
commandLine)
                {
+                       if (NoConfig)
+                               commandLine.AppendSwitch ("/noconfig");
                }
 
                [MonoTODO]
@@ -52,12 +54,20 @@
                {
                        commandLine.AppendSwitchIfNotNull ("/lib:", 
AdditionalLibPaths, ",");
                        commandLine.AppendSwitchIfNotNull ("/addmodule:", 
AddModules, ",");
-                       //commandLine.AppendSwitchIfNotNull ("/codepage:", 
CodePage.ToString ());
-                       //debugType
+                       if (Bag ["CodePage"] != null)
+                               commandLine.AppendSwitchIfNotNull 
("/codepage:", CodePage.ToString ());
+                       commandLine.AppendSwitchIfNotNull ("/debug:", 
DebugType);
                        commandLine.AppendSwitchIfNotNull ("/define:", 
DefineConstants);
-                       //delaySign
-                       if (EmitDebugInformation)
-                               commandLine.AppendSwitch ("/debug");
+                       if (Bag ["DelaySign"] != null)
+                               if (DelaySign)
+                                       commandLine.AppendSwitch 
("/delaysign+");
+                               else
+                                       commandLine.AppendSwitch 
("/delaysign-");
+                       if (Bag ["EmitDebugInformation"] != null)
+                               if (EmitDebugInformation)
+                                       commandLine.AppendSwitch ("/debug+");
+                               else
+                                       commandLine.AppendSwitch ("/debug-");
                        //fileAlignment
                        commandLine.AppendSwitchIfNotNull ("/keycontainer:", 
KeyContainer);
                        commandLine.AppendSwitchIfNotNull ("/keyfile:", 
KeyFile);
@@ -68,10 +78,13 @@
                                }
                        }
                        commandLine.AppendSwitchIfNotNull ("/main:", 
MainEntryPoint);
-                       if (NoConfig)
-                               commandLine.AppendSwitch ("/noconfig");
-                       if (Optimize)
-                               commandLine.AppendSwitch ("/optimize");
+                       if (NoLogo)
+                               commandLine.AppendSwitch ("/nologo");
+                       if (Bag ["Optimize"] != null)
+                               if (Optimize)
+                                       commandLine.AppendSwitch ("/optimize+");
+                               else
+                                       commandLine.AppendSwitch ("/optimize-");
                        if (OutputAssembly != null)
                                commandLine.AppendSwitchIfNotNull ("/out:", 
OutputAssembly.ItemSpec);
                        if (References != null) {
@@ -96,8 +109,11 @@
                        }
                        if (TargetType != null)
                                commandLine.AppendSwitchIfNotNull ("/target:", 
TargetType);
-                       if (TreatWarningsAsErrors)
-                               commandLine.AppendSwitch ("/warnaserror");
+                       if (Bag ["TreatWarningsAsErrors"] != null)
+                               if (TreatWarningsAsErrors)
+                                       commandLine.AppendSwitch 
("/warnaserror+");
+                               else
+                                       commandLine.AppendSwitch 
("/warnaserror-");
                        commandLine.AppendSwitchIfNotNull ("/win32icon:", 
Win32Icon);
                        commandLine.AppendSwitchIfNotNull ("/win32res:", 
Win32Resource);
                }
@@ -105,9 +121,10 @@
                [MonoTODO]
                protected bool CheckAllReferencesExistOnDisk ()
                {
-                       foreach (ITaskItem item in (ITaskItem[])Bag 
["References"]) 
-                               if (File.Exists (item.GetMetadata ("FullPath")) 
== false)
-                                       return false;
+                       if (Bag ["References"] != null)
+                               foreach (ITaskItem item in (ITaskItem[]) Bag 
["References"])
+                                       if (!File.Exists (item.GetMetadata 
("FullPath")))
+                                               return false;
                        return true;
                }
 
@@ -248,6 +265,7 @@
 
                public ITaskItem[] Sources {
                        get { return (ITaskItem[]) Bag ["Sources"]; }
+                       // FIXME: setting sources changes OutputAssembly
                        set { Bag ["Sources"] = value; }
                }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to