diff options
author | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2010-12-13 03:32:10 (GMT) |
---|---|---|
committer | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2010-12-13 03:32:10 (GMT) |
commit | 8d28a92eda3b5ab03552f6cf6b1cdce27445fb3e (patch) | |
tree | ceb969445325b2d126f17061523ab284d0b81612 /PCbuild | |
parent | 3c54ea6abae67e776d8c29921b1790dd50644c20 (diff) | |
download | cpython-8d28a92eda3b5ab03552f6cf6b1cdce27445fb3e.zip cpython-8d28a92eda3b5ab03552f6cf6b1cdce27445fb3e.tar.gz cpython-8d28a92eda3b5ab03552f6cf6b1cdce27445fb3e.tar.bz2 |
issue 10683
When the solution is converted to Visual Studio 2010, the command line to invoke make_buildinfo changes from:
$(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)\"
to
$(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)"
If the final backslash is omitted, the backslash in IntDir will escape the quote, thus passing the quote in as part of the path name.
This solution is a hack-fix to that problem by skipping any trailing quote from the path name. It works as long as we don't need any additional arguments to make_buildinfo.exe. This will help all those sould that are going to run this project through the visual studio autoconverter and get the same error.
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/make_buildinfo.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/PCbuild/make_buildinfo.c b/PCbuild/make_buildinfo.c index 94ca8c0..fd3a2e2 100644 --- a/PCbuild/make_buildinfo.c +++ b/PCbuild/make_buildinfo.c @@ -91,6 +91,17 @@ int main(int argc, char*argv[]) if (argc > 2) { tmpdir = argv[2]; strcat_s(tmppath, _countof(tmppath), tmpdir); + /* Hack fix for bad command line: If the command is issued like this: + * $(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)" + * we will get a trailing quote because IntDir ends with a backslash that then + * escapes the final ". To simplify the life for developers, catch that problem + * here by cutting it off. + * The proper command line, btw is: + * $(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)\" + * Hooray for command line parsing on windows. + */ + if (strlen(tmppath) > 0 && tmppath[strlen(tmppath)-1] == '"') + tmppath[strlen(tmppath)-1] = '\0'; strcat_s(tmppath, _countof(tmppath), "\\"); } |