summaryrefslogtreecommitdiffstats
path: root/tools/gn/filesystem_utils.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-28 22:39:26 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-28 22:39:26 +0000
commita3372c7d55fb9912b6e062e417473b8df7e495ae (patch)
tree7ba4735e34ceadf6418581ee5e98e69d09b89f80 /tools/gn/filesystem_utils.h
parent3698670d663a2d8fceccf2ace4d501a409f7091f (diff)
downloadchromium_src-a3372c7d55fb9912b6e062e417473b8df7e495ae.zip
chromium_src-a3372c7d55fb9912b6e062e417473b8df7e495ae.tar.gz
chromium_src-a3372c7d55fb9912b6e062e417473b8df7e495ae.tar.bz2
Add more phony rules to GN build.
For a target //foo/bar:bar this adds the additional phony rules: "foo/bar:bar" and "foo/bar" to build.ninja. This is on top of the phony rules "bar" which will exist for all targets with a unique name "bar". This allows one to disambiguate targets with different paths but the same short name. R=scottmg@chromium.org Review URL: https://codereview.chromium.org/247663006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266680 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/filesystem_utils.h')
-rw-r--r--tools/gn/filesystem_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gn/filesystem_utils.h b/tools/gn/filesystem_utils.h
index a6bb0fe..cb5fbfd 100644
--- a/tools/gn/filesystem_utils.h
+++ b/tools/gn/filesystem_utils.h
@@ -92,6 +92,10 @@ bool EndsWithSlash(const std::string& s);
// input pointer must outlive the output.
base::StringPiece FindDir(const std::string* path);
+// Returns the substring identifying the last component of the dir, or the
+// empty substring if none. For example "//foo/bar/" -> "bar".
+base::StringPiece FindLastDirComponent(const SourceDir& dir);
+
// Verifies that the given string references a file inside of the given
// directory. This is pretty stupid and doesn't handle "." and "..", etc.,
// it is designed for a sanity check to keep people from writing output files