Configuration: only produce a new configdata.pm if it has changed contents
The goal is to avoid having too much of the OpenSSL source rebuilt because configdata.pm got a new time stamp. The conditions for updating configdata.pm are now: 1. its time stamp is older than Configure's, or... 2. its contents has changed. Fixes #16377 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/16378)
This commit is contained in:
parent
a4e21d18d5
commit
764cf5b263
2 changed files with 54 additions and 16 deletions
|
@ -111,7 +111,6 @@ unless (caller) {
|
|||
use lib '{- sourcedir('Configurations') -}';
|
||||
use gentemplate;
|
||||
|
||||
print 'Creating ',$buildfile_template,"\n";
|
||||
open my $buildfile_template_fh, ">$buildfile_template"
|
||||
or die "Trying to create $buildfile_template: $!";
|
||||
foreach (@{$config{build_file_templates}}) {
|
||||
|
@ -120,6 +119,7 @@ unless (caller) {
|
|||
}
|
||||
gentemplate(output => $buildfile_template_fh, %gendata);
|
||||
close $buildfile_template_fh;
|
||||
print 'Created ',$buildfile_template,"\n";
|
||||
|
||||
use OpenSSL::Template;
|
||||
|
||||
|
@ -131,7 +131,6 @@ use lib '{- $config{builddir} -}';
|
|||
use platform;
|
||||
_____
|
||||
|
||||
print 'Creating ',$buildfile,"\n";
|
||||
open BUILDFILE, ">$buildfile.new"
|
||||
or die "Trying to create $buildfile.new: $!";
|
||||
my $tmpl = OpenSSL::Template->new(TYPE => 'FILE',
|
||||
|
@ -148,6 +147,7 @@ _____
|
|||
close BUILDFILE;
|
||||
rename("$buildfile.new", $buildfile)
|
||||
or die "Trying to rename $buildfile.new to $buildfile: $!";
|
||||
print 'Created ',$buildfile,"\n";
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue