1999-04-11 Tom Tromey <tromey@cygnus.com>
+ * automake.in: Only register `asm' once.
+ (lang_asm_finish): Put assembly suffixes on @suffixes.
+
+ * libtool.am (.s.lo): Removed.
+ (.S.lo): Likewise.
+ * automake.in (lang_asm_finish): Handle libtool.
+
+ * libtool.am (.c.o): Always pass -c to libtool.
+
+ * automake.in (lang_yacc_rewrite): Handle sources in subdirs.
+ (lang_yaccxx_rewrite): Likewise.
+ (lang_lex_rewrite): Likewise.
+ (lang_lexxx_rewrite): Likewise.
+
Assembly code no longer included by default:
* compile.am (.s.o): Removed.
(.S.o): Likewise.
'r');
®ister_language ('java', 'linker=GCJLINK', 'autodep=GCJ',
'java');
-®ister_language ('asm', 's', 'S');
# Parse command line.
{
local ($directory, $base, $ext) = @_;
- &lang_c_rewrite ($directory, $base, $ext);
- $yacc_sources{$base . '.' . $ext} = 1;
+ local ($r) = &lang_c_rewrite ($directory, $base, $ext);
+ local ($pfx) = '';
+ if ($r == $LANG_SUBDIR)
+ {
+ $pfx = $directory . '/';
+ }
+ $yacc_sources{$pfx . $base . '.' . $ext} = 1;
$ext =~ tr/y/c/;
&saw_extension ('c');
- &push_dist_common ($base . '.' . $ext);
- return $LANG_PROCESS;
+ # FIXME: nodist.
+ &push_dist_common ($pfx . $base . '.' . $ext);
+ return $r;
}
# Rewrite a single yacc++ file.
{
local ($directory, $base, $ext) = @_;
- $yacc_sources{$base . '.' . $ext} = 1;
+ local ($r) = $LANG_PROCESS;
+ local ($pfx) = '';
+ if (defined $options{'subdir-objects'})
+ {
+ $pfx = $directory . '/';
+ $r = $LANG_SUBDIR;
+ }
+ $yacc_sources{$pfx . $base . '.' . $ext} = 1;
$ext =~ tr/y/c/;
&saw_extension ($ext);
- &push_dist_common ($base . '.' . $ext);
- return $LANG_PROCESS;
+ # FIXME: nodist.
+ &push_dist_common ($pfx . $base . '.' . $ext);
+ return $r;
}
# Rewrite a single lex file.
{
local ($directory, $base, $ext) = @_;
- &lang_c_rewrite ($directory, $base, $ext);
- $lex_sources{$base . '.' . $ext} = 1;
+ local ($r) = &lang_c_rewrite ($directory, $base, $ext);
+ local ($pfx) = '';
+ if ($r == $LANG_SUBDIR)
+ {
+ $pfx = $directory . '/';
+ }
+ $lex_sources{$pfx . $base . '.' . $ext} = 1;
$ext =~ tr/l/c/;
&saw_extension ('c');
- &push_dist_common ($base . '.' . $ext);
- return $LANG_PROCESS;
+ # FIXME: nodist.
+ &push_dist_common ($pfx . $base . '.' . $ext);
+ return $r;
}
# Rewrite a single lex++ file.
{
local ($directory, $base, $ext) = @_;
- $lex_sources{$base . '.' . $ext} = 1;
+ local ($r) = $LANG_PROCESS;
+ local ($pfx) = '';
+ if (defined $options{'subdir-objects'})
+ {
+ $pfx = $directory . '/';
+ $r = $LANG_SUBDIR;
+ }
+ $lex_sources{$pfx . $base . '.' . $ext} = 1;
$ext =~ tr/l/c/;
&saw_extension ($ext);
- &push_dist_common ($base . '.' . $ext);
- return $LANG_PROCESS;
+ # FIXME: nodist.
+ &push_dist_common ($pfx . $base . '.' . $ext);
+ return $r;
}
# Rewrite a single assembly file.
$output_rules .= ("$ext.obj:\n"
. "\t\$(COMPILE) -c `cygpath -w \$<`\n")
if $seen_objext;
- # FIXME: what about `.lo' and asm?
+ $output_rules .= ("$ext.lo:\n"
+ . "\t\$(LTCOMPILE) -c \$<\n")
+ if $seen_libtool;
}
+
+ push (@suffixes, @asm_list);
}
sub lang_f77_finish
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995-98, 1999 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
NOTDEPEND.c.lo:
## Note that we explicitly set the libtool mode. This avoids any lossage
## if the program doesn't have a name that libtool expects.
-NOTDEPEND $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-## These are just copies of the above rule.
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+## Note also that `-c -o' can always be used with libtool'.
+NOTDEPEND $(LIBTOOL) --mode=compile $(COMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995-98, 1999 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
NOTDEPEND.c.lo:
## Note that we explicitly set the libtool mode. This avoids any lossage
## if the program doesn't have a name that libtool expects.
-NOTDEPEND $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-## These are just copies of the above rule.
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+## Note also that `-c -o' can always be used with libtool'.
+NOTDEPEND $(LIBTOOL) --mode=compile $(COMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo