Browse Source

patch from Darius Blaszijk
- implements Defaults.NoFPCCfg in TBuildEngine.GetCompilerCommand
- added ttCleanOnlyUnit in TTarget.GetCleanFiles
- fixes a dirty little bug in TBuildEngine.GetCompilerCommand (compile filename)

git-svn-id: trunk@9311 -

peter 17 years ago
parent
commit
044ef8b982
1 changed files with 8 additions and 3 deletions
  1. 8 3
      packages/fpmkunit/src/fpmkunit.pp

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

@@ -3326,7 +3326,12 @@ Var
 begin
   PD:=GetPackageDir(APackage,True);
 
-  Result := '-n';
+  Result := '';
+
+  //compiler configuration
+  if Defaults.NoFPCCfg then
+    Result := '-n';
+
   // Compile mode
   If Target.Mode<>cmFPC then
     Result:=Result+' -M'+ModeToString(Target.Mode)
@@ -3366,7 +3371,7 @@ begin
   If (Target.Options<>'') then
     Result:=Result+' '+Target.Options;
   // Add Filename to compile
-  Result:=Result+' '+Target.FullSourceFileName;
+  Result:=Result+' '+ExtractRelativePath(PD, ExpandFileName(Target.FullSourceFileName));
 end;
 
 
@@ -4128,7 +4133,7 @@ begin
   If not(ACPU in CPUs) or not(AOS in OSes) then
     exit;
   List.Add(APrefixU + ObjectFileName);
-  If (TargetType in [ttUnit,ttImplicitUnit,ttExampleUnit]) then
+  If (TargetType in [ttUnit,ttImplicitUnit,ttExampleUnit, ttCleanOnlyUnit]) then
     List.Add(APrefixU + UnitFileName)
   else If (TargetType in [ttProgram,ttExampleProgram]) then
     List.Add(APrefixB + GetProgramFileName(AOS));