mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 06:19:32 +02:00
lazbuild: reduced default verbosity
git-svn-id: trunk@48419 -
This commit is contained in:
parent
0763ff58d5
commit
b5fe30e1bb
@ -1098,6 +1098,7 @@ var
|
|||||||
LFMFilename: String;
|
LFMFilename: String;
|
||||||
IcoRes: TProjectIcon;
|
IcoRes: TProjectIcon;
|
||||||
aTargetFilename: String;
|
aTargetFilename: String;
|
||||||
|
DbgCap: String;
|
||||||
|
|
||||||
function EditorFileHasChanged: boolean;
|
function EditorFileHasChanged: boolean;
|
||||||
begin
|
begin
|
||||||
@ -1112,7 +1113,7 @@ var
|
|||||||
then begin
|
then begin
|
||||||
Result:=true;
|
Result:=true;
|
||||||
if ConsoleVerbosity>=0 then
|
if ConsoleVerbosity>=0 then
|
||||||
DebugLn('TMainIDE.CheckIfProjectNeedsCompilation Editor Unit in project''s unit path has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
|
DebugLn(DbgCap,'Editor Unit in project''s unit path has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
|
||||||
Note+='Editor unit "'+AnUnitInfo.Filename+'" in project''s unit search path is newer than state file:'+LineEnding
|
Note+='Editor unit "'+AnUnitInfo.Filename+'" in project''s unit search path is newer than state file:'+LineEnding
|
||||||
+' File age="'+FileAgeToStr(FileAgeCached(AnUnitInfo.Filename))+'"'+LineEnding
|
+' File age="'+FileAgeToStr(FileAgeCached(AnUnitInfo.Filename))+'"'+LineEnding
|
||||||
+' State file age="'+FileAgeToStr(StateFileAge)+'"'+LineEnding
|
+' State file age="'+FileAgeToStr(StateFileAge)+'"'+LineEnding
|
||||||
@ -1125,7 +1126,7 @@ var
|
|||||||
then begin
|
then begin
|
||||||
Result:=true;
|
Result:=true;
|
||||||
if ConsoleVerbosity>=0 then
|
if ConsoleVerbosity>=0 then
|
||||||
DebugLn('TMainIDE.CheckIfProjectNeedsCompilation Editor Src in project''s include path has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
|
DebugLn(DbgCap,'Editor Src in project''s include path has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
|
||||||
Note+='Editor file "'+AnUnitInfo.Filename+'" in project''s include search path is newer than state file:'+LineEnding
|
Note+='Editor file "'+AnUnitInfo.Filename+'" in project''s include search path is newer than state file:'+LineEnding
|
||||||
+' File age="'+FileAgeToStr(FileAgeCached(AnUnitInfo.Filename))+'"'+LineEnding
|
+' File age="'+FileAgeToStr(FileAgeCached(AnUnitInfo.Filename))+'"'+LineEnding
|
||||||
+' State file age="'+FileAgeToStr(StateFileAge)+'"'+LineEnding
|
+' State file age="'+FileAgeToStr(StateFileAge)+'"'+LineEnding
|
||||||
@ -1136,6 +1137,7 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
NeedBuildAllFlag:=false;
|
NeedBuildAllFlag:=false;
|
||||||
|
DbgCap:='Project needs building: ';
|
||||||
|
|
||||||
// get main source filename
|
// get main source filename
|
||||||
if not AProject.IsVirtual then begin
|
if not AProject.IsVirtual then begin
|
||||||
@ -1146,12 +1148,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
CompilerFilename:=AProject.GetCompilerFilename;
|
CompilerFilename:=AProject.GetCompilerFilename;
|
||||||
//DebugLn(['TBuildManager.DoCheckIfProjectNeedsCompilation CompilerFilename="',CompilerFilename,'" CompilerPath="',AProject.CompilerOptions.CompilerPath,'"']);
|
//DebugLn([DbgCap,'CompilerFilename="',CompilerFilename,'" CompilerPath="',AProject.CompilerOptions.CompilerPath,'"']);
|
||||||
// Note: use absolute paths, because some external tools resolve symlinked directories
|
// Note: use absolute paths, because some external tools resolve symlinked directories
|
||||||
CompilerParams :=
|
CompilerParams :=
|
||||||
AProject.CompilerOptions.MakeOptionsString([ccloAbsolutePaths])
|
AProject.CompilerOptions.MakeOptionsString([ccloAbsolutePaths])
|
||||||
+ ' ' + PrepareCmdLineOption(SrcFilename);
|
+ ' ' + PrepareCmdLineOption(SrcFilename);
|
||||||
//DebugLn('TBuildManager.DoCheckIfProjectNeedsCompilation WorkingDir="',WorkingDir,'" SrcFilename="',SrcFilename,'" CompilerFilename="',CompilerFilename,'" CompilerParams="',CompilerParams,'"');
|
//DebugLn(DbgCap,'WorkingDir="',WorkingDir,'" SrcFilename="',SrcFilename,'" CompilerFilename="',CompilerFilename,'" CompilerParams="',CompilerParams,'"');
|
||||||
|
|
||||||
// check state file
|
// check state file
|
||||||
StateFilename:=AProject.GetStateFilename;
|
StateFilename:=AProject.GetStateFilename;
|
||||||
@ -1159,7 +1161,7 @@ begin
|
|||||||
if Result<>mrOk then exit; // read error and user aborted
|
if Result<>mrOk then exit; // read error and user aborted
|
||||||
if not (lpsfStateFileLoaded in AProject.StateFlags) then begin
|
if not (lpsfStateFileLoaded in AProject.StateFlags) then begin
|
||||||
if ConsoleVerbosity>=0 then
|
if ConsoleVerbosity>=0 then
|
||||||
DebugLn('TBuildManager.CheckIfPackageNeedsCompilation No state file for ',AProject.IDAsString);
|
DebugLn(DbgCap,'No state file for ',AProject.IDAsString);
|
||||||
Note+='State file "'+StateFilename+'" of '+AProject.IDAsString+' is missing.'+LineEnding;
|
Note+='State file "'+StateFilename+'" of '+AProject.IDAsString+' is missing.'+LineEnding;
|
||||||
NeedBuildAllFlag:=true;
|
NeedBuildAllFlag:=true;
|
||||||
exit(mrYes);
|
exit(mrYes);
|
||||||
@ -1181,7 +1183,7 @@ begin
|
|||||||
if FileExistsCached(SrcFilename) and (StateFileAge<FileAgeCached(SrcFilename)) then
|
if FileExistsCached(SrcFilename) and (StateFileAge<FileAgeCached(SrcFilename)) then
|
||||||
begin
|
begin
|
||||||
if ConsoleVerbosity>=0 then
|
if ConsoleVerbosity>=0 then
|
||||||
DebugLn('TBuildManager.CheckIfProjectNeedsCompilation SrcFile outdated ',AProject.IDAsString);
|
DebugLn(DbgCap,'SrcFile outdated ',AProject.IDAsString);
|
||||||
Note+='Source file "'+SrcFilename+'" of '+AProject.IDAsString+' outdated:'+LineEnding
|
Note+='Source file "'+SrcFilename+'" of '+AProject.IDAsString+' outdated:'+LineEnding
|
||||||
+' Source age='+FileAgeToStr(FileAgeCached(SrcFilename))+LineEnding
|
+' Source age='+FileAgeToStr(FileAgeCached(SrcFilename))+LineEnding
|
||||||
+' State file age='+FileAgeToStr(StateFileAge)+LineEnding
|
+' State file age='+FileAgeToStr(StateFileAge)+LineEnding
|
||||||
@ -1192,7 +1194,7 @@ begin
|
|||||||
// check compiler and params
|
// check compiler and params
|
||||||
if CompilerFilename<>AProject.LastCompilerFilename then begin
|
if CompilerFilename<>AProject.LastCompilerFilename then begin
|
||||||
if ConsoleVerbosity>=0 then begin
|
if ConsoleVerbosity>=0 then begin
|
||||||
DebugLn('TBuildManager.CheckIfProjectNeedsCompilation Compiler filename changed for ',AProject.IDAsString);
|
DebugLn(DbgCap,'Compiler filename changed for ',AProject.IDAsString);
|
||||||
DebugLn(' Old="',AProject.LastCompilerFilename,'"');
|
DebugLn(' Old="',AProject.LastCompilerFilename,'"');
|
||||||
DebugLn(' Now="',CompilerFilename,'"');
|
DebugLn(' Now="',CompilerFilename,'"');
|
||||||
end;
|
end;
|
||||||
@ -1204,7 +1206,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
if not FileExistsCached(CompilerFilename) then begin
|
if not FileExistsCached(CompilerFilename) then begin
|
||||||
if ConsoleVerbosity>=0 then begin
|
if ConsoleVerbosity>=0 then begin
|
||||||
DebugLn('TBuildManager.CheckIfProjectNeedsCompilation Compiler file not found for ',AProject.IDAsString);
|
DebugLn(DbgCap,'Compiler file not found for ',AProject.IDAsString);
|
||||||
DebugLn(' File="',CompilerFilename,'"');
|
DebugLn(' File="',CompilerFilename,'"');
|
||||||
end;
|
end;
|
||||||
Note+='Compiler file "'+CompilerFilename+'" not found for '+AProject.IDAsString+'.'+LineEnding;
|
Note+='Compiler file "'+CompilerFilename+'" not found for '+AProject.IDAsString+'.'+LineEnding;
|
||||||
@ -1212,7 +1214,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
if FileAgeCached(CompilerFilename)<>AProject.LastCompilerFileDate then begin
|
if FileAgeCached(CompilerFilename)<>AProject.LastCompilerFileDate then begin
|
||||||
if ConsoleVerbosity>=0 then begin
|
if ConsoleVerbosity>=0 then begin
|
||||||
DebugLn('TBuildManager.CheckIfProjectNeedsCompilation Compiler file changed for ',AProject.IDAsString);
|
DebugLn(DbgCap,'Compiler file changed for ',AProject.IDAsString);
|
||||||
DebugLn(' File="',CompilerFilename,'"');
|
DebugLn(' File="',CompilerFilename,'"');
|
||||||
end;
|
end;
|
||||||
Note+='Compiler file "'+CompilerFilename+'" for '+AProject.IDAsString+' changed:'+LineEnding
|
Note+='Compiler file "'+CompilerFilename+'" for '+AProject.IDAsString+' changed:'+LineEnding
|
||||||
@ -1223,7 +1225,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
if CompilerParams<>AProject.LastCompilerParams then begin
|
if CompilerParams<>AProject.LastCompilerParams then begin
|
||||||
if ConsoleVerbosity>=0 then begin
|
if ConsoleVerbosity>=0 then begin
|
||||||
DebugLn('TBuildManager.CheckIfProjectNeedsCompilation Compiler params changed for ',AProject.IDAsString);
|
DebugLn(DbgCap,'Compiler params changed for ',AProject.IDAsString);
|
||||||
DebugLn(' Old="',AProject.LastCompilerParams,'"');
|
DebugLn(' Old="',AProject.LastCompilerParams,'"');
|
||||||
DebugLn(' Now="',CompilerParams,'"');
|
DebugLn(' Now="',CompilerParams,'"');
|
||||||
end;
|
end;
|
||||||
@ -1240,7 +1242,7 @@ begin
|
|||||||
|
|
||||||
if not AProject.LastCompileComplete then begin
|
if not AProject.LastCompileComplete then begin
|
||||||
if ConsoleVerbosity>=0 then
|
if ConsoleVerbosity>=0 then
|
||||||
DebugLn('TBuildManager.CheckIfProjectNeedsCompilation Compile was incomplete for ',AProject.IDAsString);
|
DebugLn(DbgCap,'Compile was incomplete for ',AProject.IDAsString);
|
||||||
Note+='Last compile was incomplete.'+LineEnding
|
Note+='Last compile was incomplete.'+LineEnding
|
||||||
+' State file='+StateFilename+LineEnding;
|
+' State file='+StateFilename+LineEnding;
|
||||||
exit(mrYes);
|
exit(mrYes);
|
||||||
@ -1260,7 +1262,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if (StateFileAge<FileAgeCached(AnUnitInfo.Filename)) then begin
|
if (StateFileAge<FileAgeCached(AnUnitInfo.Filename)) then begin
|
||||||
if ConsoleVerbosity>=0 then
|
if ConsoleVerbosity>=0 then
|
||||||
DebugLn('TMainIDE.CheckIfProjectNeedsCompilation Src has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
|
DebugLn(DbgCap,'Src has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
|
||||||
Note+='File "'+AnUnitInfo.Filename+'" of '+AProject.IDAsString+' is newer than state file:'+LineEnding
|
Note+='File "'+AnUnitInfo.Filename+'" of '+AProject.IDAsString+' is newer than state file:'+LineEnding
|
||||||
+' File age="'+FileAgeToStr(FileAgeCached(AnUnitInfo.Filename))+'"'+LineEnding
|
+' File age="'+FileAgeToStr(FileAgeCached(AnUnitInfo.Filename))+'"'+LineEnding
|
||||||
+' State file age="'+FileAgeToStr(StateFileAge)+'"'+LineEnding
|
+' State file age="'+FileAgeToStr(StateFileAge)+'"'+LineEnding
|
||||||
@ -1272,7 +1274,7 @@ begin
|
|||||||
if FileExistsCached(LFMFilename)
|
if FileExistsCached(LFMFilename)
|
||||||
and (StateFileAge<FileAgeCached(LFMFilename)) then begin
|
and (StateFileAge<FileAgeCached(LFMFilename)) then begin
|
||||||
if ConsoleVerbosity>=0 then
|
if ConsoleVerbosity>=0 then
|
||||||
DebugLn('TMainIDE.CheckIfProjectNeedsCompilation LFM has changed ',AProject.IDAsString,' ',LFMFilename);
|
DebugLn(DbgCap,'LFM has changed ',AProject.IDAsString,' ',LFMFilename);
|
||||||
Note+='File "'+LFMFilename+'" of '+AProject.IDAsString+' is newer than state file:'+LineEnding
|
Note+='File "'+LFMFilename+'" of '+AProject.IDAsString+' is newer than state file:'+LineEnding
|
||||||
+' File age="'+FileAgeToStr(FileAgeCached(LFMFilename))+'"'+LineEnding
|
+' File age="'+FileAgeToStr(FileAgeCached(LFMFilename))+'"'+LineEnding
|
||||||
+' State file age="'+FileAgeToStr(StateFileAge)+'"'+LineEnding
|
+' State file age="'+FileAgeToStr(StateFileAge)+'"'+LineEnding
|
||||||
@ -1300,7 +1302,7 @@ begin
|
|||||||
and FileExistsCached(IcoRes.IcoFileName)
|
and FileExistsCached(IcoRes.IcoFileName)
|
||||||
and (StateFileAge<FileAgeCached(IcoRes.IcoFileName)) then begin
|
and (StateFileAge<FileAgeCached(IcoRes.IcoFileName)) then begin
|
||||||
if ConsoleVerbosity>=0 then
|
if ConsoleVerbosity>=0 then
|
||||||
debugln(['TBuildManager.DoCheckIfProjectNeedsCompilation icon has changed ',
|
debugln([DbgCap,'icon has changed ',
|
||||||
AProject.IDAsString,' "',IcoRes.IcoFileName,'"']);
|
AProject.IDAsString,' "',IcoRes.IcoFileName,'"']);
|
||||||
Note+='Project''s ico file "'+IcoRes.IcoFileName+'" is newer than state file:'+LineEnding
|
Note+='Project''s ico file "'+IcoRes.IcoFileName+'" is newer than state file:'+LineEnding
|
||||||
+' File age="'+FileAgeToStr(FileAgeCached(IcoRes.IcoFileName))+'"'+LineEnding
|
+' File age="'+FileAgeToStr(FileAgeCached(IcoRes.IcoFileName))+'"'+LineEnding
|
||||||
@ -1311,14 +1313,16 @@ begin
|
|||||||
|
|
||||||
// check target file
|
// check target file
|
||||||
aTargetFilename:=AProject.CompilerOptions.CreateTargetFilename;
|
aTargetFilename:=AProject.CompilerOptions.CreateTargetFilename;
|
||||||
debugln(['TBuildManager.DoCheckIfProjectNeedsCompilation aTargetFilename=',aTargetFilename]);
|
//debugln(['TBuildManager.DoCheckIfProjectNeedsCompilation aTargetFilename=',aTargetFilename]);
|
||||||
if (aTargetFilename<>'') and not FileExistsCached(aTargetFilename) then begin
|
if (aTargetFilename<>'') and not FileExistsCached(aTargetFilename) then begin
|
||||||
if ConsoleVerbosity>=0 then
|
if ConsoleVerbosity>=0 then
|
||||||
debugln(['TBuildManager.DoCheckIfProjectNeedsCompilation missing target file "',aTargetFilename,'"']);
|
debugln([DbgCap,'missing target file "',aTargetFilename,'"']);
|
||||||
Note+='Project''s target file "'+aTargetFilename+'" is missing.';
|
Note+='Project''s target file "'+aTargetFilename+'" is missing.';
|
||||||
exit(mrYes);
|
exit(mrYes);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if not HasGUI then
|
||||||
|
debugln(['lazbuild: Build Project: nothing to do.']);
|
||||||
Result:=mrNo;
|
Result:=mrNo;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -2001,7 +2001,7 @@ begin
|
|||||||
IncreaseCompilerParseStamp;
|
IncreaseCompilerParseStamp;
|
||||||
try
|
try
|
||||||
Result:=GetParsedValue(eopFPCSourceDirectory);
|
Result:=GetParsedValue(eopFPCSourceDirectory);
|
||||||
debugln(['TEnvironmentOptions.GetParsedFPCSourceDirectory FPCVer=',FPCVer,' FPCSrcDir=',Result]);
|
//debugln(['TEnvironmentOptions.GetParsedFPCSourceDirectory FPCVer=',FPCVer,' FPCSrcDir=',Result]);
|
||||||
finally
|
finally
|
||||||
OverrideFPCVer:='';
|
OverrideFPCVer:='';
|
||||||
IncreaseCompilerParseStamp;
|
IncreaseCompilerParseStamp;
|
||||||
|
@ -57,7 +57,6 @@
|
|||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="basebuildmanager.pas"/>
|
<Filename Value="basebuildmanager.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="BaseBuildManager"/>
|
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="idecmdline.pas"/>
|
<Filename Value="idecmdline.pas"/>
|
||||||
|
@ -1662,6 +1662,7 @@ begin
|
|||||||
{$IFDEF BuildWidgetSetNoGui} Result:=lpNoGUI; {$ENDIF}
|
{$IFDEF BuildWidgetSetNoGui} Result:=lpNoGUI; {$ENDIF}
|
||||||
|
|
||||||
HasGUI:=false;
|
HasGUI:=false;
|
||||||
|
ConsoleVerbosity:=-1;
|
||||||
FilterConfigFileContent;
|
FilterConfigFileContent;
|
||||||
// free LCL Application to help debugging nogui issues
|
// free LCL Application to help debugging nogui issues
|
||||||
Application.Free;
|
Application.Free;
|
||||||
|
Loading…
Reference in New Issue
Block a user