(handle_source_transform): Replace 'grep' with 'map'.
authorRaja R Harinath <harinath@acm.org>
Sat, 2 Aug 2003 14:14:59 +0000 (14:14 +0000)
committerRaja R Harinath <harinath@acm.org>
Sat, 2 Aug 2003 14:14:59 +0000 (14:14 +0000)
(register_language): Replace 'grep' with 'foreach' modifier.

ChangeLog
automake.in

index 917b1f7..85ccd64 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-02  Raja R Harinath  <harinath@acm.org>
+
+       * automake.in (handle_source_transform): Replace 'grep' with 'map'.
+       (register_language): Replace 'grep' with 'foreach' modifier.
+
 2003-08-01  Raja R Harinath  <harinath@acm.org>
 
        * lib/Automake/Variables.pm (variables): Return a list of
index 7d51beb..2b73148 100755 (executable)
@@ -2109,7 +2109,7 @@ sub handle_source_transform
     }
     else
     {
-       grep ($_ = '$(' . $_ . $one_file . '_OBJECTS)', @keys);
+       @keys = map { '$(' . $_ . $one_file . '_OBJECTS)' } @keys;
        define_pretty_variable ($one_file . '_OBJECTS', TRUE, $where, @keys);
     }
 
@@ -5204,7 +5204,7 @@ sub register_language (%)
   my $lang = new Language (%option);
 
   # Fill indexes.
-  grep ($extension_map{$_} = $lang->name, @{$lang->extensions});
+  $extension_map{$_} = $lang->name foreach @{$lang->extensions};
   $languages{$lang->name} = $lang;
 
   # Update the pattern of known extensions.