+2001-05-13 Akim Demaille <akim@epita.fr>
+
+ * automake.in (&scan_texinfo_file, &handle_dist, &handle_gettext)
+ (&handle_footer, &handle_factored_dependencies, &handle_emacs_lisp)
+ (&am_primary_prefixes): Use `map' rather than `grep'.
+
2001-05-13 Akim Demaille <akim@epita.fr>
* automake.in (Language): Set config_vars for yacc, yaccxx, lex,
my $infobase = basename ($filename);
$infobase =~ s/\.te?xi(nfo)?$//;
- my %clean_files;
- grep { $clean_files{"$infobase.$_"} = 1 } @clean_suffixes;
+ # FIXME: I don't understand why, but I can't use "$infobase.$_" => 1.
+ my %clean_files = map { "$infobase" . ".$_" => 1 } @clean_suffixes;
grep { delete $clean_files{"$infobase.$_"} } @syncodeindexes;
return ($outfile, $vfile, (sort keys %clean_files));
}
'GETTEXT' => $seen_gettext);
# Prepend $(distdir) to each directory given.
- my %rewritten;
- grep ($rewritten{'$(distdir)/' . $_} = 1, keys %dist_dirs);
+ my %rewritten = map { '$(distdir)/' . "$_" => 1 } keys %dist_dirs;
$transform{'DISTDIRS'} = join (' ', sort keys %rewritten);
# If we have SUBDIRS, create all dist subdirectories and do
# each po file is mentioned in ALL_LINGUAS.
if ($seen_linguas)
{
- my %linguas = ();
- grep ($linguas{$_} = 1, split (' ', $all_linguas));
+ my %linguas = map { $_ => 1 } split (' ', $all_linguas);
foreach (<po/*.po>)
{
? &variable_value_as_list ('SUFFIXES', '')
: ());
- my %suffixes;
- grep ($suffixes{$_} = 1, @suffixes);
+ my %suffixes = map { $_ => 1 } @suffixes;
delete @suffixes{@user_suffixes};
$output_header .= (".SUFFIXES: "
}
# All the required targets are phony.
- grep { &depend ('.PHONY', $_) } keys %required_targets;
+ depend ('.PHONY', keys %required_targets);
# Actually output gathered targets.
foreach (sort target_cmp keys %dependencies)
return if ! @elfiles;
# Generate .elc files.
- grep ($_ .= 'c', @elfiles);
- &define_pretty_variable ('ELCFILES', '', @elfiles);
+ my @elcfiles = map { $_ . 'c' } @elfiles;
+ &define_pretty_variable ('ELCFILES', '', @elcfiles);
push (@all, '$(ELCFILES)');
{
my ($primary, $can_dist, @prefixes) = @_;
- my %valid;
- grep ($valid{$_} = 0, @prefixes);
+ my %valid = map { $_ => 0 } @prefixes;
$valid{'EXTRA'} = 0;
foreach my $varname (keys %var_value)
{