diff options
author | Jose <jose@zeroc.com> | 2016-12-09 14:23:10 -0800 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-12-09 14:23:10 -0800 |
commit | 31324b95706adb7e950df4bac05adf74d10bcca2 (patch) | |
tree | ee3ba0a4616a699973984a960524d551758bd75b /cpp | |
parent | Merge remote-tracking branch 'origin/3.6' (diff) | |
parent | Extra fixes for dependency processing (diff) | |
download | ice-31324b95706adb7e950df4bac05adf74d10bcca2.tar.bz2 ice-31324b95706adb7e950df4bac05adf74d10bcca2.tar.xz ice-31324b95706adb7e950df4bac05adf74d10bcca2.zip |
Merge remote-tracking branch 'origin/3.6'
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/Slice/Preprocessor.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index 627d19cb370..912d024ab2e 100644 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -379,12 +379,12 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons // // We now need to massage the result to get the desired output. - // First make it a single line. + // First remove the backslash used to escape new lines. // string::size_type pos; - while((pos = unprocessed.find("\\")) != string::npos) + while((pos = unprocessed.find("\\\n")) != string::npos) { - unprocessed.replace(pos, 1, ""); + unprocessed.replace(pos, 2, "\n"); } // @@ -401,10 +401,8 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons { result = unprocessed.substr(0, pos); } - pos = unprocessed.find("\n", pos) + 1; vector<string> fullIncludePaths; - for(vector<string>::const_iterator p = includePaths.begin(); p != includePaths.end(); ++p) { fullIncludePaths.push_back(fullPath(*p)); @@ -413,7 +411,6 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons // // Process each dependency. // - string sourceFile; vector<string> dependencies; |