[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (wishlist) Automated lib-config script generation
From: |
akim |
Subject: |
Re: (wishlist) Automated lib-config script generation |
Date: |
Sat, 4 Aug 2001 02:48:34 +0200 |
User-agent: |
Mutt/1.3.18i |
On Fri, Aug 03, 2001 at 10:25:09PM +0100, Roger Leigh wrote:
> On Sat, Jul 28, 2001 at 06:26:56PM +0200, Tim Van Holder wrote:
> > > The actual advantage of your macro comes of course with config.status
> > > updates - I hope that I can at one day turn my macro into a form that
> > > adds its -config file output-generation into config.status. IIRC the
> > > new autoconf does support some helper routines for exactly that purpose.
> > > But it seems I don't have much time before mid of august to actually
> > > do it.
> >
> > Well, in case you generate a *-config.in in your macro, you can simply
> > add
> >
> > AC_CONFIG_FILES(*-config)
> >
> > to your macro and it will automagically create it for you.
>
> I have tried this, and it works:
>
> AC_CONFIG_FILES(translit([$1], [A-Z], [a-z])-config, chmod +x translit([$1],
> [A-Z], [a-z])-config)
> ])
>
> However, it does not work with automake:
>
> address@hidden:/tmp/tmp$ automake
> configure.in: 925: required file `./translit([$1.in' not found
> make: *** [Makefile.in] Error 1
>
> It seems as though automake parses configure.ac, but does not properly
> expand the macros, and so gets the name of the file wrong if it is not
> a literal. I have yet to try the latest automake (I'm using 1.4-p2),
> but would be interested if you could try the script.
>
> AC_CONFIG_FILES(foo-config, chmod +x foo-config)
> in configure.ac works fine.
This is the kind of things which are impossible to handle before 1.6
which will be based on Autoconf traces. Forget about it.
> I suppose AC_CONFIG_COMMANDS could be used instead, but it's not as
> clean. If automake had something like AM_IGNORE_FILE(), which could
> be given m4 code as well as literals, that would solve the problem.
That's a dirty workaround. Some day your wishes will become reality,
but today, it's just impossible. AC_CONFIG_COMMANDS might be a cleaner
workaround indeed.