OLD | NEW |
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 <map> | 5 #include <map> |
6 #include <set> | 6 #include <set> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 "\n" | 368 "\n" |
369 "Examples (file input)\n" | 369 "Examples (file input)\n" |
370 "\n" | 370 "\n" |
371 " gn refs out/Debug //base/macros.h\n" | 371 " gn refs out/Debug //base/macros.h\n" |
372 " Print target(s) listing //base/macros.h as a source.\n" | 372 " Print target(s) listing //base/macros.h as a source.\n" |
373 "\n" | 373 "\n" |
374 " gn refs out/Debug //base/macros.h --tree\n" | 374 " gn refs out/Debug //base/macros.h --tree\n" |
375 " Display a reverse dependency tree to get to the given file. This\n" | 375 " Display a reverse dependency tree to get to the given file. This\n" |
376 " will show how dependencies will reference that file.\n" | 376 " will show how dependencies will reference that file.\n" |
377 "\n" | 377 "\n" |
378 " gn refs out/Debug //base/macros.h //base/basictypes.h --all\n" | 378 " gn refs out/Debug //base/macros.h //base/at_exit.h --all\n" |
379 " Display all unique targets with some dependency path to a target\n" | 379 " Display all unique targets with some dependency path to a target\n" |
380 " containing either of the given files as a source.\n" | 380 " containing either of the given files as a source.\n" |
381 "\n" | 381 "\n" |
382 " gn refs out/Debug //base/macros.h --testonly=true --type=executable\n" | 382 " gn refs out/Debug //base/macros.h --testonly=true --type=executable\n" |
383 " --all --as=output\n" | 383 " --all --as=output\n" |
384 " Display the executable file names of all test executables\n" | 384 " Display the executable file names of all test executables\n" |
385 " potentially affected by a change to the given file.\n"; | 385 " potentially affected by a change to the given file.\n"; |
386 | 386 |
387 int RunRefs(const std::vector<std::string>& args) { | 387 int RunRefs(const std::vector<std::string>& args) { |
388 if (args.size() <= 1) { | 388 if (args.size() <= 1) { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 | 481 |
482 // If you ask for the references of a valid target, but that target has | 482 // If you ask for the references of a valid target, but that target has |
483 // nothing referencing it, we'll get here without having printed anything. | 483 // nothing referencing it, we'll get here without having printed anything. |
484 if (!quiet && cnt == 0) | 484 if (!quiet && cnt == 0) |
485 OutputString("Nothing references this.\n", DECORATION_YELLOW); | 485 OutputString("Nothing references this.\n", DECORATION_YELLOW); |
486 | 486 |
487 return 0; | 487 return 0; |
488 } | 488 } |
489 | 489 |
490 } // namespace commands | 490 } // namespace commands |
OLD | NEW |