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

Side by Side Diff: tools/gn/command_desc.cc

Issue 334333005: Add directory extraction to GN path handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to new file template function Created 6 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
« no previous file with comments | « no previous file | tools/gn/file_template.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 4
5 #include <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "tools/gn/commands.h" 10 #include "tools/gn/commands.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // Display the pattern. 269 // Display the pattern.
270 OutputString(" Output pattern:\n"); 270 OutputString(" Output pattern:\n");
271 PrintFileList(target->action_values().outputs(), "", true, false); 271 PrintFileList(target->action_values().outputs(), "", true, false);
272 272
273 // Now display what that resolves to given the sources. 273 // Now display what that resolves to given the sources.
274 OutputString("\n Resolved output file list:\n"); 274 OutputString("\n Resolved output file list:\n");
275 275
276 std::vector<std::string> output_strings; 276 std::vector<std::string> output_strings;
277 FileTemplate file_template = FileTemplate::GetForTargetOutputs(target); 277 FileTemplate file_template = FileTemplate::GetForTargetOutputs(target);
278 for (size_t i = 0; i < target->sources().size(); i++) 278 for (size_t i = 0; i < target->sources().size(); i++)
279 file_template.ApplyString(target->sources()[i].value(), &output_strings); 279 file_template.Apply(target->sources()[i], &output_strings);
280 280
281 std::sort(output_strings.begin(), output_strings.end()); 281 std::sort(output_strings.begin(), output_strings.end());
282 for (size_t i = 0; i < output_strings.size(); i++) { 282 for (size_t i = 0; i < output_strings.size(); i++) {
283 OutputString(" " + output_strings[i] + "\n"); 283 OutputString(" " + output_strings[i] + "\n");
284 } 284 }
285 } 285 }
286 } 286 }
287 287
288 void PrintScript(const Target* target, bool display_header) { 288 void PrintScript(const Target* target, bool display_header) {
289 if (display_header) 289 if (display_header)
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 // so always display them, even for groups and such. 593 // so always display them, even for groups and such.
594 PrintLibs(target, true); 594 PrintLibs(target, true);
595 PrintLibDirs(target, true); 595 PrintLibDirs(target, true);
596 596
597 PrintDeps(target, true); 597 PrintDeps(target, true);
598 598
599 return 0; 599 return 0;
600 } 600 }
601 601
602 } // namespace commands 602 } // namespace commands
OLDNEW
« no previous file with comments | « no previous file | tools/gn/file_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698