+2001-04-27 Akim Demaille <akim@epita.fr>
+
+ * automake.in (®ister_language): Use `new Language' with a hash.
+
2001-04-27 Akim Demaille <akim@epita.fr>
* automake.in (®ister_language): Rename `output-arg' and
$option{'pure'} = 'no'
unless defined $option{'pure'};
- my $lang = new Language;
- while (my ($attr, $value) = each %option)
- {
- if ($attr eq 'ansi')
- {
- $lang->ansi ($value);
- }
- elsif ($attr eq 'autodep')
- {
- $lang->autodep ($value);
- }
- elsif ($attr eq 'compile')
- {
- $lang->compile ($value);
- }
- elsif ($attr eq 'compiler')
- {
- $lang->compiler ($value);
- }
- elsif ($attr eq 'derived_autodep')
- {
- $lang->derived_autodep ($value);
- }
- elsif ($attr eq 'extensions')
- {
- # This array accessor is stupid...
- my $cnt = 0;
- foreach (@{$value})
- {
- $lang->extensions ($cnt, $_);
- ++$cnt;
- }
- }
- elsif ($attr eq 'flags')
- {
- $lang->flags ($value);
- }
- elsif ($attr eq 'linker')
- {
- $lang->linker ($value);
- }
- elsif ($attr eq 'name')
- {
- $lang->name ($value);
- }
- elsif ($attr eq 'output_arg')
- {
- $lang->output_arg ($value);
- }
- elsif ($attr eq 'pure')
- {
- $lang->pure ($value);
- }
- elsif ($attr eq '_finish')
- {
- $lang->_finish ($value);
- }
- else
- {
- prog_error ("register_language: "
- . $lang->name
- . ": invalid attribute: $attr");
- }
- }
+ my $lang = new Language (%option);
# Fill indexes.
grep ($extension_map{$_} = $lang->name, @{$lang->extensions});