summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2006-01-08 15:52:30 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2006-01-08 15:52:30 +0000
commit110720611c7d2ab9d44bdfd22fc0e360daf3ceb9 (patch)
tree4c0c1eb05de211587a076e4eba0efeb84cfbeb93 /compiler/utils
parentd984ee3acad7bea2977f9616e59d71d97e43a7c9 (diff)
downloadfpc-110720611c7d2ab9d44bdfd22fc0e360daf3ceb9.tar.gz
+ added option -i<path> for input path
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@2226 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/ppumove.pp21
1 files changed, 13 insertions, 8 deletions
diff --git a/compiler/utils/ppumove.pp b/compiler/utils/ppumove.pp
index 44f1e0fcc9..ecf11fbaa0 100644
--- a/compiler/utils/ppumove.pp
+++ b/compiler/utils/ppumove.pp
@@ -36,7 +36,7 @@ const
Title = 'PPU-Mover';
Copyright = 'Copyright (c) 1998-2005 by the Free Pascal Development Team';
- ShortOpts = 'o:e:d:qhsvbw';
+ ShortOpts = 'o:e:d:i:qhsvbw';
BufSize = 4096;
PPUExt = 'ppu';
ObjExt = 'o';
@@ -67,6 +67,7 @@ Var
ArBin,LDBin,StripBin,
OutputFile,
OutputFileForLink, { the name of the output file needed when linking }
+ InputPath,
DestPath,
PPLExt,
LibExt : string;
@@ -422,13 +423,13 @@ var
{$endif}
begin
{$ifdef unix}
- DoFile:=DoPPU(FileName,ForceExtension(FileName,PPLExt));
+ DoFile:=DoPPU(InputPath+FileName,InputPath+ForceExtension(FileName,PPLExt));
{$else}
DoFile:=false;
findfirst(filename,$20,dir);
while doserror=0 do
begin
- if not DoPPU(Dir.Name,ForceExtension(Dir.Name,PPLExt)) then
+ if not DoPPU(InputPath+Dir.Name,InputPath+ForceExtension(Dir.Name,PPLExt)) then
exit;
findnext(dir);
end;
@@ -440,11 +441,10 @@ end;
Procedure DoLink;
{
- Link the object files together to form a (shared) library, the only
- problem here is the 255 char limit of Names
+ Link the object files together to form a (shared) library
}
Var
- Names : String;
+ Names : ansistring;
f : file;
Err : boolean;
P : PLinkOEnt;
@@ -456,9 +456,9 @@ begin
While p<>nil do
begin
if Names<>'' then
- Names:=Names+' '+P^.name
+ Names:=Names+' '+InputPath+P^.name
else
- Names:=p^.Name;
+ Names:=InputPath+p^.Name;
p:=p^.next;
end;
if Names='' then
@@ -530,6 +530,11 @@ begin
'S' : MakeStatic:=True;
'o' : OutputFile:=OptArg;
'd' : DestPath:=OptArg;
+ 'i' : begin
+ InputPath:=OptArg;
+ if InputPath[length(InputPath)]<>DirectorySeparator then
+ InputPath:=InputPath+DirectorySeparator;
+ end;
'e' : PPLext:=OptArg;
'q' : Quiet:=True;
'w' : begin