summaryrefslogtreecommitdiff
path: root/Configurations
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-08-23 09:06:10 +0200
committerRichard Levitte <levitte@openssl.org>2022-05-22 17:33:08 +0200
commit4d02d500aac80c136e3d6582b908e0fab77bbf42 (patch)
tree77f2bc56feafc66fc495ea5b1f01d8fe56a51d0d /Configurations
parent2522889620446f1e56338367d1b6b028ea952bb4 (diff)
downloadopenssl-new-4d02d500aac80c136e3d6582b908e0fab77bbf42.tar.gz
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 <tomas@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/16378)
Diffstat (limited to 'Configurations')
-rw-r--r--Configurations/gentemplate.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Configurations/gentemplate.pm b/Configurations/gentemplate.pm
index a02b19a688..4bf19af9c2 100644
--- a/Configurations/gentemplate.pm
+++ b/Configurations/gentemplate.pm
@@ -56,7 +56,8 @@ sub emit {
my $fh = $self->{output};
die "No name?" unless $name;
- print $fh "{-\n ", $name, '(', dump_data(\%opts), ');', " \n-}";
+ print $fh "{-\n ", $name, '(', dump_data(\%opts), ');', " \n-}"
+ unless defined $opts{attrs}->{skip};
}
my $debug_resolvedepends = $ENV{BUILDFILE_DEBUG_DEPENDS};
@@ -200,7 +201,7 @@ sub dogenerate {
my $self = shift;
my $src = shift;
# Safety measure
- return "" unless defined $self->{info}->{generate}->{$_};
+ return "" unless defined $self->{info}->{generate}->{$src};
return "" if $cache{$src};
my $obj = shift;
my $bin = shift;
@@ -209,6 +210,7 @@ sub dogenerate {
die "$src is generated by Configure, should not appear in build file\n"
if ref $self->{info}->{generate}->{$src} eq "";
my $script = $self->{info}->{generate}->{$src}->[0];
+ my %attrs = %{$self->{info}->{attributes}->{generate}->{$src} // {}};
$self->emit('generatesrc',
src => $src,
product => $bin,
@@ -220,6 +222,7 @@ sub dogenerate {
defined $bin ? @{$self->{info}->{includes}->{$bin} // []} : () ],
defs => [ defined $obj ? @{$self->{info}->{defines}->{$obj} // []} : (),
defined $bin ? @{$self->{info}->{defines}->{$bin} // []} : () ],
+ attrs => { %attrs },
%opts);
foreach (@{$self->{info}->{depends}->{$src} // []}) {
$self->dogenerate($_, $obj, $bin, %opts);