Author: lluis
Date: 2007-02-06 21:43:20 -0500 (Tue, 06 Feb 2007)
New Revision: 72399
Modified:
trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog
trunk/monodevelop/Extras/MonoDevelop.Autotools/MakefileData.cs
Log:
* MakefileData.cs: Write the resource id to the makefile only when
really necessary.
Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog 2007-02-07
02:42:41 UTC (rev 72398)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog 2007-02-07
02:43:20 UTC (rev 72399)
@@ -1,3 +1,8 @@
+2007-02-07 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * MakefileData.cs: Write the resource id to the makefile only when
+ really necessary.
+
2007-02-07 Ankit Jain <[EMAIL PROTECTED]>
* MakefileProjectServiceExtension.cs (ParseOutput): Add a 'baseDir'
Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/MakefileData.cs
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/MakefileData.cs
2007-02-07 02:42:41 UTC (rev 72398)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/MakefileData.cs
2007-02-07 02:43:20 UTC (rev 72399)
@@ -352,7 +352,6 @@
}
bool dirty = false;
- bool emitResourceId = true;
public object Clone ()
{
@@ -470,8 +469,6 @@
ReadFiles (BuildFilesVar, BuildAction.Compile, "Build",
promptForRemoval);
ReadFiles (DeployFilesVar, BuildAction.FileCopy,
"Deploy", promptForRemoval);
ReadFiles (OthersVar, BuildAction.Nothing, "Others",
promptForRemoval);
-
- emitResourceId = false;
ReadFiles (ResourcesVar, BuildAction.EmbedAsResource,
"Resources", promptForRemoval);
if (!SyncReferences)
@@ -589,12 +586,8 @@
if (buildAction ==
BuildAction.EmbedAsResource && fname.IndexOf (',') >= 0) {
string [] tmp = fname.Split
(new char [] {','}, 2);
fname = tmp [0];
- if (tmp.Length > 1) {
+ if (tmp.Length > 1)
resourceId = tmp [1];
- // Emit resourceId if
atleast one of the resources
- // specifies it
- emitResourceId = true;
- }
}
if ((fname.Length > 2 && fname [0] ==
'$' && fname [1] == '(') && !UseAutotools) {
@@ -1050,8 +1043,8 @@
else
str = EncodeFileName (str,
"srcdir", false);
- if (pf.BuildAction ==
BuildAction.EmbedAsResource && emitResourceId)
- //FIXME: When to write resource
ids?
+ // Emit the resource ID only when it is
different from the file name
+ if (pf.BuildAction ==
BuildAction.EmbedAsResource && pf.ResourceId != null && pf.ResourceId.Length >
0 && pf.ResourceId != Path.GetFileName (str))
str = String.Format
("{0}{1},{2}", fileVar.Prefix, str, pf.ResourceId);
else
str = String.Format ("{0}{1}",
fileVar.Prefix, str);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches