projects
/
platform
/
upstream
/
ninja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f2a2ce
)
restore gyp root hack
author
Evan Martin
<martine@danga.com>
Mon, 20 Dec 2010 00:03:55 +0000
(16:03 -0800)
committer
Evan Martin
<martine@danga.com>
Mon, 20 Dec 2010 00:03:55 +0000
(16:03 -0800)
src/parsers.cc
patch
|
blob
|
history
diff --git
a/src/parsers.cc
b/src/parsers.cc
index
af5446e
..
8408195
100644
(file)
--- 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;
}