+2000-12-20 Tom Tromey <tromey@redhat.com>
+
+ From Kevin Ryde:
+ * automake.in (handle_footer): Always push user suffixes at the
+ start of .SUFFIXES:.
+ * automake.texi (Suffixes): Updated to reflect new suffix
+ handling.
+
2000-12-18 Tom Tromey <tromey@redhat.com>
* automake.in (handle_built_sources): Removed.
$output_vars .= "\n";
}
- if (&variable_defined ('SUFFIXES'))
- {
- # Push actual suffixes, and not $(SUFFIXES). Some versions of
- # make do not like variable substitutions on the .SUFFIXES
- # line.
- push (@suffixes, &variable_value_as_list ('SUFFIXES', ''));
- }
if (&target_defined ('.SUFFIXES'))
{
&am_line_error ('.SUFFIXES',
$output_header .= ".SUFFIXES:\n";
if (@suffixes)
{
+
# Make sure suffixes has unique elements. Sort them to ensure
- # the output remains consistent.
+ # the output remains consistent. However, $(SUFFIXES) is
+ # always at the start of the list, unsorted. This is done
+ # because make will choose rules depending on the ordering of
+ # suffixes, and this lets the user have some control. Push
+ # actual suffixes, and not $(SUFFIXES). Some versions of make
+ # do not like variable substitutions on the .SUFFIXES line.
local (%suffixes);
+ local (@user_suffixes) = (&variable_defined ('SUFFIXES')
+ ? &variable_value_as_list ('SUFFIXES', '')
+ : ());
grep ($suffixes{$_} = 1, @suffixes);
+ delete @suffixes{@user_suffixes};
$output_header .= (".SUFFIXES: "
- . join (' ', sort keys %suffixes)
+ . join (' ', @user_suffixes, sort keys %suffixes)
. "\n");
}
$output_trailer .= &file_contents ('footer');
SUFFIXES = .java .class
@end example
+Any given @code{SUFFIXES} go at the start of the generated suffixes
+list, followed by automake generated suffixes not already in the list.
+
@node Include, Conditionals, Miscellaneous, Top
@chapter Include