diff options
author | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2011-06-15 16:11:55 +0400 |
---|---|---|
committer | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2011-06-15 19:11:13 +0400 |
commit | 965d0768d31bd63af0b64520c6c2472570f9722c (patch) | |
tree | 18f3382ca830e82c00c62e7d6a64f7e9f602b75d /main/src/addins/MonoDevelop.Autotools | |
parent | e5dc0da53f07ab8376bca67c5255897f871c2195 (diff) |
[Autotools] Don't destroy unresolved refs
Diffstat (limited to 'main/src/addins/MonoDevelop.Autotools')
-rw-r--r-- | main/src/addins/MonoDevelop.Autotools/MakefileData.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/main/src/addins/MonoDevelop.Autotools/MakefileData.cs b/main/src/addins/MonoDevelop.Autotools/MakefileData.cs index ccd1516f4f..0e776bf98e 100644 --- a/main/src/addins/MonoDevelop.Autotools/MakefileData.cs +++ b/main/src/addins/MonoDevelop.Autotools/MakefileData.cs @@ -782,9 +782,12 @@ namespace MonoDevelop.Autotools //Required when UpdateProject gets called by ui if (ownerProject.ParentSolution != null) ResolveProjectReferences (ownerProject.ParentSolution.RootFolder, monitor); - - foreach (ProjectReference pr in existingGacRefs.Values) - dotnetProject.References.Remove (pr); + + //only remove unmatched existing refs if everything resolved without errors + if (SaveReferences) { + foreach (ProjectReference pr in existingGacRefs.Values) + dotnetProject.References.Remove (pr); + } existingGacRefs.Clear (); newGacRefs.Clear (); @@ -1000,6 +1003,7 @@ namespace MonoDevelop.Autotools LoggingService.LogWarning ("Package named '{0}' not found in configure.in. Ignoring reference to '{1}'.", pkgVarName, rname); refVar.Extra.Add (reference); + SaveReferences = false; return; } @@ -1108,6 +1112,8 @@ namespace MonoDevelop.Autotools if (pkg == null) { LoggingService.LogWarning ("No package named '{0}' found. Ignoring.", pkgName); + //don't sync the unresolved refs from the project back to the makefile or things go horribly wrong + SaveReferences = false; return false; } |