From: Tom Tromey Date: Sun, 11 Apr 1999 20:10:14 +0000 (+0000) Subject: * automake.in: Only register `asm' once. X-Git-Tag: last-merge-into-user-dep-gen-branch~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=173174311be166bcbd34eb6ae3ff86a62d83c44e;p=thirdparty%2Fautomake.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 4d591517b..4f423303c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 1999-04-11 Tom Tromey + * 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. diff --git a/TODO b/TODO index 39bab4e90..9686c39ca 100644 --- a/TODO +++ b/TODO @@ -7,6 +7,8 @@ try to find a losing compiler and see if it really works. (actually: hack config.cache and do it) +* Test nodist_SOURCES with lex, yacc, etc. + * Run automake before libtool. It will report an error but still won't put the file into the disty. This is wrong. From Mark H Wilkinson diff --git a/automake.in b/automake.in index c7c08665e..d8c5b23a8 100755 --- a/automake.in +++ b/automake.in @@ -343,7 +343,6 @@ $obsolete_rx = '(' . join ('|', keys %obsolete_macros) . ')'; 'r'); ®ister_language ('java', 'linker=GCJLINK', 'autodep=GCJ', 'java'); -®ister_language ('asm', 's', 'S'); # Parse command line. @@ -4653,12 +4652,18 @@ sub lang_yacc_rewrite { 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. @@ -4666,11 +4671,19 @@ sub lang_yaccxx_rewrite { 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. @@ -4678,12 +4691,18 @@ sub lang_lex_rewrite { 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. @@ -4691,11 +4710,19 @@ sub lang_lexxx_rewrite { 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. @@ -4978,8 +5005,12 @@ sub lang_asm_finish $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 diff --git a/lib/am/libtool.am b/lib/am/libtool.am index e748cc733..8caef8536 100644 --- a/lib/am/libtool.am +++ b/lib/am/libtool.am @@ -1,5 +1,5 @@ ## 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 @@ -18,14 +18,8 @@ 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 diff --git a/libtool.am b/libtool.am index e748cc733..8caef8536 100644 --- a/libtool.am +++ b/libtool.am @@ -1,5 +1,5 @@ ## 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 @@ -18,14 +18,8 @@ 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