mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 15:30:26 +02:00
* -V support
This commit is contained in:
parent
9749cc7a9e
commit
9b39a588c3
@ -88,6 +88,7 @@ program fpc;
|
|||||||
s,
|
s,
|
||||||
processorname,
|
processorname,
|
||||||
ppcbin,
|
ppcbin,
|
||||||
|
versionStr,
|
||||||
processorstr : shortstring;
|
processorstr : shortstring;
|
||||||
ppccommandline : ansistring;
|
ppccommandline : ansistring;
|
||||||
i : longint;
|
i : longint;
|
||||||
@ -109,45 +110,53 @@ program fpc;
|
|||||||
ppcbin:='ppcppc';
|
ppcbin:='ppcppc';
|
||||||
processorname:='powerpc';
|
processorname:='powerpc';
|
||||||
{$endif powerpc}
|
{$endif powerpc}
|
||||||
|
versionstr:=''; { Default is just the name }
|
||||||
for i:=1 to paramcount do
|
for i:=1 to paramcount do
|
||||||
begin
|
begin
|
||||||
s:=paramstr(i);
|
s:=paramstr(i);
|
||||||
if pos('-P',s)=1 then
|
if pos('-V',s)=1 then
|
||||||
begin
|
versionstr:=copy(s,3,length(s)-2)
|
||||||
processorstr:=copy(s,3,length(s)-2);
|
|
||||||
{ -PB is a special code that will show the
|
|
||||||
default compiler and exit immediatly. It's
|
|
||||||
main usage is for Makefile }
|
|
||||||
if processorstr='B' then
|
|
||||||
begin
|
|
||||||
{ report the full name of the ppcbin }
|
|
||||||
findexe(ppcbin);
|
|
||||||
writeln(ppcbin);
|
|
||||||
halt(0);
|
|
||||||
end
|
|
||||||
{ -PP is a special code that will show the
|
|
||||||
processor and exit immediatly. It's
|
|
||||||
main usage is for Makefile }
|
|
||||||
else if processorstr='P' then
|
|
||||||
begin
|
|
||||||
{ report the processor }
|
|
||||||
writeln(processorname);
|
|
||||||
halt(0);
|
|
||||||
end
|
|
||||||
else if processorstr='i386' then
|
|
||||||
ppcbin:='ppc386'
|
|
||||||
else if processorstr='m68k' then
|
|
||||||
ppcbin:='ppc68k'
|
|
||||||
else if processorstr='alpha' then
|
|
||||||
ppcbin:='ppcapx'
|
|
||||||
else if processorstr='powerpc' then
|
|
||||||
ppcbin:='ppcppc'
|
|
||||||
else error('Illegal processor type "'+processorstr+'"');
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
ppccommandline:=ppccommandline+s+' ';
|
begin
|
||||||
|
if pos('-P',s)=1 then
|
||||||
|
begin
|
||||||
|
processorstr:=copy(s,3,length(s)-2);
|
||||||
|
{ -PB is a special code that will show the
|
||||||
|
default compiler and exit immediatly. It's
|
||||||
|
main usage is for Makefile }
|
||||||
|
if processorstr='B' then
|
||||||
|
begin
|
||||||
|
{ report the full name of the ppcbin }
|
||||||
|
findexe(ppcbin);
|
||||||
|
writeln(ppcbin);
|
||||||
|
halt(0);
|
||||||
|
end
|
||||||
|
{ -PP is a special code that will show the
|
||||||
|
processor and exit immediatly. It's
|
||||||
|
main usage is for Makefile }
|
||||||
|
else if processorstr='P' then
|
||||||
|
begin
|
||||||
|
{ report the processor }
|
||||||
|
writeln(processorname);
|
||||||
|
halt(0);
|
||||||
|
end
|
||||||
|
else if processorstr='i386' then
|
||||||
|
ppcbin:='ppc386'
|
||||||
|
else if processorstr='m68k' then
|
||||||
|
ppcbin:='ppc68k'
|
||||||
|
else if processorstr='alpha' then
|
||||||
|
ppcbin:='ppcapx'
|
||||||
|
else if processorstr='powerpc' then
|
||||||
|
ppcbin:='ppcppc'
|
||||||
|
else error('Illegal processor type "'+processorstr+'"');
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ppccommandline:=ppccommandline+s+' ';
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if versionstr<>'' then
|
||||||
|
ppcbin:=ppcbin+'-'+versionstr;
|
||||||
{ find the full path to the specified exe }
|
{ find the full path to the specified exe }
|
||||||
findexe(ppcbin);
|
findexe(ppcbin);
|
||||||
|
|
||||||
@ -161,7 +170,10 @@ program fpc;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.5 2003-04-08 16:01:40 peter
|
Revision 1.6 2003-09-30 11:24:59 marco
|
||||||
|
* -V support
|
||||||
|
|
||||||
|
Revision 1.5 2003/04/08 16:01:40 peter
|
||||||
* amiga has also no .exe
|
* amiga has also no .exe
|
||||||
|
|
||||||
Revision 1.4 2002/05/18 13:34:27 peter
|
Revision 1.4 2002/05/18 13:34:27 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user