mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 07:16:00 +02:00
IDE: build IDE: do not pass -FE when building to default dir, pass -o when targetfilename differs from default
git-svn-id: trunk@44311 -
This commit is contained in:
parent
f2745c8af3
commit
45c47d090f
@ -162,7 +162,7 @@ type
|
||||
fOutputDirRedirected: boolean;
|
||||
fTargetOS: string;
|
||||
fTargetCPU: string;
|
||||
fTargetFilename: string;
|
||||
fTargetFilename: string; // = fTargetDir + 'lazarus'+GetExecutableExt(fTargetOS)
|
||||
fTargetDir: string;
|
||||
fUnitOutDir: string;
|
||||
fWorkingDir: string;
|
||||
@ -796,19 +796,18 @@ begin
|
||||
// so make sure the directory doesn't end with the path delimiter.
|
||||
AppendExtraOption('-FU'+ChompPathDelim(fUnitOutDir));
|
||||
|
||||
if fTargetDir<>'' then
|
||||
//debugln(['TLazarusBuilder.CreateIDEMakeOptions fTargetDir=',fTargetDir,' fOutputDirRedirected=',fOutputDirRedirected,' fTargetFilename=',fTargetFilename]);
|
||||
if fOutputDirRedirected then
|
||||
// FPC interpretes '\ ' as an escape for a space in a path on Windows,
|
||||
// so make sure the directory doesn't end with the path delimiter.
|
||||
AppendExtraOption('-FE'+ChompPathDelim(fTargetDir));
|
||||
|
||||
if fOutputDirRedirected then begin
|
||||
// Note: FPC automatically changes the last extension (append or replace)
|
||||
// For example under linux, where executables don't need any extension
|
||||
// fpc removes the last extension of the -o option.
|
||||
DefaultTargetFilename:='lazarus'+GetExecutableExt(fTargetOS);
|
||||
if CreateRelativePath(fTargetFilename,fTargetDir) <> DefaultTargetFilename then
|
||||
AppendExtraOption('-o'+fTargetFilename);
|
||||
end;
|
||||
// Note: FPC automatically changes the last extension (append or replace)
|
||||
// For example under linux, where executables don't need any extension
|
||||
// fpc removes the last extension of the -o option.
|
||||
DefaultTargetFilename:='lazarus'+GetExecutableExt(fTargetOS);
|
||||
if CreateRelativePath(fTargetFilename,fTargetDir) <> DefaultTargetFilename then
|
||||
AppendExtraOption('-o'+fTargetFilename);
|
||||
|
||||
// add package options for IDE
|
||||
//DebugLn(['CreateIDEMakeOptions blfUseMakeIDECfg=',blfUseMakeIDECfg in FLags,' ExtraOptions="',fExtraOptions,'" ',fPackageOptions]);
|
||||
|
Loading…
Reference in New Issue
Block a user