Skip to content

Commit e26b099

Browse files
committed
* sdk: Fix ticket #328: allow variable expansion in programs argument for execution of libraries
- reduce duplicated code MacrosManager::ReplaceMacros and MacrosManager::ReplaceEnvVars are the same function git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@12324 2a5c6006-c6dd-42ca-98ab-0921f2732cef
1 parent e7f4042 commit e26b099

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/plugins/compilergcc/compilergcc.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ int CompilerGCC::Run(ProjectBuildTarget* target)
20152015
m_pProject->SetCurrentlyCompilingTarget(0);
20162016
return -1;
20172017
}
2018-
Manager::Get()->GetMacrosManager()->ReplaceEnvVars(hostapStr);
2018+
20192019
command << hostapStr << strSPACE;
20202020
command << target->GetExecutionParameters();
20212021
}
@@ -2028,8 +2028,6 @@ int CompilerGCC::Run(ProjectBuildTarget* target)
20282028
// here is last \"
20292029
if (commandIsQuoted)
20302030
command << strQUOTE;
2031-
Manager::Get()->GetMacrosManager()->ReplaceMacros(command, target);
2032-
Manager::Get()->GetMacrosManager()->ReplaceEnvVars(command);
20332031
}
20342032
else
20352033
{
@@ -2042,10 +2040,8 @@ int CompilerGCC::Run(ProjectBuildTarget* target)
20422040
}
20432041
command << hostapStr << strSPACE;
20442042
command << target->GetExecutionParameters();
2045-
Manager::Get()->GetMacrosManager()->ReplaceMacros(command, target);
2046-
Manager::Get()->GetMacrosManager()->ReplaceEnvVars(command);
20472043
}
2048-
2044+
Manager::Get()->GetMacrosManager()->ReplaceMacros(command, target);
20492045
wxString script = command;
20502046

20512047
if (platform::macosx)

0 commit comments

Comments
 (0)