mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 15:29:25 +02:00
* If a found package seems to contain the source of the package, check if the
package is compiled earlier and when that's the case include it's unit output directory. Usefull if more packages are being compiled manually, without installing each package. git-svn-id: trunk@17213 -
This commit is contained in:
parent
ef4ce51d24
commit
103867412a
@ -4462,6 +4462,7 @@ end;
|
||||
function TBuildEngine.CheckExternalPackage(Const APackageName : String):TPackage;
|
||||
var
|
||||
S : String;
|
||||
F : String;
|
||||
I : Integer;
|
||||
begin
|
||||
// Already checked?
|
||||
@ -4481,11 +4482,25 @@ begin
|
||||
Log(vldebug, SDbgExternalDependency, [APackageName,S]);
|
||||
Result.FTargetState:=tsInstalled;
|
||||
// Load unit config if it exists
|
||||
S:=IncludeTrailingPathDelimiter(S)+UnitConfigFile;
|
||||
if FileExists(S) then
|
||||
F:=IncludeTrailingPathDelimiter(S)+UnitConfigFile;
|
||||
if FileExists(F) then
|
||||
begin
|
||||
Log(vlDebug, Format(SDbgLoading, [S]));
|
||||
Result.LoadUnitConfigFromFile(S);
|
||||
Log(vlDebug, Format(SDbgLoading, [F]));
|
||||
Result.LoadUnitConfigFromFile(F);
|
||||
end
|
||||
else if FileExists(IncludeTrailingPathDelimiter(S)+FPMakePPFile) then
|
||||
begin
|
||||
// The package is not installed, but the source-path is given.
|
||||
// It is an external package so it is impossible to compile it, so
|
||||
// assume that it has been compiled earlier.
|
||||
F := IncludeTrailingPathDelimiter(Result.UnitDir) + Result.GetUnitsOutputDir(Defaults.CPU,Defaults.OS);
|
||||
// If the unit-directory does not exist, you know for sure that
|
||||
// the package is not compiled
|
||||
if DirectoryExists(F) then
|
||||
begin
|
||||
Result.UnitDir := F;
|
||||
Result.FTargetState:=tsCompiled;
|
||||
end;
|
||||
end;
|
||||
// Check recursive implicit dependencies
|
||||
CompileDependencies(Result);
|
||||
|
Loading…
Reference in New Issue
Block a user