You've already forked lazarus-ccr
instantfpc: check for -B
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1537 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -59,7 +59,7 @@ begin
|
||||
writeln('instantfpc -v');
|
||||
writeln(' Print version and exit.');
|
||||
writeln;
|
||||
writeln('instantfpc [fpc compiler options] <source file> [program parameters]');
|
||||
writeln('instantfpc [compiler options] <source file> [program parameters]');
|
||||
writeln(' Compiles source and runs program.');
|
||||
writeln(' Source is compared with the cache. If cache is not valid then');
|
||||
writeln(' source is copied to cache with the shebang line commented and');
|
||||
@ -67,6 +67,8 @@ begin
|
||||
writeln(' If compilation fails the fpc output is written to stdout and');
|
||||
writeln(' instantfpc exits with error code 1.');
|
||||
writeln(' If compilation was successful the program is executed.');
|
||||
writeln(' If the compiler options contains -B the program is always');
|
||||
writeln(' compiled.');
|
||||
writeln;
|
||||
writeln('instantfpc --get-cache');
|
||||
writeln(' Prints cache directory to stdout.');
|
||||
|
@ -80,8 +80,15 @@ function IsCacheValid(Src: TStringList; const CachedSrcFile,
|
||||
CachedExeFile: string): boolean;
|
||||
var
|
||||
OldSrc: TStringList;
|
||||
i: Integer;
|
||||
p: String;
|
||||
begin
|
||||
Result:=false;
|
||||
for i:=1 to Paramcount do begin
|
||||
p:=ParamStr(i);
|
||||
if (p='') or (p[1]<>'-') then break;
|
||||
if p='-B' then exit; // always compile
|
||||
end;
|
||||
if not FileExists(CachedSrcFile) then exit;
|
||||
if not FileExists(CachedExeFile) then exit;
|
||||
OldSrc:=TStringList.Create;
|
||||
|
Reference in New Issue
Block a user