bug-automake
[Top][All Lists]
Advanced

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

Re: (wishlist) Automated lib-config script generation


From: Roger Leigh
Subject: Re: (wishlist) Automated lib-config script generation
Date: Fri, 3 Aug 2001 22:25:09 +0100
User-agent: Mutt/1.2.5i

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.

However, whichever you use, it complains that the file is missing.
automake should provide some mechanism of telling it that certain
files *should not* be distributed, as it doesn't seem like it was
designed to cope with .in files being generated *by* configure on
the fly.

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.

Regards,
Roger

-- 
Roger Leigh ** Registration Number: 151826, http://counter.li.org **
Need Epson Stylus Utilities? http://gimp-print.sourceforge.net/
For GPG Public Key: finger address@hidden or see public keyservers.

Attachment: ac_create_libconfig_in.m4.gz
Description: Binary data


reply via email to

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