[Monodevelop-patches-list] r1533 - in trunk/MonoDevelop: build/AddIns src/AddIns/BackendBindings/CSharpBinding src/AddIns/BackendBindings/ILAsmBinding src/AddIns/BackendBindings/JavaBinding src/AddIns/BackendBindings/NemerleBinding src/AddIns/prj2make-sharp-lib src/Main/Base src/Main/Base/Commands src/Main/Base/Internal/Codons/LanguageBinding src/Main/Base/Internal/Project/Combine src/Main/Base/Internal/Project/Project src/Main/Base/Services/Project
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Wed Apr 28 03:15:11 EDT 2004
Author: tberman
Date: 2004-04-28 03:15:10 -0400 (Wed, 28 Apr 2004)
New Revision: 1533
Modified:
trunk/MonoDevelop/build/AddIns/
trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin.xml
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/AddIns/prj2make-sharp-lib/
trunk/MonoDevelop/src/Main/Base/ChangeLog
trunk/MonoDevelop/src/Main/Base/Commands/RunCommands.cs
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/Internal/Project/Project/IncludeFilesDialog.cs
trunk/MonoDevelop/src/Main/Base/Services/Project/DefaultProjectService.cs
trunk/MonoDevelop/src/Main/Base/Services/Project/IProjectService.cs
Log:
start of the new build system, for now accessed through a menuitem.
please please realize this has only been tested with one project, so it is for sure i swear and promise broken for yours.
Property changes on: trunk/MonoDevelop/build/AddIns
___________________________________________________________________
Name: svn:ignore
- Makefile
Makefile.in
MonoDevelop.Debugger.dll
MonoDevelopDebugger.addin.xml
MonoDevelop.Nunit.dll
MonoDevelopNunit.addin
+ Makefile
Makefile.in
MonoDevelop.Debugger.dll
MonoDevelopDebugger.addin.xml
MonoDevelop.Nunit.dll
MonoDevelopNunit.addin
prj2make-sharp-lib.dll
prj2make-sharp-lib.addin.xml
Modified: trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin.xml
===================================================================
--- trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin.xml 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin.xml 2004-04-28 07:15:10 UTC (rev 1533)
@@ -800,6 +800,9 @@
description = "${res:XML.MainMenu.RunMenu.Run.Description}"
shortcut = "F5"
class = "MonoDevelop.Commands.RunCommand"/>
+ <MenuItem id = "GenerateMakefiles"
+ _label = "Generate Makefiles"
+ class = "MonoDevelop.Commands.GenerateMakefiles"/>
</Conditional>
</MenuItem>
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingCompilerManager.cs 2004-04-28 07:15:10 UTC (rev 1533)
@@ -198,8 +198,8 @@
if (finfo.Subtype != Subtype.Directory) {
switch (finfo.BuildAction) {
case BuildAction.Compile:
- Console.Error.WriteLine(finfo.Name);
- writer.WriteLine('"' + finfo.Name + '"');
+ if (CanCompile (finfo.Name))
+ writer.WriteLine('"' + finfo.Name + '"');
break;
case BuildAction.EmbedAsResource:
// Workaround 50752
@@ -276,6 +276,89 @@
File.Delete(error);
return result;
}
+
+ public void GenerateMakefile (IProject project)
+ {
+ 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 target = "";
+
+ switch (compilerparameters.CompileTarget) {
+ case CompileTarget.Exe:
+ target = "exe";
+ break;
+ case CompileTarget.WinExe:
+ target = "winexe";
+ break;
+ case CompileTarget.Library:
+ target = "library";
+ break;
+ }
+
+ ArrayList compile_files = new ArrayList ();
+ ArrayList gac_references = new ArrayList ();
+
+ foreach (ProjectFile finfo in project.ProjectFiles) {
+ if (finfo.Subtype != Subtype.Directory) {
+ switch (finfo.BuildAction) {
+ case BuildAction.Compile:
+ string rel_path = fileUtilityService.AbsoluteToRelativePath (project.BaseDirectory, Path.GetDirectoryName (finfo.Name));
+ compile_files.Add (Path.Combine (rel_path, Path.GetFileName (finfo.Name)));
+ break;
+
+ case BuildAction.EmbedAsResource:
+ //writer.WriteLine("--linkres " + finfo.Name);
+ break;
+ }
+ }
+ }
+
+ foreach (ProjectReference lib in project.ProjectReferences) {
+ switch (lib.ReferenceType) {
+ case ReferenceType.Gac:
+ string fileName = lib.GetReferencedFileName(project);
+ gac_references.Add (Path.GetFileNameWithoutExtension (fileName));
+ break;
+ }
+ }
+
+ stream.WriteLine ("SOURCES = \\");
+ for (int i = 0; i < compile_files.Count; i++) {
+ stream.Write (compile_files[i]);
+ if (i != compile_files.Count - 1)
+ stream.WriteLine (" \\");
+ else
+ stream.WriteLine ();
+ }
+
+ stream.WriteLine ();
+ stream.WriteLine ("GAC_REFERENCES = \\");
+ for (int i = 0; i < gac_references.Count; i++) {
+ stream.Write (gac_references[i]);
+ if (i != gac_references.Count - 1)
+ stream.WriteLine (" \\");
+ else
+ stream.WriteLine ();
+ }
+
+ stream.WriteLine ();
+ stream.WriteLine ("GAC_REFERENCES_BUILD = $(addprefix /r:, $(GAC_REFERENCES))");
+ stream.WriteLine ();
+
+ stream.WriteLine ("all: " + outputName);
+ stream.WriteLine ();
+
+ stream.WriteLine (outputName + ": $(SOURCES)");
+ stream.WriteLine ("\tmcs /target:{0} /out:{1} $(GAC_REFERENCES_BUILD) $(SOURCES)", target, outputName);
+
+ stream.Flush ();
+ stream.Close ();
+ }
string GetCompilerName()
{
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs 2004-04-28 07:15:10 UTC (rev 1533)
@@ -92,5 +92,10 @@
{
return new CSharpProject(info, projectOptions);
}
+
+ public void GenerateMakefile (IProject project)
+ {
+ compilerManager.GenerateMakefile (project);
+ }
}
}
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/ChangeLog 2004-04-28 07:15:10 UTC (rev 1533)
@@ -1,3 +1,10 @@
+2004-04-28 Todd Berman <tberman at sevenl.net>
+
+ * CSharpLanguageBinding.cs: implemented GetMakefile passthru.
+ * CSharpBindingCompilerManager.cs: dirty dirty dirty first draft run
+ through of GenerateMakefile, I have tested this with exactly *one*
+ project, and that is all, just wanted to get something in svn.
+
2004-04-24 Todd Berman <tberman at sevenl.net>
* Parser/Parser.cs: new IsAsResolver passthrough.
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ChangeLog 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ChangeLog 2004-04-28 07:15:10 UTC (rev 1533)
@@ -1,3 +1,8 @@
+2004-04-28 Todd Berman <tberman at sevenl.net>
+
+ * ILAsmLanguageBinding.cs: stubbing GenerateMakefile
+
+
2004-04-26 John Luke <jluke at cfl.rr.com>
* *.cs: ILAsmBinding namespace
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ILAsmLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ILAsmLanguageBinding.cs 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/ILAsmBinding/ILAsmLanguageBinding.cs 2004-04-28 07:15:10 UTC (rev 1533)
@@ -103,5 +103,11 @@
{
return new ILAsmProject(info, projectOptions);
}
+
+ public void GenerateMakefile (IProject project)
+ {
+ throw new NotImplementedException ();
+ }
+
}
}
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/ChangeLog 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/ChangeLog 2004-04-28 07:15:10 UTC (rev 1533)
@@ -1,3 +1,7 @@
+2004-04-28 Todd Berman <tberman at sevenl.net>
+
+ * JavaLanguageBinding.cs: stubbing GenerateMakefile.
+
2004-04-16 John Luke <jluke at cfl.rr.com>
* JavaBindingCompilerService.cs:
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/JavaLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/JavaLanguageBinding.cs 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/JavaLanguageBinding.cs 2004-04-28 07:15:10 UTC (rev 1533)
@@ -91,5 +91,11 @@
{
//executionManager.Debug (project);
}
+
+ public void GenerateMakefile (IProject project)
+ {
+ throw new NotImplementedException ();
+ }
+
}
}
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/ChangeLog 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/ChangeLog 2004-04-28 07:15:10 UTC (rev 1533)
@@ -1,3 +1,7 @@
+2004-04-28 Todd Berman <tberman at sevenl.net>
+
+ * NemerleLanguageBinding.cs: stubbing GenerateMakefile
+
2004-04-28 Pawel Rozanski <tokugawa at afn.no-ip.org>
* Gui/OutputPanel.cs:
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleLanguageBinding.cs 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/NemerleBinding/NemerleLanguageBinding.cs 2004-04-28 07:15:10 UTC (rev 1533)
@@ -75,5 +75,10 @@
{
throw new ApplicationException("No Nemele debug");
}
+
+ public void GenerateMakefile (IProject project)
+ {
+ throw new NotImplementedException ();
+ }
}
}
Property changes on: trunk/MonoDevelop/src/AddIns/prj2make-sharp-lib
___________________________________________________________________
Name: svn:ignore
+ Makefile
Makefile.in
AssemblyInfo.cs
*.dll
Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-04-28 07:15:10 UTC (rev 1533)
@@ -1,5 +1,23 @@
2004-04-27 Todd Berman <tberman at sevenl.net>
+ * Commands/RunCommands.c:
+ * Services/Project/DefaultProjectService.cs:
+ * Services/Project/IProjectService.cs:
+ * Internal/Codons/LanguageBinding/ILanguageBinding.cs:
+ * Internal/Project/Project/IncludeFilesDialog.cs:
+ * Internal/Project/Combine/Combine.cs:
+ * Internal/Project/Combine/CombineEntry.cs:
+
+ Commit basically sets up the skeleton for the GenerateMakefiles stuff.
+ Right now all the real code is in the LanguageBinding, where it
+ should be (I think). Anyone looking to add this functionality to their
+ LanguageBinding is welcome too, however the api and setup may change
+ while the C# implementation is being written, so there are no
+ promises at all.
+
+
+2004-04-27 Todd Berman <tberman at sevenl.net>
+
* Gui/Pads/HelpBrowser/MonodocTreePad.cs: Select the content window
when you render new docs.
Modified: trunk/MonoDevelop/src/Main/Base/Commands/RunCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/RunCommands.cs 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/Main/Base/Commands/RunCommands.cs 2004-04-28 07:15:10 UTC (rev 1533)
@@ -324,4 +324,15 @@
}
}
}
+
+ public class GenerateMakefiles : AbstractMenuCommand {
+
+ public override void Run ()
+ {
+ IProjectService projectservice = (IProjectService)ServiceManager.Services.GetService (typeof (IProjectService));
+ if (projectservice.CurrentOpenCombine != null) {
+ projectservice.GenerateMakefiles ();
+ }
+ }
+ }
}
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs 2004-04-28 07:15:10 UTC (rev 1533)
@@ -55,6 +55,8 @@
ICompilerResult CompileProject(IProject project);
ICompilerResult RecompileProject(IProject project);
+
+ void GenerateMakefile (IProject project);
/// <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-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs 2004-04-28 07:15:10 UTC (rev 1533)
@@ -513,7 +513,7 @@
allProjects = TopologicalSort(allProjects);
} catch (CyclicBuildOrderException) {
IMessageService messageService =(IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
- messageService.ShowError(GettextCatalog.GetString ("Cyclic dependencies can not be build with this version.\nBut we are working on it."));
+ messageService.ShowError(GettextCatalog.GetString ("Cyclic dependencies can not be built with this version.\nBut we are working on it."));
return;
}
TaskService taskService = (TaskService)MonoDevelop.Core.Services.ServiceManager.Services.GetService(typeof(TaskService));
@@ -524,6 +524,16 @@
}
}
}
+
+ public void GenerateMakefiles ()
+ {
+ foreach (CombineEntry entry in entries) {
+ if (entry is ProjectCombineEntry)
+ entry.GenerateMakefiles ();
+ else
+ Console.WriteLine ("Dont know how to generate makefiles for " + entry);
+ }
+ }
protected virtual void OnStartupPropertyChanged(EventArgs e)
{
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs 2004-04-28 07:15:10 UTC (rev 1533)
@@ -67,6 +67,7 @@
public abstract void Execute();
public abstract void Save();
public abstract void Debug ();
+ public abstract void GenerateMakefiles ();
}
public class ProjectCombineEntry : CombineEntry
@@ -210,6 +211,14 @@
{
project.SaveProject(Filename);
}
+
+ public override void GenerateMakefiles ()
+ {
+ Console.WriteLine ("Generating makefiles for " + Name);
+ LanguageBindingService languageBindingService = (LanguageBindingService)ServiceManager.Services.GetService(typeof(LanguageBindingService));
+ ILanguageBinding langBinding = languageBindingService.GetBindingPerLanguageName(project.ProjectType);
+ langBinding.GenerateMakefile (project);
+ }
}
public class CombineCombineEntry : CombineEntry
@@ -252,5 +261,9 @@
{
combine.Debug ();
}
+
+ public override void GenerateMakefiles ()
+ {
+ }
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/IncludeFilesDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/IncludeFilesDialog.cs 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Project/IncludeFilesDialog.cs 2004-04-28 07:15:10 UTC (rev 1533)
@@ -53,7 +53,7 @@
// set up dialog title
StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
- this.IncludeFilesDialogWidget.Title = String.Format (GettextCatalog.GetString ("Found new files in {0}"), project.Name);
+ this.IncludeFilesDialogWidget.Title = String.Format (GettextCatalog.GetString ("Found new files in {0}"), project.Name);
newFilesOnlyRadioButton.Active = true;
this.newFiles = newFiles;
Modified: trunk/MonoDevelop/src/Main/Base/Services/Project/DefaultProjectService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/Project/DefaultProjectService.cs 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/Main/Base/Services/Project/DefaultProjectService.cs 2004-04-28 07:15:10 UTC (rev 1533)
@@ -725,6 +725,11 @@
return String.Empty;
}
+
+ public void GenerateMakefiles ()
+ {
+ openCombine.GenerateMakefiles ();
+ }
public event FileEventHandler FileRemovedFromProject;
public event EventHandler StartBuild;
Modified: trunk/MonoDevelop/src/Main/Base/Services/Project/IProjectService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/Project/IProjectService.cs 2004-04-28 06:53:14 UTC (rev 1532)
+++ trunk/MonoDevelop/src/Main/Base/Services/Project/IProjectService.cs 2004-04-28 07:15:10 UTC (rev 1533)
@@ -181,6 +181,8 @@
/// Removes a file from it's project(s)
/// </remarks>
void RemoveFileFromProject(string fileName);
+
+ void GenerateMakefiles ();
/// <remarks>
/// Is called, when a file is removed from a project.
More information about the Monodevelop-patches-list
mailing list