[Monodevelop-patches-list] r1641 - in trunk/MonoDevelop/src: AddIns/BackendBindings/CSharpBinding Main/Base Main/Base/Internal/Project/Combine Main/Base/Internal/Templates/ProjectTemplates

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Wed May 26 05:59:26 EDT 2004


Author: tberman
Date: 2004-05-26 05:59:26 -0400 (Wed, 26 May 2004)
New Revision: 1641

Modified:
   trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs
   trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog
   trunk/MonoDevelop/src/Main/Base/ChangeLog
   trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs
   trunk/MonoDevelop/src/Main/Base/Internal/Templates/ProjectTemplates/CombineDescriptor.cs
Log:
the build system now properly handles building a solution that has 2 projects, one that references the other.


Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs	2004-05-26 08:50:30 UTC (rev 1640)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs	2004-05-26 09:59:26 UTC (rev 1641)
@@ -399,10 +399,10 @@
 				stream.WriteLine ("PKG_REFERENCES_BUILD = $(addprefix -pkg:, $(PKG_REFERENCES))");
 				stream.WriteLine ();
 				stream.WriteLine ("PKG_REFERENCES_CHECK = $(addsuffix .pkgcheck, $(PKG_REFERENCES))");
+				stream.WriteLine ();
 			}
 			
 			if (system_references.Count > 0) {
-				stream.WriteLine ();
 				stream.WriteLine ("SYSTEM_REFERENCES = \\");
 				for (int i = 0; i < system_references.Count; i++) {
 					stream.Write (system_references[i]);

Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog	2004-05-26 08:50:30 UTC (rev 1640)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog	2004-05-26 09:59:26 UTC (rev 1641)
@@ -1,3 +1,7 @@
+2004-05-26  Todd Berman  <tberman at sevenl.net>
+
+	* CSharpBindingCompilerManager.cs: more makefile magic.
+
 2004-05-25  Todd Berman  <tberman at sevenl.net>
 
 	* Parser/Parser.cs: Update MonodocResolver and IsAsResolver.

Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-05-26 08:50:30 UTC (rev 1640)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-05-26 09:59:26 UTC (rev 1641)
@@ -1,5 +1,13 @@
 2004-05-26  Todd Berman  <tberman at sevenl.net>
 
+	* Internal/Project/Combine/Combine.cs: actually tested with a solution
+	with 2 projects in it, one that references the other. It works now,
+	building, cleaning, running, etc.
+	* Internal/Templates/ProjectTemplates/CombineDescriptor.cs: setup
+	OutputDirectory properly by default.
+
+2004-05-26  Todd Berman  <tberman at sevenl.net>
+
 	* Internal/Project/Project/AbstractProject.cs: ignore .pidb, .mdsx and
 	make.sh.
 

Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs	2004-05-26 08:50:30 UTC (rev 1640)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs	2004-05-26 09:59:26 UTC (rev 1641)
@@ -18,7 +18,9 @@
 using Mono.Posix;
 using FileMode = Mono.Posix.FileMode;
 
+
 using MonoDevelop.Core.Services;
+
 using MonoDevelop.Services;
 using MonoDevelop.Internal.Project;
 using MonoDevelop.Core.Properties;
@@ -622,8 +624,9 @@
 
 		public void GenerateMakefiles ()
 		{
+			ArrayList allProjects = TopologicalSort (GetAllProjects (this));
 			ArrayList projects = new ArrayList ();
-			foreach (CombineEntry entry in entries) {
+			foreach (CombineEntry entry in allProjects) {
 				if (entry is ProjectCombineEntry) {
 					entry.GenerateMakefiles (this);
 					projects.Add (((ProjectCombineEntry)entry).Project);
@@ -631,7 +634,7 @@
 				else
 					Console.WriteLine ("Dont know how to generate makefiles for " + entry);
 			}
-
+			
 			FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
 			string rel_outputdir = fileUtilityService.AbsoluteToRelativePath (path, outputdir);
 			
@@ -652,9 +655,10 @@
 			stream.WriteLine ();
 
 			stream.WriteLine ("OUTPUTDIR := {0}", rel_outputdir);
+			stream.WriteLine ();
 			stream.Write ("all: depcheck __init ");
 			foreach (IProject proj in projects) {
-				stream.Write ("Makefile.{0}.all", proj.Name);
+				stream.Write ("Makefile.{0}.all ", proj.Name);
 			}
 			stream.WriteLine ();
 			stream.WriteLine ();
@@ -665,14 +669,14 @@
 
 			stream.Write ("clean: ");
 			foreach (IProject proj in projects) {
-				stream.Write ("Makefile.{0}.clean", proj.Name);
+				stream.Write ("Makefile.{0}.clean ", proj.Name);
 			}
 			stream.WriteLine ();
 			stream.WriteLine ();
 
 			stream.Write ("depcheck: ");
 			foreach (IProject proj in projects) {
-				stream.Write ("Makefile.{0}.depcheck", proj.Name);
+				stream.Write ("Makefile.{0}.depcheck ", proj.Name);
 			}
 			stream.WriteLine ();
 			stream.WriteLine ();
@@ -686,8 +690,10 @@
 			stream.WriteLine ();
 
 			foreach (IProject proj in projects) {
+				string relativeLocation = fileUtilityService.AbsoluteToRelativePath (path, proj.BaseDirectory);
 				stream.WriteLine ("Makefile.{0}.%:", proj.Name);
-				stream.WriteLine ("\t@$(MAKE) -f $(subst .$*,,$@) $*");
+				stream.WriteLine ("\t at cd {0} && $(MAKE) -f $(subst .$*,,$@) $*", relativeLocation);
+				stream.WriteLine ();
 			}
 
 			stream.Flush ();

Modified: trunk/MonoDevelop/src/Main/Base/Internal/Templates/ProjectTemplates/CombineDescriptor.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Templates/ProjectTemplates/CombineDescriptor.cs	2004-05-26 08:50:30 UTC (rev 1640)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Templates/ProjectTemplates/CombineDescriptor.cs	2004-05-26 09:59:26 UTC (rev 1641)
@@ -94,6 +94,7 @@
 			
 			// Save combine
 			string combineLocation = fileUtilityService.GetDirectoryNameWithSeparator(projectCreateInformation.CombinePath) + newCombineName + ".cmbx";
+			newCombine.OutputDirectory = Path.Combine (Path.Combine (Path.GetDirectoryName (combineLocation), "build"), "bin");
 			if (File.Exists(combineLocation)) {
 				IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
 				if (messageService.AskQuestion(String.Format (GettextCatalog.GetString ("Solution file {0} already exists, do you want to overwrite\nthe existing file ?"), combineLocation))) {




More information about the Monodevelop-patches-list mailing list