From b92cb34a6743d496660105df6a4351270f2e7d44 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 21 Jul 2001 18:35:20 +0000 Subject: [PATCH] * automake.texi (Macros): Document AM_PROG_AS. (Assembly Support): New node. * m4/Makefile.am (m4data_DATA): Added as.m4. * m4/as.m4: New file. --- ChangeLog | 5 +++++ automake.texi | 28 ++++++++++++++++++++++++++-- m4/Makefile.am | 2 +- m4/Makefile.in | 2 +- m4/as.m4 | 11 +++++++++++ 5 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 m4/as.m4 diff --git a/ChangeLog b/ChangeLog index a897f39..3532e64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2001-07-21 Tom Tromey + * automake.texi (Macros): Document AM_PROG_AS. + (Assembly Support): New node. + * m4/Makefile.am (m4data_DATA): Added as.m4. + * m4/as.m4: New file. + * automake.texi (Tags): Added uref to global tags. 2001-07-21 Tim Van Holder diff --git a/automake.texi b/automake.texi index 6ad2869..9a5ccbf 100644 --- a/automake.texi +++ b/automake.texi @@ -1385,6 +1385,11 @@ Searches for the program @code{emacs}, and, if found, sets the output variable @code{lispdir} to the full path to Emacs' site-lisp directory. @cvindex AM_PATH_LISPDIR +@item AM_PROG_AS +Use this macro when you have assembly code in your project. This will +choose the assembler for you (by default the C compiler), and will set +@code{ASFLAGS} if required. + @item AM_PROG_CC_C_O This is like @code{AC_PROG_CC_C_O}, but it generates its results in the manner required by automake. You must use this instead of @@ -1662,6 +1667,7 @@ to build programs and libraries. * Program variables:: Variables used when building a program * Yacc and Lex:: Yacc and Lex support * C++ Support:: +* Assembly Support:: * Fortran 77 Support:: * Java Support:: * Support for Other Languages:: @@ -2307,7 +2313,7 @@ These defines work for @code{bison}, @code{byacc}, and traditional covered here, please report the new name so it can be added to the list. -@node C++ Support, Fortran 77 Support, Yacc and Lex, Programs +@node C++ Support, Assembly Support, Yacc and Lex, Programs @section C++ Support @cindex C++ support @@ -2338,7 +2344,25 @@ The command used to actually link a C++ program. @end vtable -@node Fortran 77 Support, Java Support, C++ Support, Programs +@node Assembly Support, Fortran 77 Support, C++ Support, Programs +@section Assembly Support + +Automake includes some support for assembly code. + +The variable @code{AS} holds the name of the compiler used to build +assembly code. This compiler must work a bit like a C compiler; in +particular it must accept @samp{-c} and @samp{-o}. The value of +@code{ASFLAGS} is passed to the compilation. +@vindex AS +@vindex ASFLAGS + +You are required to set @code{AS} and @code{ASFLAGS} via +@file{configure.in}. The autoconf macro @code{AM_PROG_AS} will do this +for you. Unless they are already set, it simply sets @code{AS} to the C +compiler and @code{ASFLAGS} to the C compiler flags. + + +@node Fortran 77 Support, Java Support, Assembly Support, Programs @comment node-name, next, previous, up @section Fortran 77 Support diff --git a/m4/Makefile.am b/m4/Makefile.am index 5bc5d9f..f74cc4d 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to create Makefile.in m4datadir = $(datadir)/aclocal -m4data_DATA = auxdir.m4 ccstdc.m4 cond.m4 depend.m4 depout.m4 \ +m4data_DATA = as.m4 auxdir.m4 ccstdc.m4 cond.m4 depend.m4 depout.m4 \ dmalloc.m4 error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 make.m4 \ maintainer.m4 minuso.m4 missing.m4 multi.m4 obstack.m4 protos.m4 \ ptrdiff.m4 python.m4 regex.m4 sanity.m4 strip.m4 strtod.m4 termios.m4 \ diff --git a/m4/Makefile.in b/m4/Makefile.in index 42d3c0b..f8edbc9 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -67,7 +67,7 @@ _am_quote = @_am_quote@ install_sh = @install_sh@ m4datadir = $(datadir)/aclocal -m4data_DATA = auxdir.m4 ccstdc.m4 cond.m4 depend.m4 depout.m4 \ +m4data_DATA = as.m4 auxdir.m4 ccstdc.m4 cond.m4 depend.m4 depout.m4 \ dmalloc.m4 error.m4 gcj.m4 header.m4 init.m4 lex.m4 lispdir.m4 make.m4 \ maintainer.m4 minuso.m4 missing.m4 multi.m4 obstack.m4 protos.m4 \ ptrdiff.m4 python.m4 regex.m4 sanity.m4 strip.m4 strtod.m4 termios.m4 \ diff --git a/m4/as.m4 b/m4/as.m4 new file mode 100644 index 0000000..11d39d8 --- /dev/null +++ b/m4/as.m4 @@ -0,0 +1,11 @@ +# Figure out how to run the assembler. + +# AM_PROG_AS +AC_DEFUN([AM_PROG_AS], +[# By default we simply use the C compiler to build assembly code. +AC_REQUIRE([AC_PROG_CC]) +: ${AS='$(CC)'} +# Set ASFLAGS if not already set. +: ${ASFLAGS='$(CFLAGS)'} +AC_SUBST(AS) +AC_SUBST(ASFLAGS)]) -- 2.7.4