Репозитории ALT
S: | 3.2.2-alt4 |
D: | 2.2.2-alt1 |
5.1: | 2.2.4-alt4.M50P.1 |
4.1: | 2.2.0-alt3 |
4.0: | 2.2.0-alt2 |
3.0: | 1.0.10-alt1 |
Группа :: Разработка/Прочее
Пакет: fpc
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: fpc-rename-instantfpc-to-ifpc.patch
Скачать
Скачать
diff --git a/fpcbuild/fpcsrc/utils/instantfpc/Makefile.fpc b/fpcbuild/fpcsrc/utils/instantfpc/Makefile.fpc
index f862e64..92e38c1 100644
--- a/fpcbuild/fpcsrc/utils/instantfpc/Makefile.fpc
+++ b/fpcbuild/fpcsrc/utils/instantfpc/Makefile.fpc
@@ -3,7 +3,7 @@
#
[package]
-name=instantfpc
+name=ifpc
version=3.3.1
[require]
diff --git a/fpcbuild/fpcsrc/utils/instantfpc/fpmake.pp b/fpcbuild/fpcsrc/utils/instantfpc/fpmake.pp
index 1fee918..4fd667d 100644
--- a/fpcbuild/fpcsrc/utils/instantfpc/fpmake.pp
+++ b/fpcbuild/fpcsrc/utils/instantfpc/fpmake.pp
@@ -15,7 +15,7 @@ begin
With Installer do
begin
P:=AddPackage('utils-instantfpc');
- P.ShortName:='instantfpc';
+ P.ShortName:='ifpc';
P.Author := '<various>';
P.License := 'LGPL with modification';
diff --git a/fpcbuild/fpcsrc/utils/instantfpc/instantfpc.pas b/fpcbuild/fpcsrc/utils/instantfpc/instantfpc.pas
index b8dd584..9e7619c 100644
--- a/fpcbuild/fpcsrc/utils/instantfpc/instantfpc.pas
+++ b/fpcbuild/fpcsrc/utils/instantfpc/instantfpc.pas
@@ -28,39 +28,41 @@ const
Version = '1.3';
// 1.3 compile in a separate directory, so that parallel invocations do not overwrite link.res files
+var
+ BinPath, BinName: string;
Procedure Usage(Err : string);
begin
if (Err<>'') then
Writeln('Error : ',Err);
- writeln('instantfpc '+Version);
+ writeln(BinName, ' ', Version);
writeln;
writeln('Run pascal source files as scripts.');
writeln('Normal usage is to add to a program source file a first line');
- writeln('("shebang") "#!/usr/bin/instantfpc".');
+ writeln('("shebang") "#!', BinPath, BinName, '".');
writeln('Then you can execute the source directly in the terminal/console.');
writeln;
- writeln('instantfpc -h');
+ writeln(BinName, ' -h');
writeln(' Print this help message and exit.');
writeln;
- writeln('instantfpc -v');
+ writeln(BinName, ' -v');
writeln(' Print version and exit.');
writeln;
- writeln('instantfpc [compiler options] <source file> [program parameters]');
+ writeln(BinName, ' [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');
writeln(' cached source is compiled.');
writeln(' If compilation fails the fpc output is written to stdout and');
- writeln(' instantfpc exits with error code 1.');
+ writeln(' ', BinName, ' 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(' If the environment option INSTANTFPCOPTIONS is set it is');
writeln(' passed to the compiler as first parameters.');
writeln;
- writeln('instantfpc --get-cache');
+ writeln(BinName, ' --get-cache');
writeln(' Prints current cache directory and exit.');
writeln;
writeln('Options:');
@@ -106,7 +108,7 @@ begin
if (P='') then exit;
if p='-v' then
begin
- writeln('instantfpc '+Version);
+ writeln(BinName, ' ', Version);
Halt(1);
end
else if p='-h' then
@@ -139,6 +141,8 @@ begin
{ For example:
/usr/bin/instantfpc -MObjFpc -Sh ./envvars.pas param1
}
+ BinPath := ExtractFilePath(ParamStr(0));
+ BinName := 'ifpc';
for i:=1 to Paramcount do
begin
p:=ParamStr(i);