automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dependency tracking for .S assembler files


From: Bob Friesenhahn
Subject: Re: dependency tracking for .S assembler files
Date: Thu, 23 Sep 2004 10:50:19 -0500 (CDT)

How well does this patch work for filesystems which do not preserve case in file names? Do we need to support filesystems which don't preserve case?

Bob

On Wed, 22 Sep 2004, Martin Waitz wrote:

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


======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]