mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 18:59:11 +02:00
* Do not rebuild all dependees on each call to fppkg, but only once after building finished
git-svn-id: trunk@59769 -
This commit is contained in:
parent
7df91e979a
commit
83ba175df4
@ -209,6 +209,7 @@ type
|
|||||||
FTree: TAVLTree; // sorted tree of TLazPackage
|
FTree: TAVLTree; // sorted tree of TLazPackage
|
||||||
FUpdateLock: integer;
|
FUpdateLock: integer;
|
||||||
FLockedChangeStamp: int64;
|
FLockedChangeStamp: int64;
|
||||||
|
FHasCompiledFpmakePackages: Boolean;
|
||||||
FVerbosity: TPkgVerbosityFlags;
|
FVerbosity: TPkgVerbosityFlags;
|
||||||
FFindFileCache: TLazPackageGraphFileCache;
|
FFindFileCache: TLazPackageGraphFileCache;
|
||||||
function CreateDefaultPackage: TLazPackage;
|
function CreateDefaultPackage: TLazPackage;
|
||||||
@ -1161,6 +1162,7 @@ begin
|
|||||||
if FUpdateLock=1 then begin
|
if FUpdateLock=1 then begin
|
||||||
fChanged:=Change;
|
fChanged:=Change;
|
||||||
FLockedChangeStamp:=0;
|
FLockedChangeStamp:=0;
|
||||||
|
FHasCompiledFpmakePackages := False;
|
||||||
if Assigned(OnBeginUpdate) then OnBeginUpdate(Self);
|
if Assigned(OnBeginUpdate) then OnBeginUpdate(Self);
|
||||||
end else
|
end else
|
||||||
fChanged:=fChanged or Change;
|
fChanged:=fChanged or Change;
|
||||||
@ -4217,7 +4219,10 @@ begin
|
|||||||
WarnSuspiciousCompilerOptions('Compile checks','package '+APackage.IDAsString+':',CompilerParams);
|
WarnSuspiciousCompilerOptions('Compile checks','package '+APackage.IDAsString+':',CompilerParams);
|
||||||
end else begin
|
end else begin
|
||||||
CompilerFilename:='fppkg';
|
CompilerFilename:='fppkg';
|
||||||
EffectiveCompilerParams:='install -b';
|
EffectiveCompilerParams:='install --skipbroken --broken';
|
||||||
|
// Do not recompile all broken fppkg packages on each package that is
|
||||||
|
// installed, but run 'fppkg fixbroken' once.
|
||||||
|
FHasCompiledFpmakePackages := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ExtToolData:=TLazPkgGraphExtToolData.Create(IDEToolCompilePackage,
|
ExtToolData:=TLazPkgGraphExtToolData.Create(IDEToolCompilePackage,
|
||||||
@ -4266,8 +4271,32 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// run compilation tool 'After'
|
|
||||||
if not (pcfDoNotCompilePackage in Flags) then begin
|
if not (pcfDoNotCompilePackage in Flags) then begin
|
||||||
|
if FHasCompiledFpmakePackages and (BuildItem = nil) then begin
|
||||||
|
// Make sure all dependees of changed FPMake-packages are
|
||||||
|
// recompiled
|
||||||
|
|
||||||
|
PkgCompileTool := ExternalToolList.Add('Recompile and install broken Fppkg packages');
|
||||||
|
PkgCompileTool.Reference(Self,Classname);
|
||||||
|
|
||||||
|
FPCParser:=TFPCParser(PkgCompileTool.AddParsers(SubToolFPC));
|
||||||
|
FPCParser.HideHintsSenderNotUsed:=not APackage.CompilerOptions.ShowHintsForSenderNotUsed;
|
||||||
|
FPCParser.HideHintsUnitNotUsedInMainSource:=not APackage.CompilerOptions.ShowHintsForUnusedUnitsInMainSrc;
|
||||||
|
PkgCompileTool.Process.CurrentDirectory:=APackage.Directory;
|
||||||
|
PkgCompileTool.Process.Executable:='fppkg';
|
||||||
|
PkgCompileTool.CmdLineParams:='fixbroken';
|
||||||
|
PkgCompileTool.Hint:='Check for Fppkg packages that depend on just installed packages and recompile them';
|
||||||
|
|
||||||
|
PkgCompileTool.Execute();
|
||||||
|
PkgCompileTool.WaitForExit;
|
||||||
|
if PkgCompileTool.ErrorMessage<>'' then begin
|
||||||
|
DebugLn(['Error: (lazarus) [TLazPackageGraph.CompilePackage] Fppkg FixBroken failed']);
|
||||||
|
// Note: messages window already contains error message
|
||||||
|
exit(mrCancel);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// run compilation tool 'After'
|
||||||
WorkingDir:=APackage.Directory;
|
WorkingDir:=APackage.Directory;
|
||||||
ToolTitle:='Package '+APackage.IDAsString+': '+lisExecutingCommandAfter;
|
ToolTitle:='Package '+APackage.IDAsString+': '+lisExecutingCommandAfter;
|
||||||
if BuildItem<>nil then
|
if BuildItem<>nil then
|
||||||
|
Loading…
Reference in New Issue
Block a user