BUG: roll back change for variable used in path
This commit is contained in:
parent
c624879fba
commit
5acab1eed1
|
@ -222,17 +222,17 @@ void cmLocalUnixMakefileGenerator::OutputMakefile(const char* file,
|
||||||
for(std::vector<std::string>::const_iterator i = lfiles.begin();
|
for(std::vector<std::string>::const_iterator i = lfiles.begin();
|
||||||
i != lfiles.end(); ++i)
|
i != lfiles.end(); ++i)
|
||||||
{
|
{
|
||||||
fout << " " << this->ConvertToMakefilePath(i->c_str());
|
fout << " " << cmSystemTools::ConvertToOutputPath(i->c_str());
|
||||||
}
|
}
|
||||||
// Add the cache to the list
|
// Add the cache to the list
|
||||||
std::string cacheFile = m_Makefile->GetHomeOutputDirectory();
|
std::string cacheFile = m_Makefile->GetHomeOutputDirectory();
|
||||||
cacheFile += "/CMakeCache.txt";
|
cacheFile += "/CMakeCache.txt";
|
||||||
fout << " " << this->ConvertToMakefilePath(cacheFile.c_str());
|
fout << " " << cmSystemTools::ConvertToOutputPath(cacheFile.c_str());
|
||||||
fout << "\n\n\n";
|
fout << "\n\n\n";
|
||||||
this->OutputMakeVariables(fout);
|
this->OutputMakeVariables(fout);
|
||||||
std::string checkCache = m_Makefile->GetHomeOutputDirectory();
|
std::string checkCache = m_Makefile->GetHomeOutputDirectory();
|
||||||
checkCache += "/cmake.check_cache";
|
checkCache += "/cmake.check_cache";
|
||||||
checkCache = this->ConvertToMakefilePath(checkCache.c_str());
|
checkCache = cmSystemTools::ConvertToOutputPath(checkCache.c_str());
|
||||||
// most unix makes will pass the command line flags to make down
|
// most unix makes will pass the command line flags to make down
|
||||||
// to sub invoked makes via an environment variable. However, some
|
// to sub invoked makes via an environment variable. However, some
|
||||||
// makes do not support that, so you have to pass the flags explicitly
|
// makes do not support that, so you have to pass the flags explicitly
|
||||||
|
@ -445,7 +445,7 @@ void cmLocalUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
|
||||||
std::string path2 = m_LibraryOutputPath;
|
std::string path2 = m_LibraryOutputPath;
|
||||||
path2 += this->GetFullTargetName(l->first.c_str(), l->second);
|
path2 += this->GetFullTargetName(l->first.c_str(), l->second);
|
||||||
path = "... ";
|
path = "... ";
|
||||||
path += this->ConvertToMakefilePath(path2.c_str());
|
path += cmSystemTools::ConvertToOutputPath(path2.c_str());
|
||||||
this->OutputEcho(fout,path.c_str());
|
this->OutputEcho(fout,path.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -490,7 +490,7 @@ void cmLocalUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
|
||||||
path = m_LibraryOutputPath;
|
path = m_LibraryOutputPath;
|
||||||
path += this->GetFullTargetName(l->first.c_str(), l->second);
|
path += this->GetFullTargetName(l->first.c_str(), l->second);
|
||||||
fout << " \\\n"
|
fout << " \\\n"
|
||||||
<< this->ConvertToMakefilePath(path.c_str());
|
<< cmSystemTools::ConvertToOutputPath(path.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -504,7 +504,7 @@ void cmLocalUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
|
||||||
{
|
{
|
||||||
path = m_ExecutableOutputPath;
|
path = m_ExecutableOutputPath;
|
||||||
path += this->GetFullTargetName(l->first.c_str(), l->second);
|
path += this->GetFullTargetName(l->first.c_str(), l->second);
|
||||||
fout << " \\\n" << this->ConvertToMakefilePath(path.c_str());
|
fout << " \\\n" << cmSystemTools::ConvertToOutputPath(path.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// list utilities last
|
// list utilities last
|
||||||
|
@ -537,7 +537,7 @@ void cmLocalUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
|
||||||
if(outExt.size())
|
if(outExt.size())
|
||||||
{
|
{
|
||||||
fout << "\\\n"
|
fout << "\\\n"
|
||||||
<< this->ConvertToMakefilePath((*i)->GetSourceName().c_str())
|
<< cmSystemTools::ConvertToOutputPath((*i)->GetSourceName().c_str())
|
||||||
<< outExt.c_str() << " ";
|
<< outExt.c_str() << " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -553,7 +553,7 @@ void cmLocalUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
|
||||||
std::string outExt(this->GetOutputExtension((*i)->GetSourceExtension().c_str()));
|
std::string outExt(this->GetOutputExtension((*i)->GetSourceExtension().c_str()));
|
||||||
if(outExt.size())
|
if(outExt.size())
|
||||||
{
|
{
|
||||||
fout << "\\\n\"" << this->ConvertToMakefilePath((*i)->GetSourceName().c_str())
|
fout << "\\\n\"" << cmSystemTools::ConvertToOutputPath((*i)->GetSourceName().c_str())
|
||||||
<< outExt.c_str() << "\" ";
|
<< outExt.c_str() << "\" ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -585,7 +585,7 @@ void cmLocalUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
|
||||||
path = m_LibraryOutputPath;
|
path = m_LibraryOutputPath;
|
||||||
path += targetNameSO;
|
path += targetNameSO;
|
||||||
fout << " \\\n"
|
fout << " \\\n"
|
||||||
<< this->ConvertToMakefilePath(path.c_str());
|
<< cmSystemTools::ConvertToOutputPath(path.c_str());
|
||||||
}
|
}
|
||||||
if(targetNameReal != targetName &&
|
if(targetNameReal != targetName &&
|
||||||
targetNameReal != targetNameSO)
|
targetNameReal != targetNameSO)
|
||||||
|
@ -593,7 +593,7 @@ void cmLocalUnixMakefileGenerator::OutputTargetRules(std::ostream& fout)
|
||||||
path = m_LibraryOutputPath;
|
path = m_LibraryOutputPath;
|
||||||
path += targetNameReal;
|
path += targetNameReal;
|
||||||
fout << " \\\n"
|
fout << " \\\n"
|
||||||
<< this->ConvertToMakefilePath(path.c_str());
|
<< cmSystemTools::ConvertToOutputPath(path.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -861,7 +861,7 @@ std::string cmLocalUnixMakefileGenerator::CreatePreBuildRules(
|
||||||
{
|
{
|
||||||
initNext = true;
|
initNext = true;
|
||||||
}
|
}
|
||||||
std::string command = this->ConvertToMakefilePath(cc.GetCommand().c_str());
|
std::string command = cmSystemTools::ConvertToOutputPath(cc.GetCommand().c_str());
|
||||||
customRuleCode += command + " " + cc.GetArguments();
|
customRuleCode += command + " " + cc.GetArguments();
|
||||||
}
|
}
|
||||||
return customRuleCode;
|
return customRuleCode;
|
||||||
|
@ -886,7 +886,7 @@ std::string cmLocalUnixMakefileGenerator::CreatePreLinkRules(
|
||||||
{
|
{
|
||||||
initNext = true;
|
initNext = true;
|
||||||
}
|
}
|
||||||
std::string command = this->ConvertToMakefilePath(cc.GetCommand().c_str());
|
std::string command = cmSystemTools::ConvertToOutputPath(cc.GetCommand().c_str());
|
||||||
customRuleCode += command + " " + cc.GetArguments();
|
customRuleCode += command + " " + cc.GetArguments();
|
||||||
}
|
}
|
||||||
return customRuleCode;
|
return customRuleCode;
|
||||||
|
@ -911,7 +911,7 @@ std::string cmLocalUnixMakefileGenerator::CreatePostBuildRules(
|
||||||
{
|
{
|
||||||
initNext = true;
|
initNext = true;
|
||||||
}
|
}
|
||||||
std::string command = this->ConvertToMakefilePath(cc.GetCommand().c_str());
|
std::string command = cmSystemTools::ConvertToOutputPath(cc.GetCommand().c_str());
|
||||||
customRuleCode += command + " " + cc.GetArguments();
|
customRuleCode += command + " " + cc.GetArguments();
|
||||||
}
|
}
|
||||||
return customRuleCode;
|
return customRuleCode;
|
||||||
|
@ -1065,10 +1065,10 @@ void cmLocalUnixMakefileGenerator::OutputLibraryRule(std::ostream& fout,
|
||||||
std::string targetFullPathSO = m_LibraryOutputPath + targetNameSO;
|
std::string targetFullPathSO = m_LibraryOutputPath + targetNameSO;
|
||||||
std::string targetFullPathReal = m_LibraryOutputPath + targetNameReal;
|
std::string targetFullPathReal = m_LibraryOutputPath + targetNameReal;
|
||||||
std::string targetFullPathBase = m_LibraryOutputPath + targetNameBase;
|
std::string targetFullPathBase = m_LibraryOutputPath + targetNameBase;
|
||||||
targetFullPath = this->ConvertToMakefilePath(targetFullPath.c_str());
|
targetFullPath = cmSystemTools::ConvertToOutputPath(targetFullPath.c_str());
|
||||||
targetFullPathSO = this->ConvertToMakefilePath(targetFullPathSO.c_str());
|
targetFullPathSO = cmSystemTools::ConvertToOutputPath(targetFullPathSO.c_str());
|
||||||
targetFullPathReal = this->ConvertToMakefilePath(targetFullPathReal.c_str());
|
targetFullPathReal = cmSystemTools::ConvertToOutputPath(targetFullPathReal.c_str());
|
||||||
targetFullPathBase = this->ConvertToMakefilePath(targetFullPathBase.c_str());
|
targetFullPathBase = cmSystemTools::ConvertToOutputPath(targetFullPathBase.c_str());
|
||||||
|
|
||||||
// get the objects that are used to link this library
|
// get the objects that are used to link this library
|
||||||
std::string objs = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
|
std::string objs = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
|
||||||
|
@ -1192,7 +1192,7 @@ void cmLocalUnixMakefileGenerator::OutputSharedLibraryRule(std::ostream& fout,
|
||||||
if((*i)->GetSourceExtension() == "def")
|
if((*i)->GetSourceExtension() == "def")
|
||||||
{
|
{
|
||||||
linkFlags += this->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
|
linkFlags += this->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
|
||||||
linkFlags += this->ConvertToMakefilePath((*i)->GetFullPath().c_str());
|
linkFlags += cmSystemTools::ConvertToOutputPath((*i)->GetFullPath().c_str());
|
||||||
linkFlags += " ";
|
linkFlags += " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1296,7 +1296,7 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout,
|
||||||
}
|
}
|
||||||
target += name;
|
target += name;
|
||||||
target += cmSystemTools::GetExecutableExtension();
|
target += cmSystemTools::GetExecutableExtension();
|
||||||
target = this->ConvertToMakefilePath(target.c_str());
|
target = cmSystemTools::ConvertToOutputPath(target.c_str());
|
||||||
|
|
||||||
std::string objs = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
|
std::string objs = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
|
||||||
std::string depend = "$(";
|
std::string depend = "$(";
|
||||||
|
@ -1399,7 +1399,7 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout,
|
||||||
depend = target;
|
depend = target;
|
||||||
target = name;
|
target = name;
|
||||||
target += cmSystemTools::GetExecutableExtension();
|
target += cmSystemTools::GetExecutableExtension();
|
||||||
target = this->ConvertToMakefilePath(target.c_str());
|
target = cmSystemTools::ConvertToOutputPath(target.c_str());
|
||||||
commands.resize(0);
|
commands.resize(0);
|
||||||
this->OutputMakeRule(fout,
|
this->OutputMakeRule(fout,
|
||||||
comment.c_str(),
|
comment.c_str(),
|
||||||
|
@ -1445,7 +1445,7 @@ void cmLocalUnixMakefileGenerator::OutputUtilityRule(std::ostream& fout,
|
||||||
depends += " \\\n";
|
depends += " \\\n";
|
||||||
replaceVars = *d;
|
replaceVars = *d;
|
||||||
m_Makefile->ExpandVariablesInString(replaceVars);
|
m_Makefile->ExpandVariablesInString(replaceVars);
|
||||||
depends += this->ConvertToMakefilePath(replaceVars.c_str());
|
depends += cmSystemTools::ConvertToOutputPath(replaceVars.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this->OutputMakeRule(fout, comment.c_str(), name,
|
this->OutputMakeRule(fout, comment.c_str(), name,
|
||||||
|
@ -1662,7 +1662,7 @@ void cmLocalUnixMakefileGenerator::OutputBuildTargetInDirWindows(std::ostream& f
|
||||||
{
|
{
|
||||||
const char* makeTarget = library;
|
const char* makeTarget = library;
|
||||||
std::string currentDir =
|
std::string currentDir =
|
||||||
this->ConvertToMakefilePath(m_Makefile->GetCurrentOutputDirectory());
|
cmSystemTools::ConvertToOutputPath(m_Makefile->GetCurrentOutputDirectory());
|
||||||
std::string wpath = this->ConvertToOutputForExisting(path);
|
std::string wpath = this->ConvertToOutputForExisting(path);
|
||||||
std::string wfullpath = this->ConvertToOutputForExisting(fullpath);
|
std::string wfullpath = this->ConvertToOutputForExisting(fullpath);
|
||||||
if(libOutPath && strcmp( libOutPath, "" ) != 0)
|
if(libOutPath && strcmp( libOutPath, "" ) != 0)
|
||||||
|
@ -1700,7 +1700,7 @@ void cmLocalUnixMakefileGenerator::OutputBuildTargetInDir(std::ostream& fout,
|
||||||
<< "; $(MAKE) $(MAKESILENT) cmake.check_depends"
|
<< "; $(MAKE) $(MAKESILENT) cmake.check_depends"
|
||||||
<< "; $(MAKE) $(MAKESILENT) -f cmake.check_depends"
|
<< "; $(MAKE) $(MAKESILENT) -f cmake.check_depends"
|
||||||
<< "; $(MAKE) $(MAKESILENT) "
|
<< "; $(MAKE) $(MAKESILENT) "
|
||||||
<< this->ConvertToMakefilePath(makeTarget) << "\n\n";
|
<< cmSystemTools::ConvertToOutputPath(makeTarget) << "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1771,7 +1771,7 @@ void cmLocalUnixMakefileGenerator::OutputLibDepend(std::ostream& fout,
|
||||||
libpath += name;
|
libpath += name;
|
||||||
libpath += this->GetSafeDefinition("CMAKE_STATIC_LIBRARY_SUFFIX");
|
libpath += this->GetSafeDefinition("CMAKE_STATIC_LIBRARY_SUFFIX");
|
||||||
}
|
}
|
||||||
fout << this->ConvertToMakefilePath(libpath.c_str()) << " ";
|
fout << cmSystemTools::ConvertToOutputPath(libpath.c_str()) << " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1810,7 +1810,7 @@ void cmLocalUnixMakefileGenerator::OutputExeDepend(std::ostream& fout,
|
||||||
exepath += name;
|
exepath += name;
|
||||||
// add the correct extension
|
// add the correct extension
|
||||||
exepath += cmSystemTools::GetExecutableExtension();
|
exepath += cmSystemTools::GetExecutableExtension();
|
||||||
fout << this->ConvertToMakefilePath(exepath.c_str()) << " ";
|
fout << cmSystemTools::ConvertToOutputPath(exepath.c_str()) << " ";
|
||||||
}
|
}
|
||||||
// if it isn't in the cache, it might still be a utility target
|
// if it isn't in the cache, it might still be a utility target
|
||||||
// so check for that
|
// so check for that
|
||||||
|
@ -1898,7 +1898,7 @@ void cmLocalUnixMakefileGenerator::BuildInSubDirectory(std::ostream& fout,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string directory = this->ConvertToMakefilePath(dir);
|
std::string directory = cmSystemTools::ConvertToOutputPath(dir);
|
||||||
if(target1)
|
if(target1)
|
||||||
{
|
{
|
||||||
fout << "\t@if test ! -d " << directory
|
fout << "\t@if test ! -d " << directory
|
||||||
|
@ -2045,8 +2045,8 @@ bool cmLocalUnixMakefileGenerator::OutputObjectDepends(std::ostream& fout)
|
||||||
{
|
{
|
||||||
std::string s = (*source)->GetSourceName();
|
std::string s = (*source)->GetSourceName();
|
||||||
s += this->GetOutputExtension((*source)->GetSourceExtension().c_str());
|
s += this->GetOutputExtension((*source)->GetSourceExtension().c_str());
|
||||||
fout << this->ConvertToMakefilePath(s.c_str()) << " : "
|
fout << cmSystemTools::ConvertToOutputPath(s.c_str()) << " : "
|
||||||
<< this->ConvertToMakefilePath(dep->c_str()) << "\n";
|
<< cmSystemTools::ConvertToOutputPath(dep->c_str()) << "\n";
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
fout << "\n\n";
|
fout << "\n\n";
|
||||||
|
@ -2097,7 +2097,7 @@ void cmLocalUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout)
|
||||||
// has been done because m_FullPath on cmDependInformation
|
// has been done because m_FullPath on cmDependInformation
|
||||||
// always is it called. If it is called here, network builds are
|
// always is it called. If it is called here, network builds are
|
||||||
// very slow because of the number of stats
|
// very slow because of the number of stats
|
||||||
std::string dependfile = this->ConvertToMakefilePath(dep->c_str());
|
std::string dependfile = cmSystemTools::ConvertToOutputPath(dep->c_str());
|
||||||
// use the lower path function to create uniqe names
|
// use the lower path function to create uniqe names
|
||||||
std::string lowerpath = this->LowerCasePath(dependfile.c_str());
|
std::string lowerpath = this->LowerCasePath(dependfile.c_str());
|
||||||
if(emittedLowerPath.insert(lowerpath).second)
|
if(emittedLowerPath.insert(lowerpath).second)
|
||||||
|
@ -2151,7 +2151,7 @@ void cmLocalUnixMakefileGenerator::OutputCustomRules(std::ostream& fout)
|
||||||
std::string comment = c->GetComment();
|
std::string comment = c->GetComment();
|
||||||
std::string command = c->GetCommand();
|
std::string command = c->GetCommand();
|
||||||
cmSystemTools::ReplaceString(command, "/./", "/");
|
cmSystemTools::ReplaceString(command, "/./", "/");
|
||||||
command = this->ConvertToMakefilePath(command.c_str());
|
command = cmSystemTools::ConvertToOutputPath(command.c_str());
|
||||||
command += " ";
|
command += " ";
|
||||||
// now add the arguments
|
// now add the arguments
|
||||||
command += c->GetArguments();
|
command += c->GetArguments();
|
||||||
|
@ -2182,7 +2182,7 @@ void cmLocalUnixMakefileGenerator::OutputCustomRules(std::ostream& fout)
|
||||||
}
|
}
|
||||||
cmSystemTools::ReplaceString(dep, "/./", "/");
|
cmSystemTools::ReplaceString(dep, "/./", "/");
|
||||||
cmSystemTools::ReplaceString(dep, "/$(IntDir)/", "/");
|
cmSystemTools::ReplaceString(dep, "/$(IntDir)/", "/");
|
||||||
dep = this->ConvertToMakefilePath(dep.c_str());
|
dep = cmSystemTools::ConvertToOutputPath(dep.c_str());
|
||||||
depends += " ";
|
depends += " ";
|
||||||
depends += dep;
|
depends += dep;
|
||||||
}
|
}
|
||||||
|
@ -2208,7 +2208,7 @@ void cmLocalUnixMakefileGenerator::OutputCustomRules(std::ostream& fout)
|
||||||
std::string
|
std::string
|
||||||
cmLocalUnixMakefileGenerator::ConvertToOutputForExisting(const char* p)
|
cmLocalUnixMakefileGenerator::ConvertToOutputForExisting(const char* p)
|
||||||
{
|
{
|
||||||
std::string ret = this->ConvertToMakefilePath(p);
|
std::string ret = cmSystemTools::ConvertToOutputPath(p);
|
||||||
// if there are spaces in the path, then get the short path version
|
// if there are spaces in the path, then get the short path version
|
||||||
// if there is one
|
// if there is one
|
||||||
if(ret.find(' ') != std::string::npos)
|
if(ret.find(' ') != std::string::npos)
|
||||||
|
@ -2217,7 +2217,7 @@ cmLocalUnixMakefileGenerator::ConvertToOutputForExisting(const char* p)
|
||||||
{
|
{
|
||||||
if(!cmSystemTools::GetShortPath(ret.c_str(), ret))
|
if(!cmSystemTools::GetShortPath(ret.c_str(), ret))
|
||||||
{
|
{
|
||||||
ret = this->ConvertToMakefilePath(p);
|
ret = cmSystemTools::ConvertToOutputPath(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2264,13 +2264,13 @@ void cmLocalUnixMakefileGenerator::OutputMakeVariables(std::ostream& fout)
|
||||||
}
|
}
|
||||||
|
|
||||||
fout << "CMAKE_CURRENT_SOURCE = " <<
|
fout << "CMAKE_CURRENT_SOURCE = " <<
|
||||||
this->ConvertToMakefilePath(m_Makefile->GetStartDirectory())
|
cmSystemTools::ConvertToOutputPath(m_Makefile->GetStartDirectory())
|
||||||
<< "\n";
|
<< "\n";
|
||||||
fout << "CMAKE_CURRENT_BINARY = " <<
|
fout << "CMAKE_CURRENT_BINARY = " <<
|
||||||
this->ConvertToMakefilePath(m_Makefile->GetStartOutputDirectory())
|
cmSystemTools::ConvertToOutputPath(m_Makefile->GetStartOutputDirectory())
|
||||||
<< "\n";
|
<< "\n";
|
||||||
fout << "CMAKE_SOURCE_DIR = " <<
|
fout << "CMAKE_SOURCE_DIR = " <<
|
||||||
cmSystemTools::ConvertToOutputPath(m_Makefile->GetHomeDirectory())
|
cmSystemTools::ConvertToOutputPath(m_Makefile->GetHomeDirectory())
|
||||||
<< "\n";
|
<< "\n";
|
||||||
fout << "CMAKE_BINARY_DIR = " <<
|
fout << "CMAKE_BINARY_DIR = " <<
|
||||||
cmSystemTools::ConvertToOutputPath(m_Makefile->GetHomeOutputDirectory())
|
cmSystemTools::ConvertToOutputPath(m_Makefile->GetHomeOutputDirectory())
|
||||||
|
@ -2366,7 +2366,7 @@ void cmLocalUnixMakefileGenerator::OutputInstallRules(std::ostream& fout)
|
||||||
installNameReal += targetNameReal;
|
installNameReal += targetNameReal;
|
||||||
fname = m_LibraryOutputPath;
|
fname = m_LibraryOutputPath;
|
||||||
fname += targetNameReal;
|
fname += targetNameReal;
|
||||||
fout << "\t$(INSTALL_DATA) " << this->ConvertToMakefilePath(fname.c_str())
|
fout << "\t$(INSTALL_DATA) " << cmSystemTools::ConvertToOutputPath(fname.c_str())
|
||||||
<< " \"$(DESTDIR)" << prefix << l->second.GetInstallPath() << "\"\n";
|
<< " \"$(DESTDIR)" << prefix << l->second.GetInstallPath() << "\"\n";
|
||||||
fout << "\t" << cmakecommand << " -E cmake_symlink_library \""
|
fout << "\t" << cmakecommand << " -E cmake_symlink_library \""
|
||||||
<< installNameReal << "\" \"" << installNameSO << "\" \"" << installName
|
<< installNameReal << "\" \"" << installNameSO << "\" \"" << installName
|
||||||
|
@ -2376,7 +2376,7 @@ void cmLocalUnixMakefileGenerator::OutputInstallRules(std::ostream& fout)
|
||||||
case cmTarget::EXECUTABLE:
|
case cmTarget::EXECUTABLE:
|
||||||
fname = m_ExecutableOutputPath;
|
fname = m_ExecutableOutputPath;
|
||||||
fname += this->GetFullTargetName(l->first.c_str(), l->second);
|
fname += this->GetFullTargetName(l->first.c_str(), l->second);
|
||||||
fout << "\t$(INSTALL_PROGRAM) " << this->ConvertToMakefilePath(fname.c_str())
|
fout << "\t$(INSTALL_PROGRAM) " << cmSystemTools::ConvertToOutputPath(fname.c_str())
|
||||||
<< " \"$(DESTDIR)" << prefix << l->second.GetInstallPath() << "\"\n";
|
<< " \"$(DESTDIR)" << prefix << l->second.GetInstallPath() << "\"\n";
|
||||||
break;
|
break;
|
||||||
case cmTarget::INSTALL_FILES:
|
case cmTarget::INSTALL_FILES:
|
||||||
|
@ -2410,7 +2410,7 @@ void cmLocalUnixMakefileGenerator::OutputInstallRules(std::ostream& fout)
|
||||||
fout << "\t$(INSTALL_DATA) ";
|
fout << "\t$(INSTALL_DATA) ";
|
||||||
}
|
}
|
||||||
|
|
||||||
fout << this->ConvertToMakefilePath(i->c_str())
|
fout << cmSystemTools::ConvertToOutputPath(i->c_str())
|
||||||
<< " \"$(DESTDIR)" << prefix << l->second.GetInstallPath() << "\"\n";
|
<< " \"$(DESTDIR)" << prefix << l->second.GetInstallPath() << "\"\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2445,7 +2445,7 @@ void cmLocalUnixMakefileGenerator::OutputInstallRules(std::ostream& fout)
|
||||||
{
|
{
|
||||||
fout << "\t @$(INSTALL_PROGRAM) ";
|
fout << "\t @$(INSTALL_PROGRAM) ";
|
||||||
}
|
}
|
||||||
fout << this->ConvertToMakefilePath(i->c_str())
|
fout << cmSystemTools::ConvertToOutputPath(i->c_str())
|
||||||
<< " \"$(DESTDIR)" << prefix << l->second.GetInstallPath() << "\"\n";
|
<< " \"$(DESTDIR)" << prefix << l->second.GetInstallPath() << "\"\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2485,14 +2485,14 @@ void cmLocalUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
|
||||||
{
|
{
|
||||||
if(!(*source)->GetPropertyAsBool("HEADER_FILE_ONLY"))
|
if(!(*source)->GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
{
|
{
|
||||||
allsources.push_back(this->ConvertToMakefilePath((*source)->GetFullPath().c_str()));
|
allsources.push_back(cmSystemTools::ConvertToOutputPath((*source)->GetFullPath().c_str()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string checkCache = m_Makefile->GetHomeOutputDirectory();
|
std::string checkCache = m_Makefile->GetHomeOutputDirectory();
|
||||||
checkCache += "/cmake.check_cache";
|
checkCache += "/cmake.check_cache";
|
||||||
checkCache = this->ConvertToMakefilePath(checkCache.c_str());
|
checkCache = cmSystemTools::ConvertToOutputPath(checkCache.c_str());
|
||||||
std::vector<std::string> cmake_depends;
|
std::vector<std::string> cmake_depends;
|
||||||
cmake_depends.push_back(checkCache);
|
cmake_depends.push_back(checkCache);
|
||||||
cmake_depends.push_back("$(CMAKE_MAKEFILE_SOURCES)");
|
cmake_depends.push_back("$(CMAKE_MAKEFILE_SOURCES)");
|
||||||
|
@ -2537,7 +2537,7 @@ void cmLocalUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
|
||||||
std::vector<std::string> check_cache_depends;
|
std::vector<std::string> check_cache_depends;
|
||||||
std::string CMakeCache = m_Makefile->GetHomeOutputDirectory();
|
std::string CMakeCache = m_Makefile->GetHomeOutputDirectory();
|
||||||
CMakeCache += "/CMakeCache.txt";
|
CMakeCache += "/CMakeCache.txt";
|
||||||
CMakeCache = this->ConvertToMakefilePath(CMakeCache.c_str());
|
CMakeCache = cmSystemTools::ConvertToOutputPath(CMakeCache.c_str());
|
||||||
check_cache_depends.push_back(CMakeCache);
|
check_cache_depends.push_back(CMakeCache);
|
||||||
check_cache_depends.push_back("$(CMAKE_MAKEFILE_SOURCES)");
|
check_cache_depends.push_back("$(CMAKE_MAKEFILE_SOURCES)");
|
||||||
|
|
||||||
|
@ -2642,7 +2642,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
||||||
std::string comment = "object file";
|
std::string comment = "object file";
|
||||||
std::string objectFile = std::string(shortName) +
|
std::string objectFile = std::string(shortName) +
|
||||||
this->GetOutputExtension(source.GetSourceExtension().c_str());
|
this->GetOutputExtension(source.GetSourceExtension().c_str());
|
||||||
objectFile = this->ConvertToMakefilePath(objectFile.c_str());
|
objectFile = cmSystemTools::ConvertToOutputPath(objectFile.c_str());
|
||||||
cmSystemTools::FileFormat format =
|
cmSystemTools::FileFormat format =
|
||||||
cmSystemTools::GetFileFormat(source.GetSourceExtension().c_str());
|
cmSystemTools::GetFileFormat(source.GetSourceExtension().c_str());
|
||||||
std::vector<std::string> rules;
|
std::vector<std::string> rules;
|
||||||
|
@ -2652,7 +2652,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
||||||
flags += extraCompileFlags;
|
flags += extraCompileFlags;
|
||||||
}
|
}
|
||||||
std::string sourceFile =
|
std::string sourceFile =
|
||||||
this->ConvertToMakefilePath(source.GetFullPath().c_str());
|
cmSystemTools::ConvertToOutputPath(source.GetFullPath().c_str());
|
||||||
std::string buildType = this->GetSafeDefinition("CMAKE_BUILD_TYPE");
|
std::string buildType = this->GetSafeDefinition("CMAKE_BUILD_TYPE");
|
||||||
buildType = cmSystemTools::UpperCase(buildType);
|
buildType = cmSystemTools::UpperCase(buildType);
|
||||||
switch(format)
|
switch(format)
|
||||||
|
@ -2760,7 +2760,7 @@ OutputBuildObjectFromSource(std::ostream& fout,
|
||||||
for(std::vector<std::string>::iterator i = depends.begin();
|
for(std::vector<std::string>::iterator i = depends.begin();
|
||||||
i != depends.end(); ++i)
|
i != depends.end(); ++i)
|
||||||
{
|
{
|
||||||
sourceAndDeps.push_back(this->ConvertToMakefilePath(i->c_str()));
|
sourceAndDeps.push_back(cmSystemTools::ConvertToOutputPath(i->c_str()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2956,7 +2956,7 @@ void cmLocalUnixMakefileGenerator::OutputMakeRule(std::ostream& fout,
|
||||||
replace = target;
|
replace = target;
|
||||||
m_Makefile->ExpandVariablesInString(replace);
|
m_Makefile->ExpandVariablesInString(replace);
|
||||||
|
|
||||||
std::string tgt = this->ConvertToMakefilePath(replace.c_str());
|
std::string tgt = cmSystemTools::ConvertToOutputPath(replace.c_str());
|
||||||
if(depends.empty())
|
if(depends.empty())
|
||||||
{
|
{
|
||||||
fout << tgt.c_str() << ":\n";
|
fout << tgt.c_str() << ":\n";
|
||||||
|
@ -3155,13 +3155,3 @@ void cmLocalUnixMakefileGenerator::GetLibraryNames(const char* n,
|
||||||
// The library name without extension.
|
// The library name without extension.
|
||||||
baseName = this->GetBaseTargetName(n, t);
|
baseName = this->GetBaseTargetName(n, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string cmLocalUnixMakefileGenerator::ConvertToMakefilePath(const char* p)
|
|
||||||
{
|
|
||||||
std::string ret = p;
|
|
||||||
cmSystemTools::ReplaceString(ret, m_Makefile->GetHomeDirectory(), "$(CMAKE_SOURCE_DIR)");
|
|
||||||
cmSystemTools::ReplaceString(ret, m_Makefile->GetHomeOutputDirectory(), "$(CMAKE_BINARY_DIR)");
|
|
||||||
ret = cmSystemTools::ConvertToOutputPath(ret.c_str());
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
|
@ -216,9 +216,6 @@ protected:
|
||||||
///! for existing files convert to output path and short path if spaces
|
///! for existing files convert to output path and short path if spaces
|
||||||
std::string ConvertToOutputForExisting(const char*);
|
std::string ConvertToOutputForExisting(const char*);
|
||||||
|
|
||||||
///! convert the path to a makefile path
|
|
||||||
std::string ConvertToMakefilePath(const char*);
|
|
||||||
|
|
||||||
/** Get the full name of the target's file, without path. */
|
/** Get the full name of the target's file, without path. */
|
||||||
std::string GetFullTargetName(const char* n, const cmTarget& t);
|
std::string GetFullTargetName(const char* n, const cmTarget& t);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue