autoconf-patches
[Top][All Lists]
Advanced

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

Re: FYI: remove documentation for AU_DEFUN's third parameter


From: Akim Demaille
Subject: Re: FYI: remove documentation for AU_DEFUN's third parameter
Date: Mon, 24 Nov 2003 16:57:30 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

 > The third parameter did not work anymore; it was passed AC_DEFUN from
 > which it went into oblivion.  Only AC_LINK_FILES still used it, so I
 > moved the warning to the expanded body as done by AC_USG, AC_CYGWIN
 > and other macros.

The fact that it ceased to work is probably related to the fact that
we no longer handle the warnings the same way :(

I believe that your patch leaves warning in the updated file.  That
was not the goal: the goal is to issue a warning until the macro is
updated.  Some macros need work by hand, and in that case you put the
warning as part of the macro update itself, to force the user to go
and edit her code by hand.

AU_DEFINE does not use its $3 certainly because it was listened to via
traces.

The patch should be reverted.

 > Committed as obvious, regtested together with the other two patches.

 > Paolo
 > 2003-11-24  Paolo Bonzini  <address@hidden>

 >      * doc/autoconf/autoconf.texi (Obsoleting Macros): Don't
 >      document the third parameter of AU_DEFUN.
 >      * lib/autoconf/autoupdate.m4 (AU_DEFINE): Remove.
 >      (AU_DEFUN): Remove the third parameter, it was not used.
 >      Use AC_DEFUN directly, not AU_DEFINE.
 >      * lib/autoconf/status.m4 (AC_LINK_FILES): Move the message
 >      into the expanded body, consistently with other macros
 >      such as AC_USG.

 > diff -rNU3 autoconf-2.59/lib/autoconf/autoupdate.m4 
 > autoconf-2.59-autoupdate/lib/autoconf/autoupdate.m4
 > --- autoconf-2.59/lib/autoconf/autoupdate.m4 2003-11-14 20:14:26.000000000 
 > +0100
 > +++ autoconf-2.59-autoupdate/lib/autoconf/autoupdate.m4      2003-11-23 
 > 23:31:04.000000000 +0100
 > @@ -50,22 +50,12 @@
 >  # Roland McGrath, Noah Friedman, david d zuhn, and many others.
 
 
 > -## --------------------------------- ##
 > -## Defining macros in autoupdate::.  ##
 > -## --------------------------------- ##
 > +## ----------------------------------- ##
 > +## Defining macros to be autoupdated.  ##
 > +## ----------------------------------- ##
 
 
 > -# AU_DEFINE(NAME, GLUE-CODE, [MESSAGE])
 > -# -------------------------------------
 > -#
 > -# Declare `autoupdate::NAME' to be `GLUE-CODE', with all the needed
 > -# wrapping actions required by `autoupdate'.
 > -# We do not define anything in `autoconf::'.
 > -m4_define([AU_DEFINE],
 > -[AC_DEFUN([$1], [$2])])
 > -
 > -
 > -# AU_DEFUN(NAME, NEW-CODE, [MESSAGE])
 > +# AU_DEFUN(NAME, NEW-CODE)
 >  # -----------------------------------
 >  # Declare that the macro NAME is now obsoleted, and should be replaced
 >  # by NEW-CODE.  Tell the user she should run autoupdate, and include
 > @@ -77,12 +67,10 @@
 >  # and to update a configure.ac.
 >  # See `acobsolete.m4' for a longer description.
 >  m4_define([AU_DEFUN],
 > -[AU_DEFINE([$1],
 > +[AC_DEFUN([$1],
 >         [AC_DIAGNOSE([obsolete], [The macro `$1' is obsolete.
 >  You should run autoupdate.])dnl
 > -$2],
 > -       [$3])dnl
 > -])
 > +$2])])
 
 
 >  # AU_ALIAS(OLD-NAME, NEW-NAME)
 > diff -rNU3 autoconf-2.59/lib/autoconf/status.m4 
 > autoconf-2.59-autoupdate/lib/autoconf/status.m4
 > --- autoconf-2.59/lib/autoconf/status.m4     2003-11-14 20:14:26.000000000 
 > +0100
 > +++ autoconf-2.59-autoupdate/lib/autoconf/status.m4  2003-11-23 
 > 23:38:27.000000000 +0100
 > @@ -731,7 +731,12 @@
 >  #
 >  # _AC_LINK_CNT is used to be robust to multiple calls.
 >  AU_DEFUN([AC_LINK_FILES],
 > -[m4_if($#, 2, ,
 > +[AC_DIAGNOSE([obsolete], [
 > +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_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
 >  ac_sources="$1"
 > @@ -742,11 +747,7 @@
 >    
 > [ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT 
 > $ac_dest:$ac_source"
 >  done
 >  AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl
 > -],
 > -[
 > -  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.
 > diff -rNU3 autoconf-2.59/doc/autoconf.texi 
 > autoconf-2.59-autoupdate/doc/autoconf.texi
 > --- autoconf-2.59/doc/autoconf.texi     2003-11-14 20:14:26.000000000 +0100
 > +++ autoconf-2.59-autoupdate/doc/autoconf.texi  2003-11-23 
 > 23:51:09.000000000 +0100
 > @@ -8827,16 +8827,18 @@

 >  Autoconf provides a simple means to obsolete a macro.

 > address@hidden AU_DEFUN (@var{old-macro}, @var{implementation}, 
 > @ovar{message})
 > address@hidden AU_DEFUN (@var{old-macro}, @var{implementation})
 >  @acindex{DEFUN}
 >  @acindex{AU_DEFUN}
 >  Define @var{old-macro} as @var{implementation}.  The only difference
 >  with @code{AC_DEFUN} is that the user will be warned that
 > address@hidden is now obsolete.
 > address@hidden is now obsolete; if she then uses @command{autoupdate},
 > +the call to @var{old-macro} will be replaced by the modern
 > address@hidden

 > -If she then uses @command{autoupdate}, the call to @var{old-macro} will be
 > -replaced by the modern @var{implementation}.  The additional
 > address@hidden is then printed.
 > +Note that you can provide another definition with @code{AC_DEFUN} in
 > +order to update the way a macro is used without making it completely
 > +obsolete.
 >  @end defmac

 >  @node Coding Style




reply via email to

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