From 4d02d500aac80c136e3d6582b908e0fab77bbf42 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 23 Aug 2021 09:06:10 +0200 Subject: Building: For the FIPS module checksum, keep track of configuration,h The FIPS module checksum needs to know that configuration.h is generated from configuration.h.in, so that information is conserved. To make this possible, it's now possible to have attributes with the GENERATE keyword, and the attribute "skip" is added to make a keyword a no-op, which makes it informative only. Reviewed-by: Tomas Mraz Reviewed-by: Todd Short (Merged from https://github.com/openssl/openssl/pull/16378) --- Configure | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Configure') diff --git a/Configure b/Configure index 1992f907aa..ce0fcb6e51 100755 --- a/Configure +++ b/Configure @@ -2202,9 +2202,10 @@ if ($builder eq "unified") { \$attributes{depends}, $+{ATTRIBS}, tokenize($expand_variables->($+{VALUE}))) if !@skip || $skip[$#skip] > 0; }, - qr/^\s* GENERATE ${index_re} \s* = \s* ${value_re} \s* $/x + qr/^\s* GENERATE ${index_re} ${attribs_re} \s* = \s* ${value_re} \s* $/x => sub { $push_to->(\%generate, $expand_variables->($+{INDEX}), - undef, undef, $expand_variables->($+{VALUE})) + \$attributes{generate}, $+{ATTRIBS}, + $expand_variables->($+{VALUE})) if !@skip || $skip[$#skip] > 0; }, qr/^\s* (?:\#.*)? $/x => sub { }, "OTHERWISE" => sub { die "Something wrong with this line:\n$_\nat $sourced/$f" }, @@ -2372,6 +2373,10 @@ EOF $check_generate{$ddest}->{$generator[0]}++; $unified_info{generate}->{$ddest} = [ @generator ]; + # Fix up associated attributes + $unified_info{attributes}->{generate}->{$ddest} = + $attributes{generate}->{$dest}->{$gen} + if defined $attributes{generate}->{$dest}->{$gen}; } foreach (keys %depends) { -- cgit v1.2.1