summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Preprocessor.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-12-09 14:19:16 -0800
committerJose <jose@zeroc.com>2016-12-09 14:19:16 -0800
commit5dc2ad8935ac2ada6266448679524727553ed35e (patch)
treed273dbce532afb7655a90cb75dddc00bf63bb8c3 /cpp/src/Slice/Preprocessor.cpp
parentSkip lines that not end with .ice when processing dependencies (diff)
downloadice-5dc2ad8935ac2ada6266448679524727553ed35e.tar.bz2
ice-5dc2ad8935ac2ada6266448679524727553ed35e.tar.xz
ice-5dc2ad8935ac2ada6266448679524727553ed35e.zip
Extra fixes for dependency processing
Diffstat (limited to 'cpp/src/Slice/Preprocessor.cpp')
-rw-r--r--cpp/src/Slice/Preprocessor.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp
index 7feffe9d1c4..74513f736fb 100644
--- a/cpp/src/Slice/Preprocessor.cpp
+++ b/cpp/src/Slice/Preprocessor.cpp
@@ -365,12 +365,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");
}
//
@@ -387,10 +387,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));
@@ -399,7 +397,6 @@ Slice::Preprocessor::printMakefileDependencies(ostream& out, Language lang, cons
//
// Process each dependency.
//
-
string sourceFile;
vector<string> dependencies;