pass OPT in environment variable

quote compiler idemake.cfg, if necessary (issue #1437)

git-svn-id: trunk@8162 -
This commit is contained in:
vincents 2005-11-14 23:27:09 +00:00
parent 0f62ce4223
commit 027479d4e4
3 changed files with 7 additions and 4 deletions

View File

@ -355,7 +355,7 @@ begin
ExtraOptions); ExtraOptions);
if Result<>mrOk then exit; if Result<>mrOk then exit;
if ExtraOptions<>'' then if ExtraOptions<>'' then
Tool.CmdLineParams:=Tool.CmdLineParams+' OPT="'+ExtraOptions+'"'; Tool.EnvironmentOverrides.Values['OPT'] := ExtraOptions;
// append target OS // append target OS
if Options.TargetOS<>'' then if Options.TargetOS<>'' then
Tool.CmdLineParams:=Tool.CmdLineParams+' OS_TARGET='+Options.TargetOS; Tool.CmdLineParams:=Tool.CmdLineParams+' OS_TARGET='+Options.TargetOS;
@ -431,7 +431,10 @@ begin
if (blfUseMakeIDECfg in Flags) then begin if (blfUseMakeIDECfg in Flags) then begin
MakeIDECfgFilename:=GetMakeIDEConfigFilename; MakeIDECfgFilename:=GetMakeIDEConfigFilename;
if (FileExists(MakeIDECfgFilename)) then begin if (FileExists(MakeIDECfgFilename)) then begin
ExtraOptions:='@'+MakeIDECfgFilename; if pos(' ', MakeIDECfgFilename)>0 then
ExtraOptions:='@"'+MakeIDECfgFilename+'"'
else
ExtraOptions:='@'+MakeIDECfgFilename;
exit; exit;
end; end;
end; end;

View File

@ -3955,7 +3955,7 @@ begin
// add include path to config directory // add include path to config directory
ConfigDir:=AppendPathDelim(GetPrimaryConfigPath); ConfigDir:=AppendPathDelim(GetPrimaryConfigPath);
AddOption('-Fi'+ConfigDir); AddOption(PrepareCmdLineOption('-Fi'+ConfigDir));
// add target option // add target option
// ToDo // ToDo

View File

@ -38,7 +38,7 @@ unit PkgOptionsDlg;
interface interface
uses uses
Classes, SysUtils, FPCAdds, LCLProc, Forms, Controls, Buttons, LResources, Classes, SysUtils, LCLProc, Forms, Controls, Buttons, LResources,
ExtCtrls, StdCtrls, Spin, Dialogs, PathEditorDlg, IDEProcs, IDEWindowIntf, ExtCtrls, StdCtrls, Spin, Dialogs, PathEditorDlg, IDEProcs, IDEWindowIntf,
LazarusIDEStrConsts, BrokenDependenciesDlg, PackageDefs, PackageSystem, LazarusIDEStrConsts, BrokenDependenciesDlg, PackageDefs, PackageSystem,
CompilerOptions; CompilerOptions;