mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 08:09:28 +02:00
* Write 'Done' when compiling succeeded
* Add the package-path of a dependency to the command line also when it was not necessary to compile the dependency * Show a warning when a dependency on a package is added to a target, because such dependencies are ignored * When a package is not available for a platform, but nevertheless a dependency on it is added, give a warning and ignore the package * When a package is already processed for an earlier dependency, do not fail but give a notice git-svn-id: trunk@15147 -
This commit is contained in:
parent
d6c514b6db
commit
fe85ed0345
@ -991,8 +991,12 @@ ResourceString
|
|||||||
SWarnSourceFileNotFound = 'Warning: Source file "%s" from package %s not found for %s';
|
SWarnSourceFileNotFound = 'Warning: Source file "%s" from package %s not found for %s';
|
||||||
SWarnIncludeFileNotFound = 'Warning: Include file "%s" from package %s not found for %s';
|
SWarnIncludeFileNotFound = 'Warning: Include file "%s" from package %s not found for %s';
|
||||||
SWarnDepUnitNotFound = 'Warning: Dependency on unit %s is not supported for %s';
|
SWarnDepUnitNotFound = 'Warning: Dependency on unit %s is not supported for %s';
|
||||||
|
SWarnTargetDependsOnPackage = 'Warning: Target %s of package %s depends on another package (%s). These kind of dependencies are not processed';
|
||||||
|
SWarnDependOnOtherPlatformPackage = 'Warning: Package %s depends on package %s which is not available for the %s platform';
|
||||||
|
SWarnDone = 'Done';
|
||||||
|
|
||||||
SInfoCompilingPackage = 'Compiling package %s';
|
SInfoCompilingPackage = 'Compiling package %s';
|
||||||
|
SInfoPackageAlreadyProcessed = 'Package %s is already processed';
|
||||||
SInfoCompilingTarget = 'Compiling target %s';
|
SInfoCompilingTarget = 'Compiling target %s';
|
||||||
SInfoExecutingCommand = 'Executing command "%s %s"';
|
SInfoExecutingCommand = 'Executing command "%s %s"';
|
||||||
SInfoCreatingOutputDir = 'Creating output dir "%s"';
|
SInfoCreatingOutputDir = 'Creating output dir "%s"';
|
||||||
@ -2931,6 +2935,7 @@ procedure TCustomInstaller.Compile(Force: Boolean);
|
|||||||
begin
|
begin
|
||||||
FBuildEngine.ForceCompile:=Force;
|
FBuildEngine.ForceCompile:=Force;
|
||||||
FBuildEngine.Compile(FPackages);
|
FBuildEngine.Compile(FPackages);
|
||||||
|
Log(vlWarning,SWarnDone);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -3528,7 +3533,7 @@ begin
|
|||||||
// - LocalUnitDir
|
// - LocalUnitDir
|
||||||
// - GlobalUnitDir
|
// - GlobalUnitDir
|
||||||
if (APackage.UnitDir='') and
|
if (APackage.UnitDir='') and
|
||||||
(APackage.State=tsCompiled) then
|
(APackage.State in [tsCompiled, tsNoCompile]) then
|
||||||
begin
|
begin
|
||||||
APackage.UnitDir:=IncludeTrailingPathDelimiter(FStartDir)+IncludeTrailingPathDelimiter(APackage.Directory)+APackage.GetUnitsOutputDir(Defaults.CPU,Defaults.OS);
|
APackage.UnitDir:=IncludeTrailingPathDelimiter(FStartDir)+IncludeTrailingPathDelimiter(APackage.Directory)+APackage.GetUnitsOutputDir(Defaults.CPU,Defaults.OS);
|
||||||
end;
|
end;
|
||||||
@ -3825,6 +3830,10 @@ begin
|
|||||||
if D.TargetFileName<>'' then
|
if D.TargetFileName<>'' then
|
||||||
Result:=FileNewer(D.TargetFileName,OFN)
|
Result:=FileNewer(D.TargetFileName,OFN)
|
||||||
end;
|
end;
|
||||||
|
depPackage :
|
||||||
|
begin
|
||||||
|
log(vlWarning,SWarnTargetDependsOnPackage,[ATarget.Name, APackage.Name, d.Value]);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
if result then
|
if result then
|
||||||
break;
|
break;
|
||||||
@ -3866,7 +3875,9 @@ begin
|
|||||||
For I:=0 to ATarget.Dependencies.Count-1 do
|
For I:=0 to ATarget.Dependencies.Count-1 do
|
||||||
begin
|
begin
|
||||||
D:=ATarget.Dependencies[i];
|
D:=ATarget.Dependencies[i];
|
||||||
if (D.DependencyType=depUnit) and
|
if (D.DependencyType=depPackage) then
|
||||||
|
log(vlWarning,SWarnTargetDependsOnPackage,[ATarget.Name, APackage.Name, d.Value])
|
||||||
|
else if (D.DependencyType=depUnit) and
|
||||||
(Defaults.CPU in D.CPUs) and (Defaults.OS in D.OSes) then
|
(Defaults.CPU in D.CPUs) and (Defaults.OS in D.OSes) then
|
||||||
begin
|
begin
|
||||||
T:=TTarget(D.Target);
|
T:=TTarget(D.Target);
|
||||||
@ -4024,12 +4035,17 @@ begin
|
|||||||
P:=TPackage(D.Target);
|
P:=TPackage(D.Target);
|
||||||
If Assigned(P) then
|
If Assigned(P) then
|
||||||
begin
|
begin
|
||||||
case P.State of
|
if (Defaults.CPU in P.CPUs) and (Defaults.OS in P.OSes) then
|
||||||
tsNeutral :
|
begin
|
||||||
MaybeCompile(P);
|
case P.State of
|
||||||
tsConsidering :
|
tsNeutral :
|
||||||
Log(vlWarning,SWarnCircularPackageDependency,[APackage.Name,P.Name]);
|
MaybeCompile(P);
|
||||||
end;
|
tsConsidering :
|
||||||
|
Log(vlWarning,SWarnCircularPackageDependency,[APackage.Name,P.Name]);
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Log(vlWarning,SWarnDependOnOtherPlatformPackage,[APackage.Name, D.Value, MakeTargetString(Defaults.CPU, Defaults.OS)]);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -4089,6 +4105,11 @@ end;
|
|||||||
|
|
||||||
procedure TBuildEngine.MaybeCompile(APackage: TPackage);
|
procedure TBuildEngine.MaybeCompile(APackage: TPackage);
|
||||||
begin
|
begin
|
||||||
|
if APackage.State in [tsCompiled, tsNoCompile] then
|
||||||
|
begin
|
||||||
|
Log(vlInfo,SInfoPackageAlreadyProcessed,[APackage.Name]);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
if APackage.State<>tsNeutral then
|
if APackage.State<>tsNeutral then
|
||||||
Error(SErrInvalidState,[APackage.Name]);
|
Error(SErrInvalidState,[APackage.Name]);
|
||||||
Log(vlDebug,SDbgConsideringPackage,[APackage.Name]);
|
Log(vlDebug,SDbgConsideringPackage,[APackage.Name]);
|
||||||
|
Loading…
Reference in New Issue
Block a user