Author: ankit
Date: 2007-05-29 06:25:13 -0400 (Tue, 29 May 2007)
New Revision: 78106
Modified:
trunk/monodevelop/Extras/MonoDevelop.Autotools/AutotoolsContext.cs
trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog
trunk/monodevelop/Extras/MonoDevelop.Autotools/SimpleProjectMakefileHandler.cs
Log:
* SimpleProjectMakefileHandler.cs (Deploy): Enumerate solution level
configs, and use the corresponding project config for emitting Makefile.am
(GetProjectConfig): New.
* AutotoolsContext.cs (EscapeStringForAutoconf): Escape '|' .
Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/AutotoolsContext.cs
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/AutotoolsContext.cs
2007-05-29 09:47:14 UTC (rev 78105)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/AutotoolsContext.cs
2007-05-29 10:25:13 UTC (rev 78106)
@@ -248,7 +248,7 @@
foreach (char c in str)
{
if ( char.IsLetterOrDigit (c) || (c == '.' &&
allowPeriods) ) sb.Append ( c );
- else if (c == '-' || c == '_' || c == ' ' || (c
== '.' && !allowPeriods) ) sb.Append ( '_' );
+ else if (c == '-' || c == '_' || c == ' ' || c
== '|' || (c == '.' && !allowPeriods) ) sb.Append ( '_' );
}
return sb.ToString ();
}
Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog 2007-05-29
09:47:14 UTC (rev 78105)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog 2007-05-29
10:25:13 UTC (rev 78106)
@@ -1,3 +1,10 @@
+2007-05-29 Ankit Jain <[EMAIL PROTECTED]>
+
+ * SimpleProjectMakefileHandler.cs (Deploy): Enumerate solution level
+ configs, and use the corresponding project config for emitting
Makefile.am
+ (GetProjectConfig): New.
+ * AutotoolsContext.cs (EscapeStringForAutoconf): Escape '|' .
+
2007-05-28 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Autotools.mdp,
Modified:
trunk/monodevelop/Extras/MonoDevelop.Autotools/SimpleProjectMakefileHandler.cs
===================================================================
---
trunk/monodevelop/Extras/MonoDevelop.Autotools/SimpleProjectMakefileHandler.cs
2007-05-29 09:47:14 UTC (rev 78105)
+++
trunk/monodevelop/Extras/MonoDevelop.Autotools/SimpleProjectMakefileHandler.cs
2007-05-29 10:25:13 UTC (rev 78106)
@@ -267,11 +267,13 @@
// handle configuration specific variables
StringBuilder conf_vars = new StringBuilder ();
- foreach ( DotNetProjectConfiguration config in
project.Configurations )
+ foreach (CombineConfiguration combineConfig in
project.RootCombine.Configurations)
{
- if ( !ctx.IsSupportedConfiguration (
config.Name ) ) continue;
-
- conf_vars.AppendFormat ("if
ENABLE_{0}\n", ctx.EscapeAndUpperConfigName (config.Name));
+ DotNetProjectConfiguration config =
GetProjectConfig (combineConfig, project) as DotNetProjectConfiguration;
+ if (config == null)
+ continue;
+
+ conf_vars.AppendFormat ("if
ENABLE_{0}\n", ctx.EscapeAndUpperConfigName (combineConfig.Name));
string assembly = (PlatformID.Unix ==
Environment.OSVersion.Platform) ? project.GetRelativeChildPath (
config.CompiledOutputName ) : project.GetRelativeChildPath (
config.CompiledOutputName ).Replace("\\","/");
conf_vars.AppendFormat
("ASSEMBLY_COMPILER_COMMAND = {0}\n",
@@ -314,7 +316,7 @@
{
Project refp =
GetProjectFromName ( reference.Reference, project );
-
DotNetProjectConfiguration dnpc = refp.Configurations[config.Name] as
DotNetProjectConfiguration;
+
DotNetProjectConfiguration dnpc = GetProjectConfig (combineConfig, refp) as
DotNetProjectConfiguration;
if ( dnpc == null )
throw new
Exception ( GettextCatalog.GetString
("Could not add reference to project '{0}'", refp.Name) );
@@ -363,7 +365,18 @@
finally { monitor.EndTask (); }
return makefile;
}
-
+
+ // Gets the Project config corresponding to the @combineConfig
for a project (@entry)
+ IConfiguration GetProjectConfig (CombineConfiguration
combineConfig, CombineEntry entry)
+ {
+ foreach (CombineConfigurationEntry cce in
combineConfig.Entries) {
+ if (cce.Entry == entry)
+ return entry.Configurations
[cce.ConfigurationName];
+ }
+
+ return null;
+ }
+
string GetDeployVar (Hashtable hash, string name)
{
name = name.Replace (Path.DirectorySeparatorChar, '_');
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches