mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 13:49:15 +02:00
parent
81c4fe28bf
commit
4ed0c07ea3
@ -29,9 +29,11 @@ const
|
|||||||
// 1.3 compile in a separate directory, so that parallel invocations do not overwrite link.res files
|
// 1.3 compile in a separate directory, so that parallel invocations do not overwrite link.res files
|
||||||
|
|
||||||
|
|
||||||
Procedure Usage;
|
Procedure Usage(Err : string);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
if (Err<>'') then
|
||||||
|
Writeln('Error : ',Err);
|
||||||
writeln('instantfpc '+Version);
|
writeln('instantfpc '+Version);
|
||||||
writeln;
|
writeln;
|
||||||
writeln('Run pascal source files as scripts.');
|
writeln('Run pascal source files as scripts.');
|
||||||
@ -76,7 +78,7 @@ begin
|
|||||||
writeln;
|
writeln;
|
||||||
writeln(' -B');
|
writeln(' -B');
|
||||||
writeln(' Always recompile.');
|
writeln(' Always recompile.');
|
||||||
Halt(0);
|
Halt(Ord(Err<>''));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure DisplayCache;
|
Procedure DisplayCache;
|
||||||
@ -108,7 +110,7 @@ begin
|
|||||||
Halt(1);
|
Halt(1);
|
||||||
end
|
end
|
||||||
else if p='-h' then
|
else if p='-h' then
|
||||||
usage
|
usage('')
|
||||||
else if p='--get-cache' then
|
else if p='--get-cache' then
|
||||||
DisplayCache
|
DisplayCache
|
||||||
else if copy(p,1,11)='--compiler=' then
|
else if copy(p,1,11)='--compiler=' then
|
||||||
@ -167,12 +169,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if (Filename='') then
|
if (Filename='') then
|
||||||
begin
|
Usage('Missing source file');
|
||||||
writeln('missing source file');
|
|
||||||
Halt(1);
|
|
||||||
end;
|
|
||||||
CheckSourceName(Filename);
|
CheckSourceName(Filename);
|
||||||
|
|
||||||
Src:=TStringList.Create;
|
Src:=TStringList.Create;
|
||||||
try
|
try
|
||||||
Src.LoadFromFile(Filename);
|
Src.LoadFromFile(Filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user