autoconf
[Top][All Lists]
Advanced

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

Re: GNU autogen code generation


From: Bruce Korb
Subject: Re: GNU autogen code generation
Date: Wed, 28 Apr 2010 15:04:09 -0700

Hi Matěj,

On Wed, Apr 28, 2010 at 1:48 PM, Matěj Týč <address@hidden> wrote:
> I am quite sure that one .tpl and .def tuple can result in multiple
> files, all of them having the same basename, but possibly different
> extensions.

The template defines what files get output.  It is entirely programmable.
The base name may or may not be used, but nearly always is.
And then there are the man page templates.  The base name is nearly
always wrong, since it won't match the program name.

>        1. Autogen "eats" the .def file.
>        2. It finds ONE .def file thanks to the information taken from the def
> file and optional command line switch
>        3. It looks to the .tpl file and generates results (I dare to say that
> most often it is just one file per template)

Likely, but I've had occasion where I was making 8 (??!!) different tables used
in different parts of a very large program.  There were 8 output files.
(Actually more, but that gets into stuff that is too complicated and
irrelevant.)

>        4. Multiple .def files can target one .tpl file, but I also dare to say
> that it is rather a rare case.

Not at all.  The "options.tpl" template(s) are used by many programs.
As are various associated man page templates.

> What came to my mind, as Mr. Autogen listens, what about equipping
> autogen with some "hint generator"? Like that I would pass it a
> definitions file and it would tell what it is up to, so automake
> wouldn't have to parse the stuff?

What *could* happen is to name some option to the thing similar to whatever
gcc uses and have it emit a dependency file showing all the output files
dependent upon all the input files.  Such a patch would gratefully be
accepted.  :)

> It would make things easier, although only that recent versions of
> autogen would be supported...
> How does this sound?

I always greatly appreciate any help anyone is willing to offer.

>> automake can (and does sometimes) look into the source file contents of
>> the files it deals with (e.g., texinfo files are checked for
>> @setfilename);

I have a hard time expressing just how completely awful that is.
That fancy little trick presumes that texinfo sources are always hand crafted
and, thus, present at pre-configure time.  It just ain't so.

> Maybe something like that could work to express that certain Makefile.am
> depends on a .tpl template?

gcc does exactly that, but I believe their solution is that if you
update Makefile.tpl
or Makefile.def, then you are responsible for regenerating the stuff.
My recollection
may be wrong, though, because I didn't do that coding and it was long
ago and far
away.....

>> AM_MISSING_PROG([AUTOGEN], [autogen])  ?
>
> As a side note, I have found quite difficult to find any documentation
> about this macro :-)

Mr. AutoGen is curious, to, as he hasn't played with that either.  :)




reply via email to

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