mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 23:39:24 +02:00
IDE: fixed comparing makefile.compiled options
git-svn-id: trunk@28986 -
This commit is contained in:
parent
958af62b2f
commit
a8f7d54b4c
@ -2695,9 +2695,6 @@ begin
|
|||||||
// unit path
|
// unit path
|
||||||
CurUnitPath:=GetUnitPath(not (ccloAbsolutePaths in Flags));
|
CurUnitPath:=GetUnitPath(not (ccloAbsolutePaths in Flags));
|
||||||
//debugln('TBaseCompilerOptions.MakeOptionsString A ',dbgsName(Self),' CurUnitPath="',CurUnitPath,'"');
|
//debugln('TBaseCompilerOptions.MakeOptionsString A ',dbgsName(Self),' CurUnitPath="',CurUnitPath,'"');
|
||||||
// always add the current directory to the unit path, so that the compiler
|
|
||||||
// checks for changed files in the directory
|
|
||||||
CurUnitPath:=MergeSearchPaths(CurUnitPath,'.');
|
|
||||||
switches := switches + ' ' + ConvertSearchPathToCmdLine('-Fu', CurUnitPath);
|
switches := switches + ' ' + ConvertSearchPathToCmdLine('-Fu', CurUnitPath);
|
||||||
|
|
||||||
{ CompilerPath - Nothing needs to be done with this one }
|
{ CompilerPath - Nothing needs to be done with this one }
|
||||||
|
@ -459,7 +459,7 @@ begin
|
|||||||
Path:=copy(Reduced,StartPos+3,EndPos-StartPos-3);
|
Path:=copy(Reduced,StartPos+3,EndPos-StartPos-3);
|
||||||
if (Path<>'') and (Path[1] in ['''','"']) then
|
if (Path<>'') and (Path[1] in ['''','"']) then
|
||||||
Path:=AnsiDequotedStr(Path,Path[1]);
|
Path:=AnsiDequotedStr(Path,Path[1]);
|
||||||
case CompParams[StartPos+2] of
|
case Reduced[StartPos+2] of
|
||||||
'u': AddSearchPath('UnitPath');
|
'u': AddSearchPath('UnitPath');
|
||||||
'U': AllPaths.Values['UnitOutputDir']:=Path;
|
'U': AllPaths.Values['UnitOutputDir']:=Path;
|
||||||
'i': AddSearchPath('IncPath');
|
'i': AddSearchPath('IncPath');
|
||||||
@ -3160,6 +3160,7 @@ begin
|
|||||||
try
|
try
|
||||||
CurPaths:=ExtractSearchPathsFromFPCParams(CompilerParams,true);
|
CurPaths:=ExtractSearchPathsFromFPCParams(CompilerParams,true);
|
||||||
LastPaths:=ExtractSearchPathsFromFPCParams(LastParams,true);
|
LastPaths:=ExtractSearchPathsFromFPCParams(LastParams,true);
|
||||||
|
//debugln(['TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile CompilerParams="',CompilerParams,'" UnitPaths="',CurPaths.Values['UnitPath'],'"']);
|
||||||
// compare custom options
|
// compare custom options
|
||||||
OldValue:=LastPaths.Values['Reduced'];
|
OldValue:=LastPaths.Values['Reduced'];
|
||||||
NewValue:=CurPaths.Values['Reduced'];
|
NewValue:=CurPaths.Values['Reduced'];
|
||||||
@ -3171,8 +3172,8 @@ begin
|
|||||||
exit(mrYes);
|
exit(mrYes);
|
||||||
end;
|
end;
|
||||||
// compare unit paths
|
// compare unit paths
|
||||||
OldValue:=TrimSearchPath(LastPaths.Values['UnitPath'],APackage.Directory);
|
OldValue:=TrimSearchPath(LastPaths.Values['UnitPath'],APackage.Directory,true);
|
||||||
NewValue:=TrimSearchPath(CurPaths.Values['UnitPath'],APackage.Directory);
|
NewValue:=TrimSearchPath(CurPaths.Values['UnitPath'],APackage.Directory,true);
|
||||||
if NewValue<>OldValue then begin
|
if NewValue<>OldValue then begin
|
||||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compiler unit paths changed for ',APackage.IDAsString);
|
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compiler unit paths changed for ',APackage.IDAsString);
|
||||||
DebugLn(' Old="',OldValue,'"');
|
DebugLn(' Old="',OldValue,'"');
|
||||||
@ -3181,8 +3182,8 @@ begin
|
|||||||
exit(mrYes);
|
exit(mrYes);
|
||||||
end;
|
end;
|
||||||
// compare include paths
|
// compare include paths
|
||||||
OldValue:=TrimSearchPath(LastPaths.Values['IncPath'],APackage.Directory);
|
OldValue:=TrimSearchPath(LastPaths.Values['IncPath'],APackage.Directory,true);
|
||||||
NewValue:=TrimSearchPath(CurPaths.Values['IncPath'],APackage.Directory);
|
NewValue:=TrimSearchPath(CurPaths.Values['IncPath'],APackage.Directory,true);
|
||||||
if NewValue<>OldValue then begin
|
if NewValue<>OldValue then begin
|
||||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compiler include paths changed for ',APackage.IDAsString);
|
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compiler include paths changed for ',APackage.IDAsString);
|
||||||
DebugLn(' Old="',OldValue,'"');
|
DebugLn(' Old="',OldValue,'"');
|
||||||
@ -3361,7 +3362,7 @@ begin
|
|||||||
CompilerFilename:=APackage.GetCompilerFilename;
|
CompilerFilename:=APackage.GetCompilerFilename;
|
||||||
// Note: use absolute paths, because some external tools resolve symlinked directories
|
// Note: use absolute paths, because some external tools resolve symlinked directories
|
||||||
CompilerParams:=GetCompilerParams;
|
CompilerParams:=GetCompilerParams;
|
||||||
//DebugLn(['TLazPackageGraph.CompilePackage SrcFilename="',SrcFilename,'" CompilerFilename="',CompilerFilename,'" CompilerParams="',CompilerParams,'" TargetCPU=',Globals.TargetCPU,' TargetOS=',Globals.TargetOS]);
|
//DebugLn(['TLazPackageGraph.CompilePackage SrcFilename="',SrcFilename,'" CompilerFilename="',CompilerFilename,'" CompilerParams="',CompilerParams,'"']);
|
||||||
|
|
||||||
// check if compilation is needed and if a clean build is needed
|
// check if compilation is needed and if a clean build is needed
|
||||||
Result:=CheckIfPackageNeedsCompilation(APackage,
|
Result:=CheckIfPackageNeedsCompilation(APackage,
|
||||||
@ -3670,7 +3671,7 @@ begin
|
|||||||
UnitPath:=APackage.CompilerOptions.GetUnitPath(true,
|
UnitPath:=APackage.CompilerOptions.GetUnitPath(true,
|
||||||
coptParsedPlatformIndependent);
|
coptParsedPlatformIndependent);
|
||||||
IncPath:=APackage.CompilerOptions.GetIncludePath(true,
|
IncPath:=APackage.CompilerOptions.GetIncludePath(true,
|
||||||
coptParsedPlatformIndependent);
|
coptParsedPlatformIndependent,false);
|
||||||
UnitOutputPath:=APackage.CompilerOptions.GetUnitOutPath(true,
|
UnitOutputPath:=APackage.CompilerOptions.GetUnitOutPath(true,
|
||||||
coptParsedPlatformIndependent);
|
coptParsedPlatformIndependent);
|
||||||
CustomOptions:=APackage.CompilerOptions.GetCustomOptions(
|
CustomOptions:=APackage.CompilerOptions.GetCustomOptions(
|
||||||
|
Loading…
Reference in New Issue
Block a user