This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

dependency tracking for .S assembler files


Hi,

I'm working on a project which uses assembler files which get
preprocessed by the C preprocessor (.S files).
automake does not yet keep track of dependencies of these files.

The patch below fixes that for me.

=======================================================================
diff -urp automake-1.9.1/automake.in automake-ccasdepend/automake.in
--- automake-1.9.1/automake.in	Wed Sep 22 16:51:37 2004
+++ automake-ccasdepend/automake.in	Wed Sep 22 09:33:07 2004
@@ -785,7 +785,22 @@ register_language ('name' => 'asm',
 		   'compile' => '$(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)',
 		   'compiler' => 'CCASCOMPILE',
 		   'compile_flag' => '-c',
-		   'extensions' => ['.s', '.S'],
+		   'extensions' => ['.s'],
+
+		   # With assembly we still use the C linker.
+		   '_finish' => \&lang_c_finish);
+register_language ('name' => 'ASM',
+		   'Name' => 'Preprocessed Assembler',
+		   'config_vars' => ['CCAS', 'CCASFLAGS'],
+
+		   'autodep' => 'CCAS',
+		   'flags' => ['CCASFLAGS'],
+		   # Users can set AM_ASFLAGS to includes DEFS, INCLUDES,
+		   # or anything else required.  They can also set AS.
+		   'compile' => '$(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)',
+		   'compiler' => 'CCASCOMPILE',
+		   'compile_flag' => '-c',
+		   'extensions' => ['.S'],
 
 		   # With assembly we still use the C linker.
 		   '_finish' => \&lang_c_finish);
@@ -5141,6 +5156,10 @@ sub lang_lexxx_rewrite
 
 # Rewrite a single assembly file.
 sub lang_asm_rewrite
+{
+    return &lang_sub_obj;
+}
+sub lang_ASM_rewrite
 {
     return &lang_sub_obj;
 }
diff -urp automake-1.9.1/m4/init.m4 automake-ccasdepend/m4/init.m4
--- automake-1.9.1/m4/init.m4	Tue Apr 20 01:20:08 2004
+++ automake-ccasdepend/m4/init.m4	Wed Sep 22 09:42:44 2004
@@ -99,6 +99,10 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
                   [_AM_DEPENDENCIES(CXX)],
                   [define([AC_PROG_CXX],
                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_AS],
+                  [_AM_DEPENDENCIES(CCAS)],
+                  [define([AC_PROG_AS],
+                          defn([AC_PROG_AS])[_AM_DEPENDENCIES(CCAS)])])dnl
 ])
 ])
 
=======================================================================

-- 
Martin Waitz

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]