GN: Change gen command syntax, support relative dirs.

This removes the default "gen" command so that "gn" by itself does nothing (it prints a short help message).

The "gen" command now takes as an argument the output directory to use, and I removed the --output flag except for the "gyp" command (which will be needed until we update gyp_chromium).

Updates the base build file to keep in sync with recent changes.

True relative directories are now supported, so that the directories given to the gen command can be relative to the current one. It also supports relative directories for the desc and refs command. This allows you to be in the base directory and say "gn desc :base" and it will resolve the ":base" label relative to the current directory in the source tree.

R=dpranke@chromium.org

Review URL: https://codereview.chromium.org/165823003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252040 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: a623db18763a774cabe12e3bf96a15ec26370c5e
diff --git a/base/files/file_path.h b/base/files/file_path.h
index f4b8ff8..734c402 100644
--- a/base/files/file_path.h
+++ b/base/files/file_path.h
@@ -189,6 +189,13 @@
   // Returns a vector of all of the components of the provided path. It is
   // equivalent to calling DirName().value() on the path's root component,
   // and BaseName().value() on each child component.
+  //
+  // To make sure this is lossless so we can differentiate absolute and
+  // relative paths, the root slash will be included even though no other
+  // slashes will be. The precise behavior is:
+  //
+  // Posix:  "/foo/bar"  ->  [ "/", "foo", "bar" ]
+  // Windows:  "C:\foo\bar"  ->  [ "C:", "\\", "foo", "bar" ]
   void GetComponents(std::vector<FilePath::StringType>* components) const;
 
   // Returns true if this FilePath is a strict parent of the |child|. Absolute