Browse Source

instantfpc: environment option INSTANTFPCOPTIONS

git-svn-id: trunk@18996 -
Mattias Gaertner 14 năm trước cách đây
mục cha
commit
117a874ba5
2 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 3 1
      utils/instantfpc/instantfpc.pas
  2. 1 1
      utils/instantfpc/instantfptools.pas

+ 3 - 1
utils/instantfpc/instantfpc.pas

@@ -25,7 +25,7 @@ uses
   Classes, SysUtils, InstantFPTools;
 
 const
-  Version = '1.0';
+  Version = '1.1';
 
 
 Procedure Usage;
@@ -49,6 +49,8 @@ begin
   writeln('      If compilation was successful the program is executed.');
   writeln('      If the compiler options contains -B the program is always');
   writeln('      compiled.');
+  writeln('      If the environment option INSTANTFPCOPTIONS is set it is');
+  writeln('      passed to the compiler as first parameters.');
   writeln;
   writeln('instantfpc --get-cache');
   writeln('      Prints cache directory to stdout.');

+ 1 - 1
utils/instantfpc/instantfptools.pas

@@ -238,7 +238,7 @@ var
   p: String;
   i : integer;
 begin
-  Result:='';
+  Result:=GetEnvironmentVariable('INSTANTFPCOPTIONS');
   I:=1;
   While (I<=ParamCount) and (Copy(ParamStr(i),1,1)='-') do
     begin