[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make compiling *.S CPPFLAGS aware
From: |
Alexandre Duret-Lutz |
Subject: |
Re: Make compiling *.S CPPFLAGS aware |
Date: |
Sun, 10 Oct 2004 17:34:48 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
I'm checking this in.
2004-10-10 Ralf Corsepius <address@hidden>
* automake.in (Languages): Split .s (asm) and .S (cppasm) into
separate languages. Make cppasm (Preprocessed Assembler) aware
of CPPFLAGS, AM_CPPFLAGS.
(handle_languages): Fix typo.
(lang_cppasm_rewrite): New function.
Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.287
diff -u -r1.287 NEWS
--- NEWS 26 Sep 2004 21:11:32 -0000 1.287
+++ NEWS 10 Oct 2004 15:32:37 -0000
@@ -9,6 +9,10 @@
- The rebuild rules for distributed Yacc and Lex output will avoid
overwriting existing files if AM_MAINTAINER_MODE and maintainer-mode
is not enabled.
+
+ - Preprocessed assembler (*.S) compilation now honnor CPPFLAGS,
+ AM_CPPFLAGS and per-target _CPPFLAGS, unlike non-preprocessed
+ assembler (*.s).
New in 1.9:
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1584
diff -u -r1.1584 automake.in
--- automake.in 28 Sep 2004 22:02:33 -0000 1.1584
+++ automake.in 10 Oct 2004 15:32:41 -0000
@@ -801,12 +801,28 @@
'config_vars' => ['CCAS', 'CCASFLAGS'],
'flags' => ['CCASFLAGS'],
- # Users can set AM_ASFLAGS to includes DEFS, INCLUDES,
- # or anything else required. They can also set AS.
+ # Users can set AM_CCASFLAGS to include DEFS, INCLUDES,
+ # or anything else required. They can also set CCAS.
'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);
+
+# Preprocessed Assembler.
+register_language ('name' => 'cppasm',
+ 'Name' => 'Preprocessed Assembler',
+ 'config_vars' => ['CCAS', 'CCASFLAGS'],
+
+ 'flags' => ['CCASFLAGS','CPPFLAGS'],
+ # Users can set AM_ASFLAGS to include DEFS, INCLUDES,
+ # or anything else required. They can also set CCAS.
+ 'compile' => '$(CCAS) $(AM_CPPFLAGS) $(CPPFLAGS)
$(AM_CCASFLAGS) $(CCASFLAGS)',
+ 'compiler' => 'CPPASCOMPILE',
+ 'compile_flag' => '-c',
+ 'extensions' => ['.S'],
# With assembly we still use the C linker.
'_finish' => \&lang_c_finish);
@@ -1386,7 +1402,7 @@
%transform, %lang);
# If the source to a program consists entirely of code from a
- # `pure' language, for instance C++ for Fortran 77, then we
+ # `pure' language, for instance C++ or Fortran 77, then we
# don't need the C compiler code. However if we run into
# something unusual then we do generate the C code. There are
# probably corner cases here that do not work properly.
@@ -5190,6 +5206,12 @@
return &lang_sub_obj;
}
+# Rewrite a single preprocessed assembly file.
+sub lang_cppasm_rewrite
+{
+ return &lang_sub_obj;
+}
+
# Rewrite a single Fortran 77 file.
sub lang_f77_rewrite
{
--
Alexandre Duret-Lutz
- Re: Make compiling *.S CPPFLAGS aware,
Alexandre Duret-Lutz <=