mirror of
git://git.sv.gnu.org/autoconf
synced 2025-03-01 14:16:02 +08:00
Revert the behavioral changes in AC_LINK_FILES, and add several
clarificataions about the brokenness of AU_DEFUN's third argument.
This commit is contained in:
parent
90f031cf0b
commit
abbcaca79f
@ -8846,18 +8846,16 @@ with their modern implementation.
|
|||||||
|
|
||||||
Autoconf provides a simple means to obsolete a macro.
|
Autoconf provides a simple means to obsolete a macro.
|
||||||
|
|
||||||
@defmac AU_DEFUN (@var{old-macro}, @var{implementation})
|
@defmac AU_DEFUN (@var{old-macro}, @var{implementation}, @ovar{message})
|
||||||
@acindex{DEFUN}
|
@acindex{DEFUN}
|
||||||
@acindex{AU_DEFUN}
|
@acindex{AU_DEFUN}
|
||||||
Define @var{old-macro} as @var{implementation}. The only difference
|
Define @var{old-macro} as @var{implementation}. The only difference
|
||||||
with @code{AC_DEFUN} is that the user will be warned that
|
with @code{AC_DEFUN} is that the user will be warned that
|
||||||
@var{old-macro} is now obsolete; if she then uses @command{autoupdate},
|
@var{old-macro} is now obsolete.
|
||||||
the call to @var{old-macro} will be replaced by the modern
|
|
||||||
@var{implementation}.
|
|
||||||
|
|
||||||
Note that you can provide another definition with @code{AC_DEFUN} in
|
If she then uses @command{autoupdate}, the call to @var{old-macro} will be
|
||||||
order to update the way a macro is used without making it completely
|
replaced by the modern @var{implementation}. In the future,
|
||||||
obsolete.
|
@command{autoupdate} will then print the additional @var{message}.
|
||||||
@end defmac
|
@end defmac
|
||||||
|
|
||||||
@node Coding Style
|
@node Coding Style
|
||||||
|
@ -50,17 +50,23 @@
|
|||||||
# Roland McGrath, Noah Friedman, david d zuhn, and many others.
|
# Roland McGrath, Noah Friedman, david d zuhn, and many others.
|
||||||
|
|
||||||
|
|
||||||
## ----------------------------------- ##
|
## ---------------------------------- ##
|
||||||
## Defining macros to be autoupdated. ##
|
## Macros to define obsolete macros. ##
|
||||||
## ----------------------------------- ##
|
## ---------------------------------- ##
|
||||||
|
|
||||||
|
|
||||||
# AU_DEFUN(NAME, NEW-CODE)
|
# AU_DEFUN(NAME, NEW-CODE, [MESSAGE])
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
# Declare that the macro NAME is now obsoleted, and should be replaced
|
# Declare that the macro NAME is now obsoleted, and should be replaced
|
||||||
# by NEW-CODE. Tell the user she should run autoupdate, and include
|
# by NEW-CODE. Tell the user she should run autoupdate, and include
|
||||||
# the additional MESSAGE.
|
# the additional MESSAGE.
|
||||||
#
|
#
|
||||||
|
# FIXME: MESSAGE should be grabbed with autom4te traces, and that's
|
||||||
|
# why it is never used in the body of the macro; however, as of 2003-11-25
|
||||||
|
# it is never used and it seems that it never was. Also, MESSAGE is
|
||||||
|
# used only once in AC_LINK_FILES, it may be the case to remove it from
|
||||||
|
# there. See the FIXME in AC_LINK_FILES as well.
|
||||||
|
#
|
||||||
# Also define NAME as a macro which code is NEW-CODE.
|
# Also define NAME as a macro which code is NEW-CODE.
|
||||||
#
|
#
|
||||||
# This allows to share the same code for both supporting obsoleted macros,
|
# This allows to share the same code for both supporting obsoleted macros,
|
||||||
|
@ -735,12 +735,7 @@ m4_define([AC_LIST_LINKS_COMMANDS])
|
|||||||
#
|
#
|
||||||
# _AC_LINK_CNT is used to be robust to multiple calls.
|
# _AC_LINK_CNT is used to be robust to multiple calls.
|
||||||
AU_DEFUN([AC_LINK_FILES],
|
AU_DEFUN([AC_LINK_FILES],
|
||||||
[AC_DIAGNOSE([obsolete], [
|
[m4_if($#, 2, ,
|
||||||
It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES
|
|
||||||
to AC_CONFIG_FILES. `autoupdate' provides a functional but inelegant
|
|
||||||
update, you should probably tune the result yourself and remove this
|
|
||||||
warning.])
|
|
||||||
m4_if($#, 2, ,
|
|
||||||
[m4_fatal([$0: incorrect number of arguments])])dnl
|
[m4_fatal([$0: incorrect number of arguments])])dnl
|
||||||
m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
|
m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
|
||||||
ac_sources="$1"
|
ac_sources="$1"
|
||||||
@ -751,7 +746,19 @@ while test -n "$ac_sources"; do
|
|||||||
[ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source"
|
[ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source"
|
||||||
done
|
done
|
||||||
AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl
|
AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl
|
||||||
])
|
],
|
||||||
|
dnl FIXME: Macros such as AC_USG put messages like this into an
|
||||||
|
dnl AC_DIAGNOSE macro, in the first parameter of AU_DEFUN. We cannot
|
||||||
|
dnl do the same with this one, because it makes no sense to print it
|
||||||
|
dnl when running `autoconf -W obsolete' on a configure script that uses
|
||||||
|
dnl AC_LINK_FILES. Instead, only `autoupdate' should print it (it may
|
||||||
|
dnl be acceptable that autoupdated configure scripts print this message
|
||||||
|
dnl when running `autoconf -W obsolete'). As of 2003-11-25, the third
|
||||||
|
dnl argument to AU_DEFUN is broken, so this is never seen by the user.
|
||||||
|
[
|
||||||
|
It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES
|
||||||
|
to AC_CONFIG_FILES. `autoupdate' provides a functional but inelegant
|
||||||
|
update, you should probably tune the result yourself.])# AC_LINK_FILES
|
||||||
|
|
||||||
|
|
||||||
# Initialize.
|
# Initialize.
|
||||||
|
Loading…
Reference in New Issue
Block a user