diff options
-rw-r--r-- | CHANGELOG-3.6.md | 4 | ||||
-rw-r--r-- | cpp/src/Slice/Preprocessor.cpp | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/CHANGELOG-3.6.md b/CHANGELOG-3.6.md index 7f00d2063b2..b1c13af3189 100644 --- a/CHANGELOG-3.6.md +++ b/CHANGELOG-3.6.md @@ -47,6 +47,10 @@ These are the changes since Ice 3.6.4. would fail if the service used the IceBox shared communicator. Thanks to Andreas Sommer for the bug report and fix. +- Fixed a bug in Slice compilers which generates bogus dependencies when the + Slice files are located in a directory that contains the string ".ice" in + the path. + # Changes in Ice 3.6.3 These are the changes since Ice 3.6.2. diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index 13a2a5cc4c8..83b574b5a5b 100644 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -368,10 +368,11 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons // First make it a single line. // string::size_type pos; - while((pos = unprocessed.find("\\\n")) != string::npos) + while((pos = unprocessed.find("\\")) != string::npos) { - unprocessed.replace(pos, 2, ""); + unprocessed.replace(pos, 1, ""); } + pos = unprocessed.find("\n", pos) + 1; // // Get the main output file name. @@ -403,9 +404,9 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons vector<string> dependencies; string::size_type end; - while((end = unprocessed.find(".ice", pos)) != string::npos) + while((end = unprocessed.find("\n", pos)) != string::npos) { - end += 4; + end += 1; string file = IceUtilInternal::trim(unprocessed.substr(pos, end - pos)); if(IceUtilInternal::isAbsolutePath(file)) { |