Browse Source

* Fixed needscompile for target

git-svn-id: trunk@9062 -
michael 18 years ago
parent
commit
f67ee5c7c1
1 changed files with 8 additions and 7 deletions
  1. 8 7
      packages/fpmkunit/src/fpmkunit.pp

+ 8 - 7
packages/fpmkunit/src/fpmkunit.pp

@@ -1559,7 +1559,7 @@ begin
   // Detect compiler version/target from -i option
   infosl:=TStringList.Create;
   infosl.Delimiter:=' ';
-  infosl.DelimitedText:=GetCompilerInfo(FCompiler,'-iVTPTO');
+  infosl.DelimitedText:=GetCompilerInfo(GetCompiler,'-iVTPTO');
   if infosl.Count<>3 then
     Raise EInstallerError.Create(SErrInvalidFPCInfo);
   FCompilerVersion:=infosl[0];
@@ -2942,15 +2942,16 @@ Var
 
 begin
   Result:=False;
-  OD:=FCurrentOutputDir;
-  If (OD<>'') then
-    OD:=IncludeTrailingPathDelimiter(OD);
-  OFN:=OD+Target.GetOutPutFileName(Defaults.OS);
+  OFN:=Target.GetOutPutFileName(Defaults.OS);
 
   if Target.TargetType in ProgramTargets then
-    OFN := GetBinOutputDir(FCurrentPackage, True) + PathDelim + OFN
+    OD:=GetBinOutputDir(FCurrentPackage, True)
   else
-    OFN := GetUnitsOutputDir(FCurrentPackage, True) + PathDelim + OFN;
+    OD:=GetUnitsOutputDir(FCurrentPackage, True);
+
+  If (OD<>'') then
+    OD:=IncludeTrailingPathDelimiter(OD);
+  OFN:=OD+OFN;
 
   SD:=Target.Directory;
   If (SD<>'') then