Explorar o código

* In the case that there is no object-file for a unit, do not try to install it. Bug #21230, patch by Sergei

git-svn-id: trunk@23021 -
joost %!s(int64=13) %!d(string=hai) anos
pai
achega
87bb1fe33e
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      packages/fpmkunit/src/fpmkunit.pp

+ 2 - 1
packages/fpmkunit/src/fpmkunit.pp

@@ -6886,7 +6886,8 @@ end;
 
 
 procedure TTarget.GetInstallFiles(List: TStrings; const APrefixU, APrefixB: String; ACPU: TCPU; AOS : TOS);
 procedure TTarget.GetInstallFiles(List: TStrings; const APrefixU, APrefixB: String; ACPU: TCPU; AOS : TOS);
 begin
 begin
-  If Not (TargetType in [ttProgram,ttExampleProgram]) then
+  If Not (TargetType in [ttProgram,ttExampleProgram]) and FileExists(APrefixU + ObjectFileName) then
+    // The compiler does not create an objectfile for all programs.
     List.Add(APrefixU + ObjectFileName);
     List.Add(APrefixU + ObjectFileName);
   If (TargetType in [ttUnit,ttImplicitUnit,ttExampleUnit]) then
   If (TargetType in [ttUnit,ttImplicitUnit,ttExampleUnit]) then
     begin
     begin