diff options
author | Evan Martin <martine@danga.com> | 2011-05-13 15:53:02 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-05-13 23:28:07 (GMT) |
commit | 1c80bd1691f69332a8fec42080c1c341c0e2fa44 (patch) | |
tree | fd73c9d72997316fdc7b02f08ba6820784d790af /src/browse.cc | |
parent | e2543e423499f2d9619941e33276ae1240fb2b91 (diff) | |
download | Ninja-1c80bd1691f69332a8fec42080c1c341c0e2fa44.zip Ninja-1c80bd1691f69332a8fec42080c1c341c0e2fa44.tar.gz Ninja-1c80bd1691f69332a8fec42080c1c341c0e2fa44.tar.bz2 |
make browse work for all ninja paths
Pass the path to the ninja binary in to the Python script.
Confusingly, in some places the variables were already in place
to do this, but they were accidentally used for something else
entirely.
Diffstat (limited to 'src/browse.cc')
-rw-r--r-- | src/browse.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/browse.cc b/src/browse.cc index f65e537..d51bb44 100644 --- a/src/browse.cc +++ b/src/browse.cc @@ -20,7 +20,8 @@ #include "../build/browse_py.h" #include "ninja.h" -void RunBrowsePython(State* state, const char* ninja_command) { +void RunBrowsePython(State* state, const char* ninja_command, + const char* initial_target) { // Fork off a Python process and have it run our code via its stdin. // (Actually the Python process becomes the parent.) int pipefd[2]; @@ -45,7 +46,7 @@ void RunBrowsePython(State* state, const char* ninja_command) { // exec Python, telling it to run the program from stdin. const char* command[] = { - "python", "-", ninja_command, NULL + "python", "-", ninja_command, initial_target, NULL }; execvp(command[0], (char**)command); perror("ninja: execvp"); |