+2001-04-12 Akim Demaille <akim@epita.fr>
+
+ * automake.in (&handle_single_transform_list, &finish_languages)
+ (&handle_dist, &handle_dependencies): Use the language object for
+ autodep and derived-autodep too.
+
2001-04-12 Akim Demaille <akim@epita.fr>
* automake.in (¯o_define): Ignore Automake definition for
foreach my $ext (sort keys %extension_seen)
{
my $lang = $extension_map{$ext};
+ my $lang_obj = $languages{$lang};
# Generate the appropriate rules for this extension. If
# dependency tracking was requested, and this extension
# supports it, then we don't generate the rule here.
my $comp = '';
- if ($use_dependencies && $language_map{"$lang-autodep"} ne 'no')
+ if ($use_dependencies && $lang_obj->autodep ne 'no')
{
# Don't generate the rule, but still generate the variables.
if (exists $language_map{"$lang-compile"})
$extension = &derive_suffix ($extension);
my $lang = $extension_map{$extension};
- # Extract the language object.
my $lang_obj = $languages{$lang};
if ($lang)
{
# generated later, by add_depend2.
if (($use_dependencies
&& $rule ne ''
- && $language_map{"$lang-autodep"} ne 'no')
+ && $lang_obj->autodep ne 'no')
|| $directory ne '')
{
$rule = '';
# Transform .o or $o file into .P file (for automatic
# dependency code).
if ($lang
- && ($language_map{"$lang-autodep"} ne 'no'
- || $language_map{"$lang-derived-autodep"} eq 'yes'))
+ && ($lang_obj->autodep ne 'no'
+ || $lang_obj->derived_autodep eq 'yes'))
{
my $depfile = $object;
$depfile =~ s/\.([^.]*)$/.P$1/;
sub add_depend2
{
my ($lang) = @_;
-
+ my $lang_obj = $languages{$lang};
# Get information on $LANG.
- my $pfx = $language_map{"$lang-autodep"};
+ my $pfx = $lang_obj->autodep;
my $fpfx = ($pfx eq '') ? 'CC' : $pfx;
my $flag = $language_map{"$lang-flags"} || '';
&define_variable ('depcomp', '');
}
- foreach my $key (sort keys %language_map)
+ while (my ($lang, $lang_obj) = each %languages)
{
- next unless $key =~ /^(.*)-autodep$/;
- next if $language_map{$key} eq 'no';
- &add_depend2 ($1);
+ if ($lang_obj->autodep ne 'no')
+ {
+ add_depend2 ($lang);
+ }
}
}