summaryrefslogtreecommitdiff
path: root/bin/automake.in
diff options
context:
space:
mode:
Diffstat (limited to 'bin/automake.in')
-rw-r--r--bin/automake.in11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/automake.in b/bin/automake.in
index 8f3fb4878..24ff2a6d6 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -5861,7 +5861,7 @@ sub register_language
# Update the pattern of known extensions.
accept_extensions (@{$lang->extensions});
- # Update the $suffix_rule map.
+ # Update the suffix rules map.
foreach my $suffix (@{$lang->extensions})
{
foreach my $dest ($lang->output_extensions->($suffix))
@@ -5879,12 +5879,11 @@ sub derive_suffix
{
my ($source_ext, $obj) = @_;
- while (! $extension_map{$source_ext}
- && $source_ext ne $obj
- && exists $suffix_rules->{$source_ext}
- && exists $suffix_rules->{$source_ext}{$obj})
+ while (!$extension_map{$source_ext} && $source_ext ne $obj)
{
- $source_ext = $suffix_rules->{$source_ext}{$obj}[0];
+ my $new_source_ext = next_in_suffix_chain ($source_ext, $obj);
+ last if not defined $new_source_ext;
+ $source_ext = $new_source_ext;
}
return $source_ext;