summaryrefslogtreecommitdiff
path: root/cpp/src/Slice
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-12-09 09:51:28 -0800
committerJose <jose@zeroc.com>2016-12-09 09:51:28 -0800
commitbee19ea19c2b6e25045f918cfde1fbccb34eb231 (patch)
treead5b2ee640a1cd58b69774bfbf004a90354cd58f /cpp/src/Slice
parentFixed ICE-7463 - icehashpassword now uses hash method instead of encrypt when... (diff)
downloadice-bee19ea19c2b6e25045f918cfde1fbccb34eb231.tar.bz2
ice-bee19ea19c2b6e25045f918cfde1fbccb34eb231.tar.xz
ice-bee19ea19c2b6e25045f918cfde1fbccb34eb231.zip
Fixed (ICE-7464) - bogus dependencies generated with Slice compilers
Diffstat (limited to 'cpp/src/Slice')
-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))
{