autoconf
[Top][All Lists]
Advanced

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

Re: macro archive re-launch


From: Bruce Korb
Subject: Re: macro archive re-launch
Date: Tue, 22 Jan 2002 22:48:38 -0800

Tim Van Holder wrote:

> > I want to generate all kinds of formats from the input, like plain
> > text, HTML, TeX, and nroff, and no tool I came across could do that.

> The same goes for TeXinfo - pretty much every GNU tool, and several
> non-GNU ones, use TeXinfo to write their documentation.  So if you have
> embedded TeXinfo, that can be extracted, along with info about the
> macro, either for standalone use, or to be part of some greater
> documentation (this is especially nice for autoconf & automake).
> 
> Something like this:
> 
> dnl## Macro: xyz_CHECK_FOO
> dnl## Author: Foo Bar
> dnl##
> dnl## Synopsis:
> dnl## The @code{xyz_CHECK_FOO} macro checks for the existence of
> dnl## @command{foo}, and makes sure it can be used properly.
> dnl## This macro does @strong{not} guarantee that the companion
> dnl## program @command{bar} will exist though; use
> dnl## @ref{xyz_CHECK_FOO_BAR} for that.

This already exists:

> dnl/*=Macro xyz_CHECK_FOO
> dnl * Author: Foo Bar
> dnl +
> dnl * Synopsis:
> dnl * The @code{xyz_CHECK_FOO} macro checks for the existence of
> dnl * @command{foo}, and makes sure it can be used properly.
> dnl * This macro does @strong{not} guarantee that the companion
> dnl + program @command{bar} will exist though; use
> dnl * @ref{xyz_CHECK_FOO_BAR} for that.
> dnl=*/

  http://Autogen.SourceForge.Net/doc/autogen_8.html#SEC242

>From there, the text can get inserted into any kind of
text output file.

Or, alternatively, you can form the entire thing as in:

  macro = {
    name   = allocated_ctime;
    type   = run;
    check  = "ctime() allocates memory for its result";
    action = define;
    code   = <<-  _EOF_
            #include <time.h>
            int main (int argc, char** argv) {
               time_t  timeVal = time( (time_t*)NULL );
               char*   pzTime  = ctime( &timeVal );
               free( (void*)pzTime );
               return 0; }
            _EOF_;
 
    doc =
    "Check whether we need to free the memory returned by ctime.";
  };

and let my boilerplate template fill in the repetitive stuff
that often gets done wrong by first timers.  It's the point
behind the do-it-yourself site:

  http://autogen.sourceforge.net/conftest.html



reply via email to

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