ac-archive-maintainers
[Top][All Lists]
Advanced

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

Re: ax_obsolete


From: Tom Howard
Subject: Re: ax_obsolete
Date: Tue, 25 Jan 2005 09:02:21 +1100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Peter Simons wrote:
> Tom Howard writes:
>
>  > I'll finish the licence changes (there is a bit of a
>  > backlog at the moment) and then look at this again.
>
> Okay, cool!
>
>
>  > dnl @synopsis AX_OBSOLETE(MACRO_NAME],[WHEN],[DETAILS],[REPLACEMENT])
>  > AC_DEFUN([AX_OBSOLETE],[
>  >    echo "Warning: $1 was made obsolete on $2"
>  >    echo "$3"
>  >    echo "Warning: Please replace with \'$4\'"
>  > ])
>
> Looks simple enough. It would be nice if that macro wrapped
> AC_OBSOLETE to print the actual warning if that's possible.

Yep.  I didn't actually know about AC_OBSOLETE until now.

@synopsis AX_OBSOLETE([$0],[WHEN],[DETAILS],[REPLACEMENT])
AC_DEFUN([AX_OBSOLETE],[
        AC_OBSOLETE([$1],[
$1 was made obsolete on $2
$3
Please replace with '$4'
]])

Something like the above should do the trick, though I still need to
make $4 optional.

>  > and here is an example
>
>  > AC_DEFUN([AX_FOOBAR],[
>  > # whatever is in here
>  > ])
>
>  > AC_DEFUN([AC_FOOBAR],[
>  > AX_OBSOLETE([AC_FOOBAR],[2005-01-24],[The Autoconf macro archive now
>  > prefixes it's macros with AX_, rather than AC_.  This is in order to
>  > prevent naming conflicts with macros from Autoconf.],[AX_FOOBAR])
>  > AX_FOOBAR($1, $2, $3....)
>  > ])
>
> Very nice. I especially like the macro redirecting the call
> to the new one. I notice, though, that you didn't agree with
> my points about the obsoletion date being redundant here.
> ;-)

Yeah, I didn't ;)  The obsolescence date in not redundant because the
macro may be significantly changed after it is made obsolete.  For
instance, just say a macro is made obsolete because a new very simple
check is made available and we suggest they use that instead.  Now along
comes Joe coder for platform X and finds the simple test doesn't work
and creates a macro that does a more complex test on platform X and the
simple test everywhere else.  For completeness, the old macro now needs
to be updated to point to the new macro, which changes the
version/last_modified data but this does not change the obsolescence
date.  So while most of the time the obsolescence date and the
version/last_modified will be the same, it is not always the case.

Cheers,

--
Tom Howard

Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x433B299A

Attachment: tomhoward.vcf
Description: Vcard

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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