diff options
author | Evan Martin <martine@danga.com> | 2010-12-20 00:03:55 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2010-12-20 00:03:55 (GMT) |
commit | 4ec6e5337ae6d7dc5f69e6407b488faf23439193 (patch) | |
tree | cb468cb1006fd361282a7a95d5faf83a05bbf8a6 /src/parsers.cc | |
parent | 6f2a2ce9760cfab7ce570104892688385347d102 (diff) | |
download | Ninja-4ec6e5337ae6d7dc5f69e6407b488faf23439193.zip Ninja-4ec6e5337ae6d7dc5f69e6407b488faf23439193.tar.gz Ninja-4ec6e5337ae6d7dc5f69e6407b488faf23439193.tar.bz2 |
restore gyp root hack
Diffstat (limited to 'src/parsers.cc')
-rw-r--r-- | src/parsers.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/parsers.cc b/src/parsers.cc index af5446e..8408195 100644 --- a/src/parsers.cc +++ b/src/parsers.cc @@ -256,6 +256,15 @@ bool ManifestParser::Parse(const string& input, string* err) { string name, value; if (!ParseLet(&name, &value, err)) return false; + if (value.substr(0, 9) == "ROOT_HACK") { + // XXX remove this hack, or make it more principled. + char cwd[1024]; + if (!getcwd(cwd, sizeof(cwd))) { + perror("getcwd"); + return 1; + } + value = cwd + value.substr(9); + } env_->AddBinding(name, value); break; } |