Assembly code no longer included by default:
authorTom Tromey <tromey@redhat.com>
Sun, 11 Apr 1999 18:40:47 +0000 (18:40 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 11 Apr 1999 18:40:47 +0000 (18:40 +0000)
* compile.am (.s.o): Removed.
(.S.o): Likewise.
* automake.in: Register `asm' language.
(lang_asm_finish): Generate suffix rules for assembly.
(get_object_extension): Don't add `.s' or `.S' to suffix list.

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

index 5f2e861..4d59151 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 1999-04-11  Tom Tromey  <tromey@cygnus.com>
 
+       Assembly code no longer included by default:
+       * compile.am (.s.o): Removed.
+       (.S.o): Likewise.
+       * automake.in: Register `asm' language.
+       (lang_asm_finish): Generate suffix rules for assembly.
+       (get_object_extension): Don't add `.s' or `.S' to suffix list.
+
        * automake.in (get_object_extension): Substitute @MINUSO@ when
        including compile.am.
        * compile.am (.c.o): Added @MINUSO@.
diff --git a/TODO b/TODO
index c778e41..39bab4e 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,10 +1,11 @@
 * Test subdir-objects option with yacc, lex, ansi2knr
-  Test `compile' program
   Our locking scheme won't prevent a parallel make from losing
   if there are two `bar.o' files and the timing is just right
   This only happens with parallel make and no-`-c -o' compiler,
   so it probably isn't very important
-  change compile.am and lang_c_finish to deal with -c -o.
+  `-c -o' when doing libtool
+  try to find a losing compiler and see if it really works.
+  (actually: hack config.cache and do it)
 
 * Run automake before libtool.  It will report an error but
   still won't put the file into the disty.  This is wrong.
@@ -14,8 +15,6 @@
   but really it should be a configure variable, shouldn't it?
   There are other examples of this
 
-* Get rid of .s.o and .S.o rules unless assembly source is seen.
-
 * in gnu/gnits mode, give error if Makefile.am overrides a user
   variable like CFLAGS.
 
index d0b50e8..c7c0866 100755 (executable)
@@ -343,6 +343,7 @@ $obsolete_rx = '(' . join ('|', keys %obsolete_macros) . ')';
                    'r');
 &register_language ('java', 'linker=GCJLINK', 'autodep=GCJ',
                    'java');
+&register_language ('asm', 's', 'S');
 
 
 # Parse command line.
@@ -835,7 +836,7 @@ sub get_object_extension
            }
        }
 
-       push (@suffixes, '.c', '.o', '.S', '.s');
+       push (@suffixes, '.c', '.o');
        push (@suffixes, '.obj') if $seen_objext;
        push (@clean, 'compile');
 
@@ -4963,8 +4964,22 @@ sub lang_lexxx_finish
 
 sub lang_asm_finish
 {
-    # Pretend we're C.
+    # We need the C code for assembly.
     &lang_c_finish;
+
+    # We also need our own rules.
+    local (@asm_list) = &lang_extensions ('am');
+    local ($ext);
+    foreach $ext (@asm_list)
+    {
+       $output_rules .= ("$ext.o:\n"
+                         . "\t\$(COMPILE) -c \$<\n");
+       # FIXME: Using cygpath should be somehow conditional.
+       $output_rules .= ("$ext.obj:\n"
+                         . "\t\$(COMPILE) -c `cygpath -w \$<`\n")
+           if $seen_objext;
+       # FIXME: what about `.lo' and asm?
+    }
 }
 
 sub lang_f77_finish
index 8c755f7..e0a6eb1 100644 (file)
@@ -23,12 +23,6 @@ OBJEXT# and only if it is available.
 OBJEXT.c.obj:
 OBJEXT $(COMPILE) -c@MINUSO@ `cygpath -w $<`
 
-.s.o:
-       $(COMPILE) -c $<
-
-.S.o:
-       $(COMPILE) -c $<
-
 mostlyclean-compile:
 ## Don't remove 'core.*' because some distributions have eg "core.c".
 ## 4.4BSD systems use `PROG.core'.
index 8c755f7..e0a6eb1 100644 (file)
@@ -23,12 +23,6 @@ OBJEXT# and only if it is available.
 OBJEXT.c.obj:
 OBJEXT $(COMPILE) -c@MINUSO@ `cygpath -w $<`
 
-.s.o:
-       $(COMPILE) -c $<
-
-.S.o:
-       $(COMPILE) -c $<
-
 mostlyclean-compile:
 ## Don't remove 'core.*' because some distributions have eg "core.c".
 ## 4.4BSD systems use `PROG.core'.