X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=bin%2Fautomake.in;h=40b31814bdfa2c810e77a4860725b07137aa191d;hb=9892eb7823b3fd0e552ab22b63f58d947e9de584;hp=8f3fb48781418adef97c6962158341dfa2adac80;hpb=86e45fe19374b87b6a9adaeb3ecc93e51c7d54a7;p=platform%2Fupstream%2Fautomake.git diff --git a/bin/automake.in b/bin/automake.in index 8f3fb48..40b3181 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -632,6 +632,7 @@ register_language ('name' => 'c', 'linker' => 'LINK', 'link' => '$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@', 'compile_flag' => '-c', + 'output_flag' => '-o', 'libtool_tag' => 'CC', 'extensions' => ['.c']); @@ -1313,14 +1314,6 @@ sub handle_languages () if (((! option 'no-dependencies') && $lang->autodep ne 'no') || defined $lang->compile) { - # Some C compilers don't support -c -o. Use it only if really - # needed. - my $output_flag = $lang->output_flag || ''; - $output_flag = '-o' - if (! $output_flag - && $lang->name eq 'c' - && option 'subdir-objects'); - # Compute a possible derived extension. # This is not used by depend2.am. my $der_ext = ($lang->output_extensions->($ext))[0]; @@ -1364,7 +1357,7 @@ sub handle_languages () COMPILE => '$(' . $lang->compiler . ')', LTCOMPILE => '$(LT' . $lang->compiler . ')', - -o => $output_flag, + -o => $lang->output_flag, SUBDIROBJ => !! option 'subdir-objects'); } @@ -5861,7 +5854,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 +5872,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;