[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
style
From: |
Patrick Welche |
Subject: |
style |
Date: |
Fri, 31 Oct 2003 13:21:01 +0000 |
User-agent: |
Mutt/1.3.19i |
In the Fine Manual:
@node Coding Style
@section Coding Style
In order to highlight the recommended coding style, here is a macro
written the old way:
@example
dnl Check for EMX on OS/2.
dnl _AC_EMXOS2
AC_DEFUN(_AC_EMXOS2,
...
and the new way:
@example
# _AC_EMXOS2
# ----------
# Check for EMX on OS/2.
m4_define([_AC_EMXOS2],
Why the change AC_DEFUN -> m4_define ?
"Macro Definitions" says:
Autoconf macros are defined using the `AC_DEFUN' macro, which is
similar to the M4 builtin `m4_define' macro. In addition to defining a
macro, `AC_DEFUN' adds to it some code that is used to constrain the
order in which macros are called (*note Prerequisite Macros::).
An Autoconf macro definition looks like this:
AC_DEFUN(MACRO-NAME, MACRO-BODY)
and again the example shows:
m4_define([AC_MSG_ERROR],
rather than AC_DEFUN. So, what is considered good style?
Cheers,
Patrick