From 764cf5b26306a8712e8b3d41599c44dc5ed07a25 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 23 Aug 2021 08:48:02 +0200 Subject: 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 Reviewed-by: Todd Short (Merged from https://github.com/openssl/openssl/pull/16378) --- configdata.pm.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'configdata.pm.in') diff --git a/configdata.pm.in b/configdata.pm.in index 2dfb7d8d70..cdaea868c1 100644 --- a/configdata.pm.in +++ b/configdata.pm.in @@ -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); } -- cgit v1.2.1