|
@@ -187,7 +187,7 @@ interface
|
|
points to the module calling it. It is nil for the first compiled
|
|
points to the module calling it. It is nil for the first compiled
|
|
module. This allow inheritence of all path lists. MUST pay attention
|
|
module. This allow inheritence of all path lists. MUST pay attention
|
|
to that when creating link.res!!!!(mazen)}
|
|
to that when creating link.res!!!!(mazen)}
|
|
- constructor create(LoadedFrom:TModule;const s:string;_is_unit:boolean);
|
|
|
|
|
|
+ constructor create(LoadedFrom:TModule;const amodulename,afilename:string;_is_unit:boolean);
|
|
destructor destroy;override;
|
|
destructor destroy;override;
|
|
procedure reset;virtual;
|
|
procedure reset;virtual;
|
|
procedure adddependency(callermodule:tmodule);
|
|
procedure adddependency(callermodule:tmodule);
|
|
@@ -467,24 +467,31 @@ implementation
|
|
TMODULE
|
|
TMODULE
|
|
****************************************************************************}
|
|
****************************************************************************}
|
|
|
|
|
|
- constructor tmodule.create(LoadedFrom:TModule;const s:string;_is_unit:boolean);
|
|
|
|
|
|
+ constructor tmodule.create(LoadedFrom:TModule;const amodulename,afilename:string;_is_unit:boolean);
|
|
var
|
|
var
|
|
- n : string;
|
|
|
|
|
|
+ n,fn:string;
|
|
begin
|
|
begin
|
|
- n:=s;
|
|
|
|
|
|
+ if amodulename='' then
|
|
|
|
+ n:=ChangeFileExt(ExtractFileName(afilename),'')
|
|
|
|
+ else
|
|
|
|
+ n:=amodulename;
|
|
|
|
+ if afilename='' then
|
|
|
|
+ fn:=amodulename
|
|
|
|
+ else
|
|
|
|
+ fn:=afilename;
|
|
{ Programs have the name 'Program' to don't conflict with dup id's }
|
|
{ Programs have the name 'Program' to don't conflict with dup id's }
|
|
if _is_unit then
|
|
if _is_unit then
|
|
- inherited create(n)
|
|
|
|
|
|
+ inherited create(amodulename)
|
|
else
|
|
else
|
|
inherited create('Program');
|
|
inherited create('Program');
|
|
- mainsource:=stringdup(s);
|
|
|
|
|
|
+ mainsource:=stringdup(fn);
|
|
{ Dos has the famous 8.3 limit :( }
|
|
{ Dos has the famous 8.3 limit :( }
|
|
{$ifdef shortasmprefix}
|
|
{$ifdef shortasmprefix}
|
|
asmprefix:=stringdup(FixFileName('as'));
|
|
asmprefix:=stringdup(FixFileName('as'));
|
|
{$else}
|
|
{$else}
|
|
asmprefix:=stringdup(FixFileName(n));
|
|
asmprefix:=stringdup(FixFileName(n));
|
|
{$endif}
|
|
{$endif}
|
|
- setfilename(s,true);
|
|
|
|
|
|
+ setfilename(fn,true);
|
|
localunitsearchpath:=TSearchPathList.Create;
|
|
localunitsearchpath:=TSearchPathList.Create;
|
|
localobjectsearchpath:=TSearchPathList.Create;
|
|
localobjectsearchpath:=TSearchPathList.Create;
|
|
localincludesearchpath:=TSearchPathList.Create;
|
|
localincludesearchpath:=TSearchPathList.Create;
|