mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 01:29:29 +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;
|
||||
end;
|
||||
|
||||
oldrev:=0;
|
||||
olddate:='';
|
||||
// Write the latest change-date and revision to file revision.inc
|
||||
system.assign(f,BuildEngine.AddPathPrefix(P,'revision.inc'));
|
||||
io:=ioresult;
|
||||
@ -167,19 +169,23 @@ begin
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
BuildEngine.Log(vlCommand,'revision.inc set to '''+lastdate+' rev '+IntToStr(lastrev)+'''');
|
||||
|
||||
system.assign(f,BuildEngine.AddPathPrefix(P,'revision.inc'));
|
||||
rewrite(f);
|
||||
io:=ioresult;
|
||||
if io <> 0 then
|
||||
if (lastdate=olddate) and (lastrev=oldrev) then
|
||||
BuildEngine.Log(vlCommand,'revision.inc unchanged')
|
||||
else
|
||||
begin
|
||||
BuildEngine.Log(vlError, 'Error opening revision.inc for writing');
|
||||
halt(3);
|
||||
end;
|
||||
Writeln(f,'''',lastdate,' rev ',lastrev,'''');
|
||||
close(f);
|
||||
BuildEngine.Log(vlCommand,'revision.inc set to '''+lastdate+' rev '+IntToStr(lastrev)+'''');
|
||||
|
||||
system.assign(f,BuildEngine.AddPathPrefix(P,'revision.inc'));
|
||||
rewrite(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
|
||||
else
|
||||
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