~ubuntu-branches/ubuntu/wily/monodevelop/wily

« back to all changes in this revision

Viewing changes to src/addins/CBinding/Parser/TagDatabaseManager.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-02-02 11:39:59 UTC
  • mfrom: (10.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100202113959-n3u848nfj35yyd03
Tags: 2.2.1+dfsg-1
* New upstream release
* debian/control:
  + Standards version 3.8.4 (no changes needed)
* debian/patches/remove_support_for_non_debian_functionality.patch,
  debian/patches/remove_support_for_soft_debugger.patch,
  debian/patches/remove_support_for_moonlight.patch,
  debian/rules:
  + Split patch into two pieces, to make it easier to enable either
    SDB or Moonlight support with a rebuild
* debian/monodevelop-moonlight.install,
  debian/monodevelop-debugger-sdb.install,
  debian/control:
  + Create packaging data for the Soft Debugger addin and Moonlight addin -
    and comment them out of debian/control as we can't provide them on
    Debian for now

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
                
115
115
                private string[] Headers (Project project, string filename, bool with_system)
116
116
                {
117
 
                        string option = (with_system ? "-M" : "-MM");
 
117
                        List<string> headers = new List<string> ();
 
118
                        CProject cproject = project as CProject;
 
119
                        if (cproject == null){ return headers.ToArray(); }
 
120
                        
118
121
                        StringBuilder output = new StringBuilder ();
 
122
                        StringBuilder option = new StringBuilder ("-M");
 
123
                        if (!with_system) {
 
124
                                option.Append("M");
 
125
                        }
 
126
                        
 
127
                        option.Append (" -MG ");
 
128
                        foreach (Package package in cproject.Packages) {
 
129
                                package.ParsePackage ();
 
130
                                option.AppendFormat ("{0} ", string.Join(" ", package.CFlags.ToArray ()));
 
131
                        }
119
132
                        
120
133
                        ProcessWrapper p = null;
121
134
                        try {
122
 
                                p = Runtime.ProcessService.StartProcess ("gcc", option + " -MG " + filename.Replace(@"\ ", " ").Replace(" ", @"\ "), null, null);
 
135
                                p = Runtime.ProcessService.StartProcess ("gcc", option.ToString () + filename.Replace(@"\ ", " ").Replace(" ", @"\ "), null, null);
123
136
                                p.WaitForOutput ();
124
137
 
125
138
                                // Doing the below completely breaks header parsing
138
151
                                if(p != null)
139
152
                                        p.Dispose();
140
153
                        }
141
 
 
142
 
                        List<string> headers = new List<string> ();
 
154
                        
143
155
                        MatchCollection files = Regex.Matches(output.ToString().Replace(@" \", String.Empty), @" (?<file>([^ \\]|(\\ ))+)", RegexOptions.IgnoreCase);
144
156
 
145
157
                        foreach (Match match in files) {