IDE: macro TargetOS(IDE) return os of IDE executable, analog macro TargetCPU, macro SrcOS(os)

git-svn-id: trunk@36031 -
This commit is contained in:
mattias 2012-03-15 13:23:00 +00:00
parent 8c82016111
commit badac6ae4a
2 changed files with 9 additions and 3 deletions

View File

@ -1471,6 +1471,8 @@ function TBuildManager.MacroFuncTargetCPU(const Param: string;
begin
if Data=CompilerOptionMacroPlatformIndependent then
Result:='%(CPU_TARGET)'
else if SysUtils.CompareText(Param,'IDE')=0 then
Result:=GetCompiledTargetCPU
else
Result:=GetTargetCPU;
end;
@ -1480,6 +1482,8 @@ function TBuildManager.MacroFuncTargetOS(const Param: string;
begin
if Data=CompilerOptionMacroPlatformIndependent then
Result:='%(OS_TARGET)'
else if SysUtils.CompareText(Param,'IDE')=0 then
Result:=GetCompiledTargetOS
else
Result:=GetTargetOS;
end;
@ -1520,6 +1524,8 @@ function TBuildManager.MacroFuncSrcOS(const Param: string; const Data: PtrInt;
begin
if Data=CompilerOptionMacroPlatformIndependent then
Result:='%(OS_TARGET)'
else if Param<>'' then
Result:=GetDefaultSrcOSForTargetOS(Param)
else
Result:=GetDefaultSrcOSForTargetOS(GetTargetOS);
end;

View File

@ -846,11 +846,11 @@ begin
s:=LazarusDir
else
s:='<LazarusDirNotSet>';
end else if CompareText(MacroName,'TargetOS')=0 then
end else if (CompareText(MacroName,'TargetOS')=0) then
s:=GetCompiledTargetOS
else if CompareText(MacroName,'TargetCPU')=0 then
else if (CompareText(MacroName,'TargetCPU')=0) then
s:=GetCompiledTargetCPU
else if CompareText(MacroName,'SrcOS')=0 then
else if (CompareText(MacroName,'SrcOS')=0) then
s:=GetDefaultSrcOSForTargetOS(GetCompiledTargetOS)
else
Handled:=false;