[Monodevelop-patches-list] r1629 - in trunk/MonoDevelop/src: AddIns/BackendBindings/CSharpBinding AddIns/BackendBindings/ILAsmBinding AddIns/BackendBindings/JavaBinding AddIns/BackendBindings/NemerleBinding Main/Base Main/Base/Internal/Codons/LanguageBinding Main/Base/Internal/Project/Combine
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Tue May 25 02:22:25 EDT 2004
Author: tberman
Date: 2004-05-25 02:22:25 -0400 (Tue, 25 May 2004)
New Revision: 1629
Modified:
trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog
trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ChangeLog
trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ILAsmLanguageBinding.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/ChangeLog
trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/JavaLanguageBinding.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/ChangeLog
trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleLanguageBinding.cs
trunk/MonoDevelop/src/Main/Base/ChangeLog
trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs
trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs
trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs
trunk/MonoDevelop/src/Main/Base/Makefile.am
Log:
build system changes. blah blah blah
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs 2004-05-25 06:22:25 UTC (rev 1629)
@@ -257,7 +257,7 @@
writer.Close();
string output = String.Empty;
- string error = String.Empty;
+ string error = String.Empty;
string compilerName = compilerparameters.CsharpCompiler == CsharpCompiler.Csc ? GetCompilerName() : System.Environment.GetEnvironmentVariable("ComSpec") + " /c mcs";
string outstr = compilerName + " @" + responseFileName;
@@ -277,16 +277,17 @@
return result;
}
- public void GenerateMakefile (IProject project)
+ public void GenerateMakefile (IProject project, Combine parentCombine)
{
StreamWriter stream = new StreamWriter (Path.Combine (project.BaseDirectory, "Makefile." + project.Name));
CSharpProject p = (CSharpProject)project;
CSharpCompilerParameters compilerparameters = (CSharpCompilerParameters)p.ActiveConfiguration;
- string outputName = "\"" + compilerparameters.OutputAssembly + (compilerparameters.CompileTarget == CompileTarget.Library ? ".dll" : ".exe") + "\"";
+ string outputName = compilerparameters.OutputAssembly + (compilerparameters.CompileTarget == CompileTarget.Library ? ".dll" : ".exe");
string target = "";
+ string relativeOutputDir = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, parentCombine.OutputDirectory);
switch (compilerparameters.CompileTarget) {
case CompileTarget.Exe:
@@ -470,7 +471,7 @@
stream.WriteLine ();
}
- stream.Write ("\tmcs $(MCS_OPTIONS) -target:{0} -out:{1}", target, outputName);
+ stream.Write ("\tmcs $(MCS_OPTIONS) -target:{0} -out:\"{1}\"", target, outputName);
if (resources.Count > 0) {
stream.Write (" $(RESOURCES_BUILD)");
}
@@ -486,8 +487,9 @@
if (system_references.Count > 0) {
stream.Write (" $(SYSTEM_REFERENCES_BUILD)");
}
- stream.WriteLine (" $(SOURCES)");
-
+ stream.WriteLine (" $(SOURCES) \\");
+ stream.WriteLine ("\t&& cp \"{0}\" {1}", outputName, relativeOutputDir);
+
stream.WriteLine ();
stream.WriteLine ("clean:");
stream.WriteLine ("\trm -f {0}", outputName);
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs 2004-05-25 06:22:25 UTC (rev 1629)
@@ -93,9 +93,9 @@
return new CSharpProject(info, projectOptions);
}
- public void GenerateMakefile (IProject project)
+ public void GenerateMakefile (IProject project, Combine parentCombine)
{
- compilerManager.GenerateMakefile (project);
+ compilerManager.GenerateMakefile (project, parentCombine);
}
}
}
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog 2004-05-25 06:22:25 UTC (rev 1629)
@@ -1,3 +1,9 @@
+2004-05-25 Todd Berman <tberman at sevenl.net>
+
+ * CSharpLanguageBinding.cs: signature change for GenerateMakefile
+ * CSharpBindingCompilerManager.cs: lots of new stuff, make run compat
+ stuff, etc, etc
+
2004-05-22 Todd Berman <tberman at sevenl.net>
* CSharpBindingCompilerManager.cs: add "s to work around potential
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ChangeLog 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ChangeLog 2004-05-25 06:22:25 UTC (rev 1629)
@@ -1,3 +1,7 @@
+2004-05-25 Todd Berman <tberman at sevenl.net>
+
+ * ILAsmLanguageBinding.cs: sigchange for GenerateMakefile
+
2004-04-28 Todd Berman <tberman at sevenl.net>
* ILAsmLanguageBinding.cs: stubbing GenerateMakefile
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ILAsmLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ILAsmLanguageBinding.cs 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ILAsmLanguageBinding.cs 2004-05-25 06:22:25 UTC (rev 1629)
@@ -104,7 +104,7 @@
return new ILAsmProject(info, projectOptions);
}
- public void GenerateMakefile (IProject project)
+ public void GenerateMakefile (IProject project, Combine parentCombine)
{
throw new NotImplementedException ();
}
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/ChangeLog 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/ChangeLog 2004-05-25 06:22:25 UTC (rev 1629)
@@ -1,3 +1,7 @@
+2004-05-25 Todd Berman <tberman at sevenl.net>
+
+ * JavaLanguageBinding.cs: signature change for GenerateMakefile.
+
2004-04-28 Todd Berman <tberman at sevenl.net>
* JavaLanguageBinding.cs: stubbing GenerateMakefile.
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/JavaLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/JavaLanguageBinding.cs 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/JavaLanguageBinding.cs 2004-05-25 06:22:25 UTC (rev 1629)
@@ -92,7 +92,7 @@
//executionManager.Debug (project);
}
- public void GenerateMakefile (IProject project)
+ public void GenerateMakefile (IProject project, Combine parentCombine)
{
throw new NotImplementedException ();
}
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/ChangeLog 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/ChangeLog 2004-05-25 06:22:25 UTC (rev 1629)
@@ -1,3 +1,7 @@
+2004-05-25 Todd Berman <tberman at sevenl.net>
+
+ * NemerleLanguageBinding.cs: signature change for Generate Makefile.
+
2004-05-20 Pawel Rozanski <tokugawa at afn.no-ip.org>
* NemerleBindingCompilerServices.cs: updated ncc output parser.
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleLanguageBinding.cs 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleLanguageBinding.cs 2004-05-25 06:22:25 UTC (rev 1629)
@@ -76,7 +76,7 @@
throw new ApplicationException("No Nemele debug");
}
- public void GenerateMakefile (IProject project)
+ public void GenerateMakefile (IProject project, Combine parentCombine)
{
throw new NotImplementedException ();
}
Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-05-25 06:22:25 UTC (rev 1629)
@@ -1,3 +1,13 @@
+2004-05-25 Todd Berman <tberman at sevenl.net>
+
+ * Internal/Project/Combine/Combine.cs: more makefile magic for
+ building, outputting semi-properly, and a make run setup.
+ * Internal/Project/Combine/CombineEntry.cs: pass the Combine to the
+ makefile being generated.
+ * Internal/Codons/LanguageBinding/ILanguageBinding.cs: pass the Combine
+ on down.
+ * Makefile.am: Add Mono.Posix to the build.
+
2004-05-24 Todd Berman <tberman at sevenl.net>
* Gui/Workbench/DefaultWorkbench.cs: Setup text/uri-list DnD.
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs 2004-05-25 06:22:25 UTC (rev 1629)
@@ -56,7 +56,7 @@
ICompilerResult RecompileProject(IProject project);
- void GenerateMakefile (IProject project);
+ void GenerateMakefile (IProject project, Combine parentCombine);
/// <summary>
/// Creates a IProject out of the given ProjetCreateInformation object.
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs 2004-05-25 06:22:25 UTC (rev 1629)
@@ -15,6 +15,9 @@
using System.CodeDom.Compiler;
using System.ComponentModel;
+using Mono.Posix;
+using FileMode = Mono.Posix.FileMode;
+
using MonoDevelop.Core.Services;
using MonoDevelop.Services;
using MonoDevelop.Internal.Project;
@@ -298,6 +301,7 @@
XmlElement projectsnode = doc.CreateElement("Entries");
FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+
foreach (CombineEntry entry in entries) {
XmlElement el = doc.CreateElement("Entry");
@@ -567,22 +571,44 @@
ArrayList projects = new ArrayList ();
foreach (CombineEntry entry in entries) {
if (entry is ProjectCombineEntry) {
- entry.GenerateMakefiles ();
+ entry.GenerateMakefiles (this);
projects.Add (((ProjectCombineEntry)entry).Project);
}
else
Console.WriteLine ("Dont know how to generate makefiles for " + entry);
}
- StreamWriter stream = new StreamWriter (Path.Combine (path, "Makefile"));
+ FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+ string rel_outputdir = fileUtilityService.AbsoluteToRelativePath (path, outputdir);
+
+ StreamWriter buildstream = new StreamWriter (Path.Combine (path, "make.sh"));
+ buildstream.WriteLine ("#!/bin/sh");
+ buildstream.WriteLine ("# This file is autogenerated by MonoDevelop");
+ buildstream.WriteLine ("# Do not edit it.");
+ buildstream.WriteLine ();
+ buildstream.WriteLine ("make -f Makefile.solution.{0} \"$@\"", Name);
+ buildstream.Flush ();
+ buildstream.Close ();
+
+ Syscall.chmod (Path.Combine (path, "make.sh"), FileMode.S_IRUSR | FileMode.S_IWUSR | FileMode.S_IXUSR | FileMode.S_IRGRP | FileMode.S_IWGRP | FileMode.S_IROTH);
- stream.Write ("all: ");
+ StreamWriter stream = new StreamWriter (Path.Combine (path, "Makefile.solution." + Name));
+ stream.WriteLine ("# This file is autogenerated by MonoDevelop");
+ stream.WriteLine ("# Do not edit it.");
+ stream.WriteLine ();
+
+ stream.WriteLine ("OUTPUTDIR := {0}", rel_outputdir);
+ stream.Write ("all: depcheck __init ");
foreach (IProject proj in projects) {
stream.Write ("Makefile.{0}.all", proj.Name);
}
stream.WriteLine ();
stream.WriteLine ();
+ stream.WriteLine ("__init:");
+ stream.WriteLine ("\tmkdir -p $(OUTPUTDIR)");
+ stream.WriteLine ();
+
stream.Write ("clean: ");
foreach (IProject proj in projects) {
stream.Write ("Makefile.{0}.clean", proj.Name);
@@ -597,6 +623,14 @@
stream.WriteLine ();
stream.WriteLine ();
+ stream.WriteLine ("run: all");
+ if (!SingleStartupProject) {
+ stream.WriteLine ("\t at echo `run'ning multiple startup projects is not yet support");
+ } else {
+ stream.WriteLine ("\tcd $(OUTPUTDIR) && mono {0}", GetEntry (SingleStartProjectName).GetOutputName ());
+ }
+ stream.WriteLine ();
+
foreach (IProject proj in projects) {
stream.WriteLine ("Makefile.{0}.%:", proj.Name);
stream.WriteLine ("\t@$(MAKE) -f $(subst .$*,,$@) $*");
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs 2004-05-25 06:22:25 UTC (rev 1629)
@@ -67,7 +67,8 @@
public abstract void Execute();
public abstract void Save();
public abstract void Debug ();
- public abstract void GenerateMakefiles ();
+ public abstract void GenerateMakefiles (Combine parentCombine);
+ public abstract string GetOutputName ();
}
public class ProjectCombineEntry : CombineEntry
@@ -212,13 +213,20 @@
project.SaveProject(Filename);
}
- public override void GenerateMakefiles ()
+ public override void GenerateMakefiles (Combine parentCombine)
{
Console.WriteLine ("Generating makefiles for " + Name);
LanguageBindingService languageBindingService = (LanguageBindingService)ServiceManager.Services.GetService(typeof(LanguageBindingService));
ILanguageBinding langBinding = languageBindingService.GetBindingPerLanguageName(project.ProjectType);
- langBinding.GenerateMakefile (project);
+ langBinding.GenerateMakefile (project, parentCombine);
}
+
+ public override string GetOutputName ()
+ {
+ LanguageBindingService lbs = (LanguageBindingService)ServiceManager.Services.GetService (typeof (LanguageBindingService));
+ ILanguageBinding langBinding = lbs.GetBindingPerLanguageName (project.ProjectType);
+ return System.IO.Path.GetFileName (langBinding.GetCompiledOutputName (project));
+ }
}
public class CombineCombineEntry : CombineEntry
@@ -262,8 +270,13 @@
combine.Debug ();
}
- public override void GenerateMakefiles ()
+ public override void GenerateMakefiles (Combine parentCombine)
{
}
+
+ public override string GetOutputName ()
+ {
+ return String.Empty;
+ }
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Makefile.am
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Makefile.am 2004-05-25 04:28:24 UTC (rev 1628)
+++ trunk/MonoDevelop/src/Main/Base/Makefile.am 2004-05-25 06:22:25 UTC (rev 1629)
@@ -7,8 +7,9 @@
/r:../../../build/bin/ICSharpCode.SharpAssembly.dll \
/r:../../../build/bin/MonoDevelop.Gui.Utils.dll \
/r:../../../build/bin/MonoDevelop.Gui.Widgets.dll \
- /r:System.Data /r:System.Web.Services \
+ /r:System.Data.dll /r:System.Web.Services.dll \
/r:../../../build/bin/gdl-sharp.dll \
+ /r:Mono.Posix.dll \
$(BASE_DEPENDENCIES_LIBS)
FILES= \
More information about the Monodevelop-patches-list
mailing list