+1999-02-27 Tom Tromey <tromey@cygnus.com>
+
+ * automake.in (lang_extensions): New sub.
+ (handle_dependencies): Use it.
+ (cxx_extensions): Removed.
+ (lang_cxx_finish): Use lang_extensions.
+ (f77_extensions): Removed.
+ (lang_f77_finish): Use lang_extensions.
+ (objc_extensions): Removed.
+ (lang_ppf77_finish): Put `.' before extension. Fixes ext.test.
+ Report from Dave Morrison.
+ (lang_ratfor_finish): Likewise.
+
1999-02-26 Tom Tromey <tromey@cygnus.com>
* automake.in (finish_languages): Added AM_LDFLAGS.
Bill Fenner fenner@parc.xerox.com
Brian Jones cbj@nortel.net
Chris Provenzano proven@io.proven.org
+Dave Morrison dave@bnl.gov
David A. Swierczek swiercze@mr.med.ge.com
David Zaroski cz253@cleveland.Freenet.Edu
Dieter Baron dillo@stieltjes.smc.univie.ac.at
. 's/\@PFX\@//g;',
'depend2');
local ($ext);
- foreach $ext (&objc_extensions)
+ foreach $ext (&lang_extensions ('objc'))
{
$output_rules .=
&file_contents_with_transform ('s/\@EXT\@/' . $ext . '/g;'
. 's/\@PFX\@/OBJC/g;',
'depend2');
}
- foreach $ext (&cxx_extensions)
+ foreach $ext (&lang_extensions ('cxx'))
{
$output_rules .=
&file_contents_with_transform ('s/\@EXT\@/' . $ext .'/g;'
}
}
-# A helper which computes a sorted list of all C++ extensions which
-# were seen.
-sub cxx_extensions
-{
- local ($key, @r);
- foreach $key (sort keys %extension_seen)
- {
- push (@r, '.' . $key) if $extension_map{$key} eq 'cxx';
- }
- return @r;
-}
-
sub lang_cxx_finish
{
- local (@cxx_list) = &cxx_extensions;
+ local (@cxx_list) = &lang_extensions ('cxx');
local ($cxx_count) = scalar @cxx_list;
if ($cxx_count)
{
&lang_c_finish;
}
-# A helper which computes a sorted list of all Fortran 77 extensions
-# which were seen.
-sub f77_extensions
-{
- local ($key, @r);
- foreach $key (sort keys %extension_seen)
- {
- push (@r, '.' . $key) if $extension_map{$key} eq 'f77';
- }
- return @r;
-}
-
sub lang_f77_finish
{
- local (@f77_list) = &f77_extensions;
+ local (@f77_list) = &lang_extensions ('f77');
local ($f77_count) = scalar @f77_list;
if ($f77_count)
{
{
local ($ext) = 'F';
last unless $extension_seen{$ext};
- push (@suffixes, '.' . $ext);
+
+ $ext = '.' . $ext;
+ push (@suffixes, $ext);
local ($ltcompile, $ltlink) = &libtool_compiler;
{
local ($ext) = 'r';
last unless $extension_seen{$ext};
- push (@suffixes, '.' . $ext);
+ $ext = '.' . $ext;
+ push (@suffixes, $ext);
local ($ltcompile, $ltlink) = &libtool_compiler;
}
}
-# A helper which computes a sorted list of all ObjC extensions which
-# were seen.
-sub objc_extensions
+# A helper which computes a sorted list of all extensions for LANG.
+sub lang_extensions
{
+ local ($lang) = @_;
local ($key, @r);
foreach $key (sort keys %extension_seen)
{
- push (@r, '.' . $key) if $extension_map{$key} eq 'objc';
+ push (@r, '.' . $key) if $extension_map{$key} eq $lang;
}
return @r;
}