mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-03 10:58:03 +01:00
added debugging for FPC Src Scan
git-svn-id: trunk@5424 -
This commit is contained in:
parent
3fa3ca063d
commit
6d336f79e0
@ -48,6 +48,7 @@ unit DefineTemplates;
|
|||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
{ $Define VerboseDefineCache}
|
{ $Define VerboseDefineCache}
|
||||||
|
{ $Define VerboseFPCSrcScan}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
@ -2985,7 +2986,9 @@ var
|
|||||||
i: integer;
|
i: integer;
|
||||||
DefaultMacroCount: integer;
|
DefaultMacroCount: integer;
|
||||||
begin
|
begin
|
||||||
//writeln('Browse ',ADirPath);
|
{$IFDEF VerboseFPCSrcScan}
|
||||||
|
writeln('Browse ',ADirPath);
|
||||||
|
{$ENDIF}
|
||||||
if ADirPath='' then exit;
|
if ADirPath='' then exit;
|
||||||
if not (ADirPath[length(ADirPath)]=PathDelim) then
|
if not (ADirPath[length(ADirPath)]=PathDelim) then
|
||||||
ADirPath:=ADirPath+PathDelim;
|
ADirPath:=ADirPath+PathDelim;
|
||||||
@ -3086,7 +3089,13 @@ var
|
|||||||
// search
|
// search
|
||||||
if AnUnitName='' then exit;
|
if AnUnitName='' then exit;
|
||||||
UnitLink:=FindUnitLink(AnUnitName);
|
UnitLink:=FindUnitLink(AnUnitName);
|
||||||
//writeln('AddFPCSourceLinkForUnit ',AnUnitName,' ',UnitLink<>nil);
|
{$IFDEF VerboseFPCSrcScan}
|
||||||
|
write('AddFPCSourceLinkForUnit ',AnUnitName,' ');
|
||||||
|
if UnitLink<>nil then
|
||||||
|
writeln(' -> ',UnitLink.Filename)
|
||||||
|
else
|
||||||
|
writeln('MISSING');
|
||||||
|
{$ENDIF}
|
||||||
if UnitLink=nil then exit;
|
if UnitLink=nil then exit;
|
||||||
s:=AnUnitName+' '+UnitLink.Filename+LineEnding;
|
s:=AnUnitName+' '+UnitLink.Filename+LineEnding;
|
||||||
UnitLinkList:=UnitLinkList+s;
|
UnitLinkList:=UnitLinkList+s;
|
||||||
@ -3118,13 +3127,17 @@ var
|
|||||||
inc(PathEnd);
|
inc(PathEnd);
|
||||||
if PathEnd>PathStart then begin
|
if PathEnd>PathStart then begin
|
||||||
ADirPath:=copy(UnitSearchPath,PathStart,PathEnd-PathStart);
|
ADirPath:=copy(UnitSearchPath,PathStart,PathEnd-PathStart);
|
||||||
//writeln('FindStandardPPUSources A ',ADirPath);
|
{$IFDEF VerboseFPCSrcScan}
|
||||||
|
writeln('FindStandardPPUSources Searching ',CurMask,' in ',ADirPath);
|
||||||
|
{$ENDIF}
|
||||||
// search all ppu files in this directory
|
// search all ppu files in this directory
|
||||||
if FindFirst(ADirPath+CurMask,faAnyFile,FileInfo)=0 then begin
|
if FindFirst(ADirPath+CurMask,faAnyFile,FileInfo)=0 then begin
|
||||||
repeat
|
repeat
|
||||||
UnitName:=ExtractFileName(FileInfo.Name);
|
UnitName:=ExtractFileName(FileInfo.Name);
|
||||||
UnitName:=copy(UnitName,1,length(UnitName)-4);
|
UnitName:=copy(UnitName,1,length(UnitName)-4);
|
||||||
//writeln('FindStandardPPUSources B ',UnitName);
|
{$IFDEF VerboseFPCSrcScan}
|
||||||
|
writeln('FindStandardPPUSources Found: ',UnitName);
|
||||||
|
{$ENDIF}
|
||||||
AddFPCSourceLinkForUnit(UnitName);
|
AddFPCSourceLinkForUnit(UnitName);
|
||||||
until FindNext(FileInfo)<>0;
|
until FindNext(FileInfo)<>0;
|
||||||
end;
|
end;
|
||||||
@ -3147,7 +3160,9 @@ var
|
|||||||
FCLDBInterbaseDir: TDefineTemplate;
|
FCLDBInterbaseDir: TDefineTemplate;
|
||||||
SrcPathMacro: String;
|
SrcPathMacro: String;
|
||||||
begin
|
begin
|
||||||
//writeln('CreateFPCSrcTemplate ',FPCSrcDir,': ',length(UnitSearchPath),' Valid=',UnitLinkListValid,' PPUExt=',PPUExt);
|
{$IFDEF VerboseFPCSrcScan}
|
||||||
|
writeln('CreateFPCSrcTemplate ',FPCSrcDir,': ',length(UnitSearchPath),' Valid=',UnitLinkListValid,' PPUExt=',PPUExt);
|
||||||
|
{$ENDIF}
|
||||||
Result:=nil;
|
Result:=nil;
|
||||||
if (FPCSrcDir='') or (not DirPathExists(FPCSrcDir)) then exit;
|
if (FPCSrcDir='') or (not DirPathExists(FPCSrcDir)) then exit;
|
||||||
DS:=PathDelim;
|
DS:=PathDelim;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user