diff options
author | Evan Martin <martine@danga.com> | 2012-12-29 21:36:00 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-12-29 21:47:41 (GMT) |
commit | 2c953d1501de5195e2485185fa24a2ebfd76bbb5 (patch) | |
tree | 2fc88e378a6df571bb125d282b14475f2b9ba05c /src/msvc_helper_main-win32.cc | |
parent | 7096bf1507f98be981aa14ffd9ed5a4a8b1c1494 (diff) | |
parent | 3249938cdf574058a066436aea06b0541ded6958 (diff) | |
download | Ninja-2c953d1501de5195e2485185fa24a2ebfd76bbb5.zip Ninja-2c953d1501de5195e2485185fa24a2ebfd76bbb5.tar.gz Ninja-2c953d1501de5195e2485185fa24a2ebfd76bbb5.tar.bz2 |
version 1.1.0v1.1.0
Diffstat (limited to 'src/msvc_helper_main-win32.cc')
-rw-r--r-- | src/msvc_helper_main-win32.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/msvc_helper_main-win32.cc b/src/msvc_helper_main-win32.cc index 0c8db37..152450e 100644 --- a/src/msvc_helper_main-win32.cc +++ b/src/msvc_helper_main-win32.cc @@ -14,6 +14,7 @@ #include "msvc_helper.h" +#include <stdio.h> #include <windows.h> #include "util.h" @@ -27,7 +28,6 @@ void Usage() { "usage: ninja -t msvc [options] -- cl.exe /showIncludes /otherArgs\n" "options:\n" " -e ENVFILE load environment block from ENVFILE as environment\n" -" -r BASE normalize paths and make relative to BASE before output\n" " -o FILE write output dependency information to FILE.d\n" ); } @@ -48,7 +48,6 @@ void PushPathIntoEnvironment(const string& env_block) { int MSVCHelperMain(int argc, char** argv) { const char* output_filename = NULL; - const char* relative_to = NULL; const char* envfile = NULL; const option kLongOptions[] = { @@ -56,7 +55,7 @@ int MSVCHelperMain(int argc, char** argv) { { NULL, 0, NULL, 0 } }; int opt; - while ((opt = getopt_long(argc, argv, "e:o:r:h", kLongOptions, NULL)) != -1) { + while ((opt = getopt_long(argc, argv, "e:o:h", kLongOptions, NULL)) != -1) { switch (opt) { case 'e': envfile = optarg; @@ -64,9 +63,6 @@ int MSVCHelperMain(int argc, char** argv) { case 'o': output_filename = optarg; break; - case 'r': - relative_to = optarg; - break; case 'h': default: Usage(); @@ -105,8 +101,8 @@ int MSVCHelperMain(int argc, char** argv) { Fatal("opening %s: %s", depfile.c_str(), GetLastErrorString().c_str()); } fprintf(output, "%s: ", output_filename); - for (vector<string>::iterator i = cl.includes_.begin(); - i != cl.includes_.end(); ++i) { + vector<string> headers = cl.GetEscapedResult(); + for (vector<string>::iterator i = headers.begin(); i != headers.end(); ++i) { fprintf(output, "%s\n", i->c_str()); } fclose(output); |