Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: visual_studio/NativeClientVSAddIn/NaCl.Build.CPPTasks/DependencyParser.cs

Issue 16096014: [NaCl Addin] Fix dependencies in visual studio (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 using System; 4 using System;
5 using System.Collections.Generic; 5 using System.Collections.Generic;
6 using System.Linq; 6 using System.Linq;
7 using System.Text; 7 using System.Text;
8 8
9 using System.IO; 9 using System.IO;
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 break; 53 break;
54 ParseLine(str); 54 ParseLine(str);
55 } 55 }
56 reader.Close(); 56 reader.Close();
57 } 57 }
58 58
59 private void AddDependency(string filename) 59 private void AddDependency(string filename)
60 { 60 {
61 filename = GCCUtilities.ConvertPathPosixToWindows(filename); 61 filename = GCCUtilities.ConvertPathPosixToWindows(filename);
62 filename = filename.Replace("\\ ", " "); 62 filename = filename.Replace("\\ ", " ");
63 filename = filename.ToUpperInvariant();
64 filename = Path.GetFullPath(filename);
63 m_dependencies.Add(filename); 65 m_dependencies.Add(filename);
64 } 66 }
65 67
66 /// <summary> 68 /// <summary>
67 /// Find the end of the current filename on the given line from a depend ancy file. 69 /// Find the end of the current filename on the given line from a depend ancy file.
68 /// Normally this is the space char but, spaces can be escaped with back slash and 70 /// Normally this is the space char but, spaces can be escaped with back slash and
69 /// end of string could also terminate the filename. 71 /// end of string could also terminate the filename.
70 /// </summary> 72 /// </summary>
71 private static int FindEndOfFilename(string line) 73 private static int FindEndOfFilename(string line)
72 { 74 {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 { 122 {
121 int end = FindEndOfFilename(line); 123 int end = FindEndOfFilename(line);
122 AddDependency(line.Substring(0, end)); 124 AddDependency(line.Substring(0, end));
123 if (end == line.Length) 125 if (end == line.Length)
124 break; 126 break;
125 line = line.Substring(end + 1).Trim(); 127 line = line.Substring(end + 1).Trim();
126 } 128 }
127 } 129 }
128 } 130 }
129 } 131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698