mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 09:39:09 +02:00
Merge commit 45738
------------------------------------------------------------------------ r45738 | pierre | 2020-07-07 12:52:24 +0000 (Tue, 07 Jul 2020) | 1 line Avoid rewriting revision.inc if content is unchanged ------------------------------------------------------------------------ --- Merging r45738 into '.': U utils/fpcm/fpmake.pp --- Recording mergeinfo for merge of r45738 into '.': U . git-svn-id: branches/fixes_3_2@45745 -
This commit is contained in:
parent
a0f699ac3e
commit
27723aa97d
@ -132,6 +132,8 @@ begin
|
|||||||
SVNProcess.Free;
|
SVNProcess.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
oldrev:=0;
|
||||||
|
olddate:='';
|
||||||
// Write the latest change-date and revision to file revision.inc
|
// Write the latest change-date and revision to file revision.inc
|
||||||
system.assign(f,BuildEngine.AddPathPrefix(P,'revision.inc'));
|
system.assign(f,BuildEngine.AddPathPrefix(P,'revision.inc'));
|
||||||
io:=ioresult;
|
io:=ioresult;
|
||||||
@ -167,19 +169,23 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
if (lastdate=olddate) and (lastrev=oldrev) then
|
||||||
BuildEngine.Log(vlCommand,'revision.inc set to '''+lastdate+' rev '+IntToStr(lastrev)+'''');
|
BuildEngine.Log(vlCommand,'revision.inc unchanged')
|
||||||
|
else
|
||||||
system.assign(f,BuildEngine.AddPathPrefix(P,'revision.inc'));
|
|
||||||
rewrite(f);
|
|
||||||
io:=ioresult;
|
|
||||||
if io <> 0 then
|
|
||||||
begin
|
begin
|
||||||
BuildEngine.Log(vlError, 'Error opening revision.inc for writing');
|
BuildEngine.Log(vlCommand,'revision.inc set to '''+lastdate+' rev '+IntToStr(lastrev)+'''');
|
||||||
halt(3);
|
|
||||||
end;
|
system.assign(f,BuildEngine.AddPathPrefix(P,'revision.inc'));
|
||||||
Writeln(f,'''',lastdate,' rev ',lastrev,'''');
|
rewrite(f);
|
||||||
close(f);
|
io:=ioresult;
|
||||||
|
if io <> 0 then
|
||||||
|
begin
|
||||||
|
BuildEngine.Log(vlError, 'Error opening revision.inc for writing');
|
||||||
|
halt(3);
|
||||||
|
end;
|
||||||
|
Writeln(f,'''',lastdate,' rev ',lastrev,'''');
|
||||||
|
close(f);
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
BuildEngine.Log(vlWarning,'Subversion executable (svn) not found. Svn-revision in fpcmake executable might be out of date.');
|
BuildEngine.Log(vlWarning,'Subversion executable (svn) not found. Svn-revision in fpcmake executable might be out of date.');
|
||||||
|
Loading…
Reference in New Issue
Block a user