|
@@ -140,7 +140,7 @@ void cmLocalUnixMakefileGenerator3::ComputeHomeRelativeOutputPath()
|
|
|
{
|
|
|
// Compute the path to use when referencing the current output
|
|
|
// directory from the top output directory.
|
|
|
- this->HomeRelativeOutputPath = this->Convert(
|
|
|
+ this->HomeRelativeOutputPath = this->ConvertToRelativePath(
|
|
|
this->GetCurrentBinaryDirectory(), cmOutputConverter::HOME_OUTPUT);
|
|
|
if (this->HomeRelativeOutputPath == ".") {
|
|
|
this->HomeRelativeOutputPath = "";
|
|
@@ -358,7 +358,7 @@ void cmLocalUnixMakefileGenerator3::WriteObjectConvenienceRule(
|
|
|
this->GetRecursiveMakeCall(tgtMakefileName.c_str(), targetName));
|
|
|
}
|
|
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
|
|
- cmOutputConverter::START_OUTPUT);
|
|
|
+ this->GetCurrentBinaryDirectory());
|
|
|
|
|
|
// Write the rule to the makefile.
|
|
|
std::vector<std::string> no_depends;
|
|
@@ -398,7 +398,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets(
|
|
|
commands.push_back(
|
|
|
this->GetRecursiveMakeCall(makefile2.c_str(), localName));
|
|
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
|
|
- cmOutputConverter::START_OUTPUT);
|
|
|
+ this->GetCurrentBinaryDirectory());
|
|
|
this->WriteMakeRule(ruleFileStream, "Convenience name for target.",
|
|
|
localName, depends, commands, true);
|
|
|
|
|
@@ -423,7 +423,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets(
|
|
|
commands.push_back(
|
|
|
this->GetRecursiveMakeCall(makefileName.c_str(), makeTargetName));
|
|
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
|
|
- cmOutputConverter::START_OUTPUT);
|
|
|
+ this->GetCurrentBinaryDirectory());
|
|
|
this->WriteMakeRule(ruleFileStream, "fast build rule for target.",
|
|
|
localName, depends, commands, true);
|
|
|
|
|
@@ -439,7 +439,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets(
|
|
|
commands.push_back(
|
|
|
this->GetRecursiveMakeCall(makefile2.c_str(), makeTargetName));
|
|
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
|
|
- cmOutputConverter::START_OUTPUT);
|
|
|
+ this->GetCurrentBinaryDirectory());
|
|
|
this->WriteMakeRule(ruleFileStream,
|
|
|
"Manual pre-install relink rule for target.",
|
|
|
localName, depends, commands, true);
|
|
@@ -592,8 +592,8 @@ void cmLocalUnixMakefileGenerator3::WriteMakeRule(
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-std::string cmLocalUnixMakefileGenerator3::ConvertShellCommand(
|
|
|
- std::string const& cmd, cmOutputConverter::RelativeRoot root)
|
|
|
+std::string cmLocalUnixMakefileGenerator3::MaybeConvertWatcomShellCommand(
|
|
|
+ std::string const& cmd)
|
|
|
{
|
|
|
if (this->IsWatcomWMake() && cmSystemTools::FileIsFullPath(cmd.c_str()) &&
|
|
|
cmd.find_first_of("( )") != cmd.npos) {
|
|
@@ -602,11 +602,10 @@ std::string cmLocalUnixMakefileGenerator3::ConvertShellCommand(
|
|
|
// lines with shell redirection operators.
|
|
|
std::string scmd;
|
|
|
if (cmSystemTools::GetShortPath(cmd, scmd)) {
|
|
|
- return this->Convert(scmd, cmOutputConverter::NONE,
|
|
|
- cmOutputConverter::SHELL);
|
|
|
+ return this->ConvertToOutputFormat(scmd, cmOutputConverter::SHELL);
|
|
|
}
|
|
|
}
|
|
|
- return this->Convert(cmd, root, cmOutputConverter::SHELL);
|
|
|
+ return std::string();
|
|
|
}
|
|
|
|
|
|
void cmLocalUnixMakefileGenerator3::WriteMakeVariables(
|
|
@@ -638,19 +637,25 @@ void cmLocalUnixMakefileGenerator3::WriteMakeVariables(
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
+ std::string cmakeShellCommand =
|
|
|
+ this->MaybeConvertWatcomShellCommand(cmSystemTools::GetCMakeCommand());
|
|
|
+ if (cmakeShellCommand.empty()) {
|
|
|
+ cmakeShellCommand = this->ConvertToOutputFormat(
|
|
|
+ cmSystemTools::CollapseFullPath(cmSystemTools::GetCMakeCommand()),
|
|
|
+ cmOutputConverter::SHELL);
|
|
|
+ }
|
|
|
+
|
|
|
/* clang-format off */
|
|
|
makefileStream
|
|
|
<< "# The CMake executable.\n"
|
|
|
<< "CMAKE_COMMAND = "
|
|
|
- << this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(),
|
|
|
- cmOutputConverter::FULL)
|
|
|
+ << cmakeShellCommand
|
|
|
<< "\n"
|
|
|
<< "\n";
|
|
|
makefileStream
|
|
|
<< "# The command to remove a file.\n"
|
|
|
<< "RM = "
|
|
|
- << this->ConvertShellCommand(cmSystemTools::GetCMakeCommand(),
|
|
|
- cmOutputConverter::FULL)
|
|
|
+ << cmakeShellCommand
|
|
|
<< " -E remove -f\n"
|
|
|
<< "\n";
|
|
|
makefileStream
|
|
@@ -660,16 +665,16 @@ void cmLocalUnixMakefileGenerator3::WriteMakeVariables(
|
|
|
makefileStream
|
|
|
<< "# The top-level source directory on which CMake was run.\n"
|
|
|
<< "CMAKE_SOURCE_DIR = "
|
|
|
- << this->Convert(this->GetSourceDirectory(),
|
|
|
- cmOutputConverter::FULL,
|
|
|
+ << this->ConvertToOutputFormat(
|
|
|
+ cmSystemTools::CollapseFullPath(this->GetSourceDirectory()),
|
|
|
cmOutputConverter::SHELL)
|
|
|
<< "\n"
|
|
|
<< "\n";
|
|
|
makefileStream
|
|
|
<< "# The top-level build directory on which CMake was run.\n"
|
|
|
<< "CMAKE_BINARY_DIR = "
|
|
|
- << this->Convert(this->GetBinaryDirectory(),
|
|
|
- cmOutputConverter::FULL,
|
|
|
+ << this->ConvertToOutputFormat(
|
|
|
+ cmSystemTools::CollapseFullPath(this->GetBinaryDirectory()),
|
|
|
cmOutputConverter::SHELL)
|
|
|
<< "\n"
|
|
|
<< "\n";
|
|
@@ -784,8 +789,8 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsBottom(
|
|
|
std::string runRule =
|
|
|
"$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)";
|
|
|
runRule += " --check-build-system ";
|
|
|
- runRule += this->Convert(cmakefileName, cmOutputConverter::NONE,
|
|
|
- cmOutputConverter::SHELL);
|
|
|
+ runRule +=
|
|
|
+ this->ConvertToOutputFormat(cmakefileName, cmOutputConverter::SHELL);
|
|
|
runRule += " 0";
|
|
|
|
|
|
std::vector<std::string> no_depends;
|
|
@@ -793,7 +798,7 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsBottom(
|
|
|
commands.push_back(runRule);
|
|
|
if (!this->IsRootMakefile()) {
|
|
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
|
|
- cmOutputConverter::START_OUTPUT);
|
|
|
+ this->GetCurrentBinaryDirectory());
|
|
|
}
|
|
|
this->WriteMakeRule(
|
|
|
makefileStream, "Special rule to run CMake to check the build system "
|
|
@@ -829,8 +834,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRelativeTargetDirectory(
|
|
|
{
|
|
|
std::string dir = this->HomeRelativeOutputPath;
|
|
|
dir += this->GetTargetDirectory(target);
|
|
|
- return this->Convert(dir, cmOutputConverter::NONE,
|
|
|
- cmOutputConverter::UNCHANGED);
|
|
|
+ return dir;
|
|
|
}
|
|
|
|
|
|
void cmLocalUnixMakefileGenerator3::AppendFlags(std::string& flags,
|
|
@@ -900,19 +904,19 @@ void cmLocalUnixMakefileGenerator3::AppendCustomDepend(
|
|
|
|
|
|
void cmLocalUnixMakefileGenerator3::AppendCustomCommands(
|
|
|
std::vector<std::string>& commands, const std::vector<cmCustomCommand>& ccs,
|
|
|
- cmGeneratorTarget* target, cmOutputConverter::RelativeRoot relative)
|
|
|
+ cmGeneratorTarget* target, std::string const& relative)
|
|
|
{
|
|
|
for (std::vector<cmCustomCommand>::const_iterator i = ccs.begin();
|
|
|
i != ccs.end(); ++i) {
|
|
|
cmCustomCommandGenerator ccg(*i, this->ConfigName, this);
|
|
|
- this->AppendCustomCommand(commands, ccg, target, true, relative);
|
|
|
+ this->AppendCustomCommand(commands, ccg, target, relative, true);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
|
|
|
std::vector<std::string>& commands, cmCustomCommandGenerator const& ccg,
|
|
|
- cmGeneratorTarget* target, bool echo_comment,
|
|
|
- cmOutputConverter::RelativeRoot relative, std::ostream* content)
|
|
|
+ cmGeneratorTarget* target, std::string const& relative, bool echo_comment,
|
|
|
+ std::ostream* content)
|
|
|
{
|
|
|
// Optionally create a command to display the custom command's
|
|
|
// comment text. This is used for pre-build, pre-link, and
|
|
@@ -962,7 +966,8 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
|
|
|
// working directory will be the start-output directory.
|
|
|
bool had_slash = cmd.find('/') != cmd.npos;
|
|
|
if (workingDir.empty()) {
|
|
|
- cmd = this->Convert(cmd, cmOutputConverter::START_OUTPUT);
|
|
|
+ cmd =
|
|
|
+ this->ConvertToRelativePath(cmd, cmOutputConverter::START_OUTPUT);
|
|
|
}
|
|
|
bool has_slash = cmd.find('/') != cmd.npos;
|
|
|
if (had_slash && !has_slash) {
|
|
@@ -971,10 +976,43 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
|
|
|
// without the current directory being in the search path.
|
|
|
cmd = "./" + cmd;
|
|
|
}
|
|
|
- std::string launcher = this->MakeLauncher(
|
|
|
- ccg, target, workingDir.empty() ? cmOutputConverter::START_OUTPUT
|
|
|
- : cmOutputConverter::NONE);
|
|
|
- cmd = launcher + this->ConvertShellCommand(cmd, cmOutputConverter::NONE);
|
|
|
+
|
|
|
+ std::string launcher;
|
|
|
+ // Short-circuit if there is no launcher.
|
|
|
+ const char* prop = "RULE_LAUNCH_CUSTOM";
|
|
|
+ const char* val = this->GetRuleLauncher(target, prop);
|
|
|
+ if (val && *val) {
|
|
|
+ // Expand rules in the empty string. It may insert the launcher and
|
|
|
+ // perform replacements.
|
|
|
+ RuleVariables vars;
|
|
|
+ vars.RuleLauncher = prop;
|
|
|
+ vars.CMTarget = target;
|
|
|
+ std::string output;
|
|
|
+ const std::vector<std::string>& outputs = ccg.GetOutputs();
|
|
|
+ if (!outputs.empty()) {
|
|
|
+ if (workingDir.empty()) {
|
|
|
+ output = this->Convert(outputs[0], cmOutputConverter::START_OUTPUT,
|
|
|
+ cmOutputConverter::SHELL);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ output = this->ConvertToOutputFormat(outputs[0],
|
|
|
+ cmOutputConverter::SHELL);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ vars.Output = output.c_str();
|
|
|
+
|
|
|
+ this->ExpandRuleVariables(launcher, vars);
|
|
|
+ if (!launcher.empty()) {
|
|
|
+ launcher += " ";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ std::string shellCommand = this->MaybeConvertWatcomShellCommand(cmd);
|
|
|
+ if (shellCommand.empty()) {
|
|
|
+ shellCommand =
|
|
|
+ this->ConvertToOutputFormat(cmd, cmOutputConverter::SHELL);
|
|
|
+ }
|
|
|
+ cmd = launcher + shellCommand;
|
|
|
|
|
|
ccg.AppendArguments(c, cmd);
|
|
|
if (content) {
|
|
@@ -1017,37 +1055,6 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
|
|
|
commands.insert(commands.end(), commands1.begin(), commands1.end());
|
|
|
}
|
|
|
|
|
|
-std::string cmLocalUnixMakefileGenerator3::MakeLauncher(
|
|
|
- cmCustomCommandGenerator const& ccg, cmGeneratorTarget* target,
|
|
|
- cmOutputConverter::RelativeRoot relative)
|
|
|
-{
|
|
|
- // Short-circuit if there is no launcher.
|
|
|
- const char* prop = "RULE_LAUNCH_CUSTOM";
|
|
|
- const char* val = this->GetRuleLauncher(target, prop);
|
|
|
- if (!(val && *val)) {
|
|
|
- return "";
|
|
|
- }
|
|
|
-
|
|
|
- // Expand rules in the empty string. It may insert the launcher and
|
|
|
- // perform replacements.
|
|
|
- RuleVariables vars;
|
|
|
- vars.RuleLauncher = prop;
|
|
|
- vars.CMTarget = target;
|
|
|
- std::string output;
|
|
|
- const std::vector<std::string>& outputs = ccg.GetOutputs();
|
|
|
- if (!outputs.empty()) {
|
|
|
- output = this->Convert(outputs[0], relative, cmOutputConverter::SHELL);
|
|
|
- }
|
|
|
- vars.Output = output.c_str();
|
|
|
-
|
|
|
- std::string launcher;
|
|
|
- this->ExpandRuleVariables(launcher, vars);
|
|
|
- if (!launcher.empty()) {
|
|
|
- launcher += " ";
|
|
|
- }
|
|
|
- return launcher;
|
|
|
-}
|
|
|
-
|
|
|
void cmLocalUnixMakefileGenerator3::AppendCleanCommand(
|
|
|
std::vector<std::string>& commands, const std::vector<std::string>& files,
|
|
|
cmGeneratorTarget* target, const char* filename)
|
|
@@ -1061,8 +1068,7 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand(
|
|
|
cleanfile += filename;
|
|
|
}
|
|
|
cleanfile += ".cmake";
|
|
|
- std::string cleanfilePath =
|
|
|
- this->Convert(cleanfile, cmOutputConverter::FULL);
|
|
|
+ std::string cleanfilePath = cmSystemTools::CollapseFullPath(cleanfile);
|
|
|
cmsys::ofstream fout(cleanfilePath.c_str());
|
|
|
if (!fout) {
|
|
|
cmSystemTools::Error("Could not create ", cleanfilePath.c_str());
|
|
@@ -1071,8 +1077,8 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand(
|
|
|
fout << "file(REMOVE_RECURSE\n";
|
|
|
for (std::vector<std::string>::const_iterator f = files.begin();
|
|
|
f != files.end(); ++f) {
|
|
|
- std::string fc = this->Convert(*f, cmOutputConverter::START_OUTPUT,
|
|
|
- cmOutputConverter::UNCHANGED);
|
|
|
+ std::string fc =
|
|
|
+ this->ConvertToRelativePath(*f, cmOutputConverter::START_OUTPUT);
|
|
|
fout << " " << cmOutputConverter::EscapeForCMake(fc) << "\n";
|
|
|
}
|
|
|
fout << ")\n";
|
|
@@ -1148,8 +1154,9 @@ void cmLocalUnixMakefileGenerator3::AppendEcho(
|
|
|
cmd += color_name;
|
|
|
if (progress) {
|
|
|
cmd += "--progress-dir=";
|
|
|
- cmd += this->Convert(progress->Dir, cmOutputConverter::FULL,
|
|
|
- cmOutputConverter::SHELL);
|
|
|
+ cmd += this->ConvertToOutputFormat(
|
|
|
+ cmSystemTools::CollapseFullPath(progress->Dir),
|
|
|
+ cmOutputConverter::SHELL);
|
|
|
cmd += " ";
|
|
|
cmd += "--progress-num=";
|
|
|
cmd += progress->Arg;
|
|
@@ -1558,9 +1565,9 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
|
|
this->AppendCustomDepends(depends, gt->GetPreBuildCommands());
|
|
|
this->AppendCustomDepends(depends, gt->GetPostBuildCommands());
|
|
|
this->AppendCustomCommands(commands, gt->GetPreBuildCommands(), gt,
|
|
|
- cmOutputConverter::START_OUTPUT);
|
|
|
+ this->GetCurrentBinaryDirectory());
|
|
|
this->AppendCustomCommands(commands, gt->GetPostBuildCommands(), gt,
|
|
|
- cmOutputConverter::START_OUTPUT);
|
|
|
+ this->GetCurrentBinaryDirectory());
|
|
|
std::string targetName = gt->GetName();
|
|
|
this->WriteMakeRule(ruleFileStream, targetString.c_str(), targetName,
|
|
|
depends, commands, true);
|
|
@@ -1597,15 +1604,16 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
|
|
{
|
|
|
std::ostringstream progCmd;
|
|
|
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
|
|
|
- progCmd << this->Convert(progressDir, cmOutputConverter::FULL,
|
|
|
- cmOutputConverter::SHELL);
|
|
|
+ progCmd << this->ConvertToOutputFormat(
|
|
|
+ cmSystemTools::CollapseFullPath(progressDir), cmOutputConverter::SHELL);
|
|
|
|
|
|
std::string progressFile = cmake::GetCMakeFilesDirectory();
|
|
|
progressFile += "/progress.marks";
|
|
|
std::string progressFileNameFull = this->ConvertToFullPath(progressFile);
|
|
|
progCmd << " "
|
|
|
- << this->Convert(progressFileNameFull, cmOutputConverter::FULL,
|
|
|
- cmOutputConverter::SHELL);
|
|
|
+ << this->ConvertToOutputFormat(
|
|
|
+ cmSystemTools::CollapseFullPath(progressFileNameFull),
|
|
|
+ cmOutputConverter::SHELL);
|
|
|
commands.push_back(progCmd.str());
|
|
|
}
|
|
|
std::string mf2Dir = cmake::GetCMakeFilesDirectoryPostSlash();
|
|
@@ -1613,12 +1621,12 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
|
|
commands.push_back(
|
|
|
this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget));
|
|
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
|
|
- cmOutputConverter::START_OUTPUT);
|
|
|
+ this->GetCurrentBinaryDirectory());
|
|
|
{
|
|
|
std::ostringstream progCmd;
|
|
|
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0
|
|
|
- progCmd << this->Convert(progressDir, cmOutputConverter::FULL,
|
|
|
- cmOutputConverter::SHELL);
|
|
|
+ progCmd << this->ConvertToOutputFormat(
|
|
|
+ cmSystemTools::CollapseFullPath(progressDir), cmOutputConverter::SHELL);
|
|
|
progCmd << " 0";
|
|
|
commands.push_back(progCmd.str());
|
|
|
}
|
|
@@ -1633,7 +1641,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
|
|
commands.push_back(
|
|
|
this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget));
|
|
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
|
|
- cmOutputConverter::START_OUTPUT);
|
|
|
+ this->GetCurrentBinaryDirectory());
|
|
|
this->WriteMakeRule(ruleFileStream, "The main clean target", "clean",
|
|
|
depends, commands, true);
|
|
|
commands.clear();
|
|
@@ -1659,7 +1667,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
|
|
commands.push_back(
|
|
|
this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget));
|
|
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
|
|
- cmOutputConverter::START_OUTPUT);
|
|
|
+ this->GetCurrentBinaryDirectory());
|
|
|
this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.",
|
|
|
"preinstall", depends, commands, true);
|
|
|
depends.clear();
|
|
@@ -1674,12 +1682,12 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
|
|
|
std::string runRule =
|
|
|
"$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)";
|
|
|
runRule += " --check-build-system ";
|
|
|
- runRule += this->Convert(cmakefileName, cmOutputConverter::NONE,
|
|
|
- cmOutputConverter::SHELL);
|
|
|
+ runRule +=
|
|
|
+ this->ConvertToOutputFormat(cmakefileName, cmOutputConverter::SHELL);
|
|
|
runRule += " 1";
|
|
|
commands.push_back(runRule);
|
|
|
this->CreateCDCommand(commands, this->GetBinaryDirectory(),
|
|
|
- cmOutputConverter::START_OUTPUT);
|
|
|
+ this->GetCurrentBinaryDirectory());
|
|
|
this->WriteMakeRule(ruleFileStream, "clear depends", "depend", depends,
|
|
|
commands, true);
|
|
|
}
|
|
@@ -1846,7 +1854,8 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo(
|
|
|
for (std::vector<std::string>::iterator i = includes.begin();
|
|
|
i != includes.end(); ++i) {
|
|
|
cmakefileStream << " \""
|
|
|
- << this->Convert(*i, cmOutputConverter::HOME_OUTPUT)
|
|
|
+ << this->ConvertToRelativePath(
|
|
|
+ *i, cmOutputConverter::HOME_OUTPUT)
|
|
|
<< "\"\n";
|
|
|
}
|
|
|
cmakefileStream << " )\n";
|
|
@@ -1888,8 +1897,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall(
|
|
|
// Call make on the given file.
|
|
|
std::string cmd;
|
|
|
cmd += "$(MAKE) -f ";
|
|
|
- cmd +=
|
|
|
- this->Convert(makefile, cmOutputConverter::NONE, cmOutputConverter::SHELL);
|
|
|
+ cmd += this->ConvertToOutputFormat(makefile, cmOutputConverter::SHELL);
|
|
|
cmd += " ";
|
|
|
|
|
|
cmGlobalUnixMakefileGenerator3* gg =
|
|
@@ -1911,7 +1919,8 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall(
|
|
|
// Add the target.
|
|
|
if (!tgt.empty()) {
|
|
|
// The make target is always relative to the top of the build tree.
|
|
|
- std::string tgt2 = this->Convert(tgt, cmOutputConverter::HOME_OUTPUT);
|
|
|
+ std::string tgt2 =
|
|
|
+ this->ConvertToRelativePath(tgt, cmOutputConverter::HOME_OUTPUT);
|
|
|
|
|
|
// The target may have been written with windows paths.
|
|
|
cmSystemTools::ConvertToOutputSlashes(tgt2);
|
|
@@ -2046,12 +2055,10 @@ void cmLocalUnixMakefileGenerator3::AddImplicitDepends(
|
|
|
|
|
|
void cmLocalUnixMakefileGenerator3::CreateCDCommand(
|
|
|
std::vector<std::string>& commands, const char* tgtDir,
|
|
|
- cmOutputConverter::RelativeRoot relRetDir)
|
|
|
+ std::string const& relDir)
|
|
|
{
|
|
|
- const char* retDir = this->GetRelativeRootPath(relRetDir);
|
|
|
-
|
|
|
// do we need to cd?
|
|
|
- if (!strcmp(tgtDir, retDir)) {
|
|
|
+ if (tgtDir == relDir) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -2073,7 +2080,7 @@ void cmLocalUnixMakefileGenerator3::CreateCDCommand(
|
|
|
|
|
|
// Change back to the starting directory.
|
|
|
cmd = cd_cmd;
|
|
|
- cmd += this->ConvertToOutputForExisting(relRetDir);
|
|
|
+ cmd += this->ConvertToOutputForExisting(relDir);
|
|
|
commands.push_back(cmd);
|
|
|
} else {
|
|
|
// On UNIX we must construct a single shell command to change
|