* $UNITPATH directive is now working

This commit is contained in:
mazen 2002-11-20 12:36:23 +00:00
parent 1d381958d4
commit 301bf08921
3 changed files with 82 additions and 64 deletions

View File

@ -107,7 +107,6 @@ interface
_exports : tlinkedlist;
externals : tlinkedlist; {Only for DLL scanners by using Unix-style $LINKLIB }
resourcefiles : tstringlist;
linkunitofiles,
linkunitstaticlibs,
linkunitsharedlibs,
@ -125,7 +124,11 @@ interface
asmprefix : pstring; { prefix for the smartlink asmfiles }
librarydata : tasmlibrarydata; { librarydata for this module }
constructor create(const s:string;_is_unit:boolean);
{create creates a new module which name is stored in 's'. LoadedFrom
points to the module calling it. It is nil for the first compiled
module. This allow inheritence of all path lists. MUST pay attention
to that when creating link.res!!!!(mazen)}
constructor create(LoadedFrom:TModule;const s:string;_is_unit:boolean);
destructor destroy;override;
procedure reset;virtual;
procedure numberunits;
@ -354,7 +357,7 @@ uses
TMODULE
****************************************************************************}
constructor tmodule.create(const s:string;_is_unit:boolean);
constructor tmodule.create(LoadedFrom:TModule;const s:string;_is_unit:boolean);
var
p : dirstr;
n : namestr;
@ -394,7 +397,7 @@ uses
map:=nil;
globalsymtable:=nil;
localsymtable:=nil;
loaded_from:=nil;
loaded_from:=LoadedFrom;
do_reload:=false;
unitcount:=1;
do_compile:=false;
@ -603,7 +606,10 @@ uses
end.
{
$Log$
Revision 1.28 2002-09-05 19:29:42 peter
Revision 1.29 2002-11-20 12:36:23 mazen
* $UNITPATH directive is now working
Revision 1.28 2002/09/05 19:29:42 peter
* memdebug enhancements
Revision 1.27 2002/08/16 15:31:08 peter

View File

@ -46,7 +46,7 @@ interface
crc_array2 : pointer;
crc_size2 : longint;
{$endif def Test_Double_checksum}
constructor create(const s:string;const fn:string;_is_unit:boolean);
constructor create(LoadedFrom:TModule;const s:string;const fn:string;_is_unit:boolean);
destructor destroy;override;
procedure reset;override;
function openppu:boolean;
@ -91,9 +91,9 @@ uses
TPPUMODULE
****************************************************************************}
constructor tppumodule.create(const s:string;const fn:string;_is_unit:boolean);
constructor tppumodule.create(LoadedFrom:TModule;const s:string;const fn:string;_is_unit:boolean);
begin
inherited create(s,_is_unit);
inherited create(LoadedFrom,s,_is_unit);
ppufile:=nil;
{ search the PPU file if it is an unit }
if is_unit then
@ -334,11 +334,17 @@ uses
SetFileName(hs,false);
end;
end;
if (not fnd) then
if(not fnd)and Assigned(Loaded_From)
then
fnd:=SearchPathList(Loaded_From.LocalUnitSearchPath);
if not fnd
then
fnd:=SourceSearchPath('.');
if (not fnd) then
if not fnd
then
fnd:=SearchPathList(LocalUnitSearchPath);
if (not fnd) then
if not fnd
then
fnd:=SearchPathList(UnitSearchPath);
{ try to find a file with the first 8 chars of the modulename, like
@ -1266,7 +1272,7 @@ uses
else
{ generates a new unit info record }
begin
current_module:=tppumodule.create(s,fn,true);
current_module:=tppumodule.create(old_current_module,s,fn,true);
second_time:=false;
end;
{ close old_current_ppu on system that are
@ -1319,7 +1325,10 @@ uses
end.
{
$Log$
Revision 1.26 2002-11-15 01:58:46 peter
Revision 1.27 2002-11-20 12:36:24 mazen
* $UNITPATH directive is now working
Revision 1.26 2002/11/15 01:58:46 peter
* merged changes from 1.0.7 up to 04-11
- -V option for generating bug report tracing
- more tracing for option parsing

View File

@ -388,7 +388,7 @@ implementation
current_module.reset
else
begin
current_module:=tppumodule.create(filename,'',false);
current_module:=tppumodule.create(nil,filename,'',false);
main_module:=current_module;
end;
@ -618,7 +618,10 @@ implementation
end.
{
$Log$
Revision 1.45 2002-10-07 19:29:52 peter
Revision 1.46 2002-11-20 12:36:24 mazen
* $UNITPATH directive is now working
Revision 1.45 2002/10/07 19:29:52 peter
* Place old data in compile() in the heap to save stack
Revision 1.44 2002/09/05 19:27:06 peter