[Monodevelop-patches-list] r1538 - trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Wed Apr 28 07:05:51 EDT 2004
Author: tberman
Date: 2004-04-28 07:05:51 -0400 (Wed, 28 Apr 2004)
New Revision: 1538
Modified:
trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog
Log:
process project references properly.
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs 2004-04-28 10:26:37 UTC (rev 1537)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs 2004-04-28 11:05:51 UTC (rev 1538)
@@ -303,6 +303,7 @@
ArrayList compile_files = new ArrayList ();
ArrayList gac_references = new ArrayList ();
ArrayList assembly_references = new ArrayList ();
+ ArrayList project_references = new ArrayList ();
ArrayList resources = new ArrayList ();
foreach (ProjectFile finfo in project.ProjectFiles) {
@@ -333,6 +334,20 @@
string rel_path_to = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, Path.GetDirectoryName (assembly_fileName));
assembly_references.Add (Path.Combine (rel_path_to, Path.GetFileName (assembly_fileName)));
break;
+ case ReferenceType.Project:
+ string project_fileName = lib.GetReferencedFileName (project);
+ IProjectService prjService = (IProjectService)ServiceManager.Services.GetService (typeof (IProjectService));
+ ArrayList allProjects = Combine.GetAllProjects(prjService.CurrentOpenCombine);
+
+ foreach (ProjectCombineEntry projectEntry in allProjects) {
+ if (projectEntry.Project.Name == lib.Reference) {
+ string project_base_dir = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, projectEntry.Project.BaseDirectory);
+
+ string project_output_fileName = prjService.GetOutputAssemblyName (projectEntry.Project);
+ project_references.Add (Path.Combine (project_base_dir, Path.GetFileName (project_output_fileName)));
+ }
+ }
+ break;
}
}
@@ -383,11 +398,24 @@
stream.WriteLine ("ASSEMBLY_REFERENCES_BUILD = $(addprefix /r:, $(ASSEMBLY_REFERENCES))");
stream.WriteLine ();
+ stream.WriteLine ("PROJECT_REFERENCES = \\");
+ for (int i = 0; i < project_references.Count; i++) {
+ stream.Write (project_references[i]);
+ if (i != project_references.Count - 1)
+ stream.WriteLine (" \\");
+ else
+ stream.WriteLine ();
+ }
+
+ stream.WriteLine ();
+ stream.WriteLine ("PROJECT_REFERENCES_BUILD = $(addprefix /r:, $(PROJECT_REFERENCES))");
+ stream.WriteLine ();
+
stream.WriteLine ("all: " + outputName);
stream.WriteLine ();
stream.WriteLine (outputName + ": $(SOURCES) $(RESOURCES)");
- stream.WriteLine ("\tmcs /target:{0} /out:{1} $(RESOURCES_BUILD) $(GAC_REFERENCES_BUILD) $(ASSEMBLY_REFERENCES_BUILD) $(SOURCES)", target, outputName);
+ stream.WriteLine ("\tmcs /target:{0} /out:{1} $(RESOURCES_BUILD) $(GAC_REFERENCES_BUILD) $(ASSEMBLY_REFERENCES_BUILD) $(PROJECT_REFERENCES_BUILD) $(SOURCES)", target, outputName);
stream.Flush ();
stream.Close ();
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog 2004-04-28 10:26:37 UTC (rev 1537)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog 2004-04-28 11:05:51 UTC (rev 1538)
@@ -1,5 +1,9 @@
2004-04-28 Todd Berman <tberman at sevenl.net>
+ * CSharpBindingCompilerManager.cs: add code for project references.
+
+2004-04-28 Todd Berman <tberman at sevenl.net>
+
* CSharpBindingCompilerManger.cs: add code for assembly references
and embeding resources.
More information about the Monodevelop-patches-list
mailing list