# is in effect.
# Split file name into base and extension.
- next if ! /^(?:(.*)\/)?([^\/]*)($KNOWN_EXTENSIONS_PATTERN)$/;
+ next if ! /^(?:(.*)\/)?([^\/]*?)(\.[^.]+)$/;
+ prog_error ("source file '$_' missing dotted extension")
+ unless defined $2 and defined $3;
my $full = $_;
my $directory = $1 || '';
my $base = $2;
}
}
- # Update the pattern of known extensions.
- accept_extensions (@{$lang->extensions});
-
# Upate the $suffix_rule map.
foreach my $suffix (@{$lang->extensions})
{
use vars '@ISA', '@EXPORT', '@EXPORT_OK';
@ISA = qw/Automake::Item Exporter/;
@EXPORT = qw (reset register_suffix_rule suffix_rules_count
- rules $suffix_rules $KNOWN_EXTENSIONS_PATTERN
+ rules $suffix_rules
depend %dependencies %actions register_action
- accept_extensions
reject_rule msg_rule msg_cond_rule err_rule err_cond_rule
rule rrule ruledef rruledef);
use vars '$suffix_rules';
-=item C<$KNOWN_EXTENSIONS_PATTERN>
-
-Pattern that matches all know input extensions (i.e. extensions used
-by the languages supported by Automake). Using this pattern (instead
-of '\..*$') to match extensions allows Automake to support dot-less
-extensions.
-
-New extensions should be registered with C<accept_extensions>.
-
-=cut
-
-use vars qw ($KNOWN_EXTENSIONS_PATTERN @_known_extensions_list);
-$KNOWN_EXTENSIONS_PATTERN = "";
-@_known_extensions_list = ();
-
=back
=head2 Error reporting functions
=over 4
-=item C<accept_extensions (@exts)>
-
-Update C<$KNOWN_EXTENSIONS_PATTERN> to recognize the extensions
-listed in C<@exts>. Extensions should contain a dot if needed.
-
-=cut
-
-sub accept_extensions (@)
-{
- push @_known_extensions_list, @_;
- $KNOWN_EXTENSIONS_PATTERN =
- '(?:' . join ('|', map (quotemeta, @_known_extensions_list)) . ')';
-}
-
=item C<rules>
Return the list of all L<Automake::Rule> instances. (I.e., all
if ($deps =~ /^\s*%(\.$chars_rx)(\s|$)/o)
{
my $srcsuf = $1;
- accept_extensions ($srcsuf);
register_suffix_rule ($where, $srcsuf, $objsuf);
}
}