summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/include/Slice/Preprocessor.h1
-rw-r--r--cpp/src/Slice/Preprocessor.cpp6
2 files changed, 4 insertions, 3 deletions
diff --git a/cpp/include/Slice/Preprocessor.h b/cpp/include/Slice/Preprocessor.h
index 23458bccfbb..1f6333cc8c5 100644
--- a/cpp/include/Slice/Preprocessor.h
+++ b/cpp/include/Slice/Preprocessor.h
@@ -53,6 +53,7 @@ private:
const std::string _path;
const std::string _fileName;
+ const std::string _shortFileName;
const std::vector<std::string> _args;
#ifdef _WIN32
std::wstring _cppFile;
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp
index c4ec27452e3..b5c8e7c19c4 100644
--- a/cpp/src/Slice/Preprocessor.cpp
+++ b/cpp/src/Slice/Preprocessor.cpp
@@ -47,6 +47,7 @@ extern "C" char* mcpp_get_mem_buffer(Outdest od);
Slice::Preprocessor::Preprocessor(const string& path, const string& fileName, const vector<string>& args) :
_path(path),
_fileName(fullPath(fileName)),
+ _shortFileName(fileName),
_args(args),
_cppHandle(0)
{
@@ -348,7 +349,6 @@ Slice::Preprocessor::printMakefileDependencies(Language lang, const vector<strin
{
fullIncludePaths.push_back(fullPath(*p));
}
- string absoluteFileName = fullPath(_fileName);
//
// Process each dependency.
@@ -360,9 +360,9 @@ Slice::Preprocessor::printMakefileDependencies(Language lang, const vector<strin
string file = IceUtilInternal::trim(unprocessed.substr(pos, end - pos));
if(IceUtilInternal::isAbsolutePath(file))
{
- if(file == absoluteFileName)
+ if(file == _fileName)
{
- file = _fileName;
+ file = _shortFileName;
}
else
{