summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/Slice/Preprocessor.cpp9
1 files changed, 5 insertions, 4 deletions
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))
{