From: Richard Levitte Date: Wed, 20 Nov 2019 13:58:20 +0000 (+0100) Subject: Configure: make it possible to have generated generators X-Git-Tag: openssl-3.0.0-alpha1~894 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cff64af5532d3a1b0e2e9adf88454887efba01b2;p=oweals%2Fopenssl.git Configure: make it possible to have generated generators This makes it possible to chain GENERATOR statements, which allows constructs like this: GENERATE[something.html]=something.pod GENERATE[something.pod]=something.pod.in Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6236) --- diff --git a/Configure b/Configure index 11c9479416..bad09ed8a3 100755 --- a/Configure +++ b/Configure @@ -2124,10 +2124,18 @@ EOF my $dest = $_; my $ddest = cleanfile($buildd, $_, $blddir); die "more than one generator for $dest: " - ,join(" ", @{$generate{$_}}),"\n" - if scalar @{$generate{$_}} > 1; + ,join(" ", @{$generate{$_}}),"\n" + if scalar @{$generate{$_}} > 1; my @generator = split /\s+/, $generate{$dest}->[0]; - $generator[0] = cleanfile($sourced, $generator[0], $blddir), + my $gen = $generator[0]; + $generator[0] = cleanfile($sourced, $gen, $blddir); + + # If the generator isn't in the source tree, we assume it's + # generated in the build tree + if ($generate{$gen}) { + $generator[0] = cleanfile($buildd, $gen, $blddir); + } + $unified_info{generate}->{$ddest} = [ @generator ]; }