]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* automake.in: Only register `asm' once.
authorTom Tromey <tromey@redhat.com>
Sun, 11 Apr 1999 20:10:14 +0000 (20:10 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 11 Apr 1999 20:10:14 +0000 (20:10 +0000)
(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.

ChangeLog
TODO
automake.in
lib/am/libtool.am
libtool.am

index 4d591517b9490eb62a45f8eb74ba138a39d66d41..4f423303c196cf5c9da4fa75e469a9a72270304d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 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.
diff --git a/TODO b/TODO
index 39bab4e90220d1a7e9b1eb312851e0fe6b0844c8..9686c39caf8c4c51e721300d9b4b87a7c65e414d 100644 (file)
--- 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 <mhw@kremvax.demon.co.uk>
index c7c08665ecdc2ebaa47ce5219df436f929884ac2..d8c5b23a89742e379746fdf2b8ababb61f927e1a 100755 (executable)
@@ -343,7 +343,6 @@ $obsolete_rx = '(' . join ('|', keys %obsolete_macros) . ')';
                    'r');
 &register_language ('java', 'linker=GCJLINK', 'autodep=GCJ',
                    'java');
-&register_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
index e748cc733becb508b5e4f41cf4ceff416a8adc80..8caef85361fd27152fdec2afa2352a3455422f52 100644 (file)
@@ -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
 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
index e748cc733becb508b5e4f41cf4ceff416a8adc80..8caef85361fd27152fdec2afa2352a3455422f52 100644 (file)
@@ -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
 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