|
|
@@ -1964,6 +1964,15 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateRunScriptBuildPhase(
|
|
|
return buildPhase;
|
|
|
}
|
|
|
|
|
|
+namespace {
|
|
|
+void ReplaceScriptVars(std::string& cmd)
|
|
|
+{
|
|
|
+ cmSystemTools::ReplaceString(cmd, "$(CONFIGURATION)", "$CONFIGURATION");
|
|
|
+ cmSystemTools::ReplaceString(cmd, "$(EFFECTIVE_PLATFORM_NAME)",
|
|
|
+ "$EFFECTIVE_PLATFORM_NAME");
|
|
|
+}
|
|
|
+}
|
|
|
+
|
|
|
std::string cmGlobalXCodeGenerator::ConstructScript(
|
|
|
cmCustomCommandGenerator const& ccg)
|
|
|
{
|
|
|
@@ -1974,6 +1983,7 @@ std::string cmGlobalXCodeGenerator::ConstructScript(
|
|
|
wd = lg->GetCurrentBinaryDirectory();
|
|
|
}
|
|
|
wd = lg->ConvertToOutputFormat(wd, cmOutputConverter::SHELL);
|
|
|
+ ReplaceScriptVars(wd);
|
|
|
script = cmStrCat(script, " cd ", wd, "\n");
|
|
|
for (unsigned int c = 0; c < ccg.GetNumberOfCommands(); ++c) {
|
|
|
std::string cmd = ccg.GetCommand(c);
|
|
|
@@ -1983,9 +1993,7 @@ std::string cmGlobalXCodeGenerator::ConstructScript(
|
|
|
cmSystemTools::ReplaceString(cmd, "/./", "/");
|
|
|
cmd = lg->ConvertToOutputFormat(cmd, cmOutputConverter::SHELL);
|
|
|
ccg.AppendArguments(c, cmd);
|
|
|
- cmSystemTools::ReplaceString(cmd, "$(CONFIGURATION)", "$CONFIGURATION");
|
|
|
- cmSystemTools::ReplaceString(cmd, "$(EFFECTIVE_PLATFORM_NAME)",
|
|
|
- "$EFFECTIVE_PLATFORM_NAME");
|
|
|
+ ReplaceScriptVars(cmd);
|
|
|
script = cmStrCat(script, " ", cmd, '\n');
|
|
|
}
|
|
|
return script;
|