~ubuntu-branches/ubuntu/vivid/lazarus/vivid-proposed

« back to all changes in this revision

Viewing changes to ide/buildmanager.pas

  • Committer: Package Import Robot
  • Author(s): Paul Gevers, Abou Al Montacir, Paul Gevers
  • Date: 2014-04-25 12:57:26 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20140425125726-6zkdcnnbbleuuvwj
Tags: 1.2+dfsg-1
[ Abou Al Montacir ]
* Packaged QT4 based IDE and LCL units.

[ Paul Gevers ]
* New upstream release
* Drop obsolete patches + refresh spell_errors.diff
* Update dependencies and description for QT4 changes
* Improve deduplication in d/rules (adds lcl-qt4 -> lcl-gtk2 -> lcl-nogui)

Show diffs side-by-side

added added

removed removed

Lines of Context:
992
992
  AnUnitInfo: TUnitInfo;
993
993
  LFMFilename: String;
994
994
  IcoRes: TProjectIcon;
 
995
 
 
996
  function EditorFileHasChanged: boolean;
 
997
  begin
 
998
    Result:=false;
 
999
    if AnUnitInfo.IsPartOfProject or AnUnitInfo.IsVirtual then exit;
 
1000
    if not FileExistsCached(AnUnitInfo.Filename) then exit;
 
1001
    if StateFileAge>=FileAgeCached(AnUnitInfo.Filename) then exit;
 
1002
    if FilenameIsPascalUnit(AnUnitInfo.Filename) then
 
1003
    begin
 
1004
      if (SearchDirectoryInSearchPath(AProject.CompilerOptions.GetUnitPath(false),
 
1005
                                ExtractFilePath(AnUnitInfo.Filename))>0)
 
1006
      then begin
 
1007
        Result:=true;
 
1008
        if ConsoleVerbosity>=0 then
 
1009
          DebugLn('TMainIDE.CheckIfProjectNeedsCompilation  Editor Unit in project''s unit path has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
 
1010
        Note+='Editor unit "'+AnUnitInfo.Filename+'" in project''s unit search path is newer than state file:'+LineEnding
 
1011
          +'  File age="'+FileAgeToStr(FileAgeCached(AnUnitInfo.Filename))+'"'+LineEnding
 
1012
          +'  State file age="'+FileAgeToStr(StateFileAge)+'"'+LineEnding
 
1013
          +'  State file='+StateFilename+LineEnding;
 
1014
        exit(true);
 
1015
      end;
 
1016
    end;
 
1017
    if (SearchDirectoryInSearchPath(AProject.CompilerOptions.GetIncludePath(false),
 
1018
                              ExtractFilePath(AnUnitInfo.Filename))>0)
 
1019
    then begin
 
1020
      Result:=true;
 
1021
      if ConsoleVerbosity>=0 then
 
1022
        DebugLn('TMainIDE.CheckIfProjectNeedsCompilation  Editor Src in project''s include path has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
 
1023
      Note+='Editor file "'+AnUnitInfo.Filename+'" in project''s include search path is newer than state file:'+LineEnding
 
1024
        +'  File age="'+FileAgeToStr(FileAgeCached(AnUnitInfo.Filename))+'"'+LineEnding
 
1025
        +'  State file age="'+FileAgeToStr(StateFileAge)+'"'+LineEnding
 
1026
        +'  State file='+StateFilename+LineEnding;
 
1027
      exit(true);
 
1028
    end;
 
1029
  end;
 
1030
 
995
1031
begin
996
1032
  NeedBuildAllFlag:=false;
997
1033
 
1142
1178
    AnUnitInfo:=AnUnitInfo.NextPartOfProject;
1143
1179
  end;
1144
1180
 
1145
 
  // check all open editor files (maybe the user forgot to add them to the project)
 
1181
  // check all open editor files in unit/include path (maybe the user forgot
 
1182
  // to add them to the project)
1146
1183
  AnUnitInfo:=AProject.FirstUnitWithEditorIndex;
1147
1184
  while AnUnitInfo<>nil do begin
1148
 
    if (not AnUnitInfo.IsPartOfProject)
1149
 
    and (not AnUnitInfo.IsVirtual)
1150
 
    and FileExistsCached(AnUnitInfo.Filename)
1151
 
    and (StateFileAge<FileAgeCached(AnUnitInfo.Filename)) then begin
1152
 
      if ConsoleVerbosity>=0 then
1153
 
        DebugLn('TMainIDE.CheckIfProjectNeedsCompilation  Editor Src has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
1154
 
      Note+='Editor file "'+AnUnitInfo.Filename+'" is newer than state file:'+LineEnding
1155
 
        +'  File age="'+FileAgeToStr(FileAgeCached(AnUnitInfo.Filename))+'"'+LineEnding
1156
 
        +'  State file age="'+FileAgeToStr(StateFileAge)+'"'+LineEnding
1157
 
        +'  State file='+StateFilename+LineEnding;
 
1185
    if EditorFileHasChanged then
1158
1186
      exit(mrYes);
1159
 
    end;
1160
1187
    AnUnitInfo:=AnUnitInfo.NextUnitWithEditorIndex;
1161
1188
  end;
1162
1189