From: Tom Tromey Date: Sun, 11 Apr 1999 18:40:47 +0000 (+0000) Subject: Assembly code no longer included by default: X-Git-Tag: last-merge-into-user-dep-gen-branch~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb72aeea1bbd729e7b6102214acadda3e22adabd;p=thirdparty%2Fautomake.git 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. --- diff --git a/ChangeLog b/ChangeLog index 5f2e861c5..4d591517b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 1999-04-11 Tom Tromey + 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 c778e41e9..39bab4e90 100644 --- 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. diff --git a/automake.in b/automake.in index d0b50e8a1..c7c08665e 100755 --- a/automake.in +++ b/automake.in @@ -343,6 +343,7 @@ $obsolete_rx = '(' . join ('|', keys %obsolete_macros) . ')'; 'r'); ®ister_language ('java', 'linker=GCJLINK', 'autodep=GCJ', 'java'); +®ister_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 diff --git a/compile.am b/compile.am index 8c755f78b..e0a6eb195 100644 --- a/compile.am +++ b/compile.am @@ -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'. diff --git a/lib/am/compile.am b/lib/am/compile.am index 8c755f78b..e0a6eb195 100644 --- a/lib/am/compile.am +++ b/lib/am/compile.am @@ -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'.