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
@@ -2127,7 +2127,15 @@ EOF
,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 ];
}
