+2001-04-27 Akim Demaille <akim@epita.fr>
+
+ * automake.in (&read_am_file, &file_contents_internal): Don't
+ define macros when `FALSE', to avoid errors on doubly defined
+ variables but under condition `FALSE'. In order to allow...
+ (&am_install_var): When reading the associated file for the first
+ time, enable `%?FIRST%'.
+ (&handle_libraries): Let libs.am define $(AR) and $(RANLIB).
+ * libs.am: Do it when `%?FIRST%'.
+
2001-04-27 Akim Demaille <akim@epita.fr>
* automake.in (handle_compile): Let ansi2knr.am define $(ANSI2KNR).
}
}
}
-
- &define_variable ('AR', 'ar');
- &define_configure_variable ('RANLIB');
}
$var_comment{$last_var_name} .= "$comment";
$comment = $spacing = '';
macro_define ($last_var_name, 0,
- $last_var_type, $cond,
- $last_var_value, $.);
+ $last_var_type, $cond,
+ $last_var_value, $.)
+ if $cond ne 'FALSE';
push (@var_list, $last_var_name);
}
}
$comment = $spacing = '';
macro_define ($last_var_name, 0,
- $last_var_type, $cond,
- $last_var_value, $.);
+ $last_var_type, $cond,
+ $last_var_value, $.)
+ if $cond ne 'FALSE';
push (@var_list, $last_var_name);
}
}
$var_comment{$var} .= "$comment";
# Strip the continuation backslashes.
$val =~ s/\\$//mg;
- macro_define ($var, 1, $type, $cond, $val, $.);
+ macro_define ($var, 1, $type, $cond, $val, $.)
+ if $cond ne 'FALSE';
push (@var_list, $var);
# If the user has set some variables we were in charge
my @used = ();
my @result = ();
+ # True if the iteration is the first one. Used for instance to
+ # output parts of the associated file only once.
+ my $first = 0;
foreach my $X (sort keys %valid)
{
my $one_name = $X . '_' . $primary;
# Singular form of $PRIMARY.
(my $one_primary = $primary) =~ s/S$//;
$output_rules .= &file_contents ($file,
- ('PRIMARY' => $primary,
+ ('FIRST' => $first,
+
+ 'PRIMARY' => $primary,
'ONE_PRIMARY' => $one_primary,
'DIR' => $X,
'NDIR' => $nodir_name,
'EXEC' => $exec_p,
'INSTALL' => $install_p,
'DIST' => $dist_p));
+
+ $first = '';
}
}