autoconf
[Top][All Lists]
Advanced

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

Re: CONFIG_FILES


From: Stepan Kasal
Subject: Re: CONFIG_FILES
Date: Mon, 27 Dec 2004 14:55:32 +0100
User-agent: Mutt/1.4.1i

Hello,
  you described the following problem with autoconf-generated config.status:

On Wed, Dec 22, 2004 at 10:34:36PM +0100, wolfgang haefelinger wrote:
> autoconf manual states in 15.1 that
> >> `config.status' now supports arguments to specify the files to 
> >> instantiate [..] Before, environment variables had to be used. 
> 
> Perhaps a known problem but the new approach is not identical to
> the old one.
> 
> This works well:
> 
>  $ CONFIG_FILES=./Makefile config.status
>  config.status: creating ./Makefile
> 
> But this fails:
> 
>  $ ./config.status ./Makefile 
>  config.status: error: invalid argument: ./Makefile
> 
> I'm using GNU autoconf 2.59.

Indeed, the two commands are not equivalent.  The following two commands
would be:
        CONFIG_COMMANDS= CONFIG_LINKS= CONFIG_FILES=./Makefile \
                CONFIG_HEADERS= ./config.status
        ./config.status --file ./Makefile

Both the obsolete CONFIG_* variables and modern --file and --header
option are general commands to create files which may not have been
listed in the original configure.ac.

The shortcut
        ./config.status Makefile
is different--it says, in effect
        ``Create the file Makefile mentioned in configure.ac.''

The difference is that with --file (or CONFIG_*) you have to list the
prerequisities (template), while with a plain argument to config.status
you need not (and cannot) specify the prerequisities.

The difference can be illustrated on an example of GNU awk, shipped as
gawk-3.1.4.tar.bz2:
configure.ac specifies
        AC_CONFIG_FILES([version.c:version.in])

You can make use of this declaration this way:

        ./config.status version.c

then the string "version.c" is the same as the name of the file used in
the declaration. and config.status finds out that it is to be created
from version.in.

If you use the --file or CONFIG_FILE method, you have to copy the full
specification, with the template name:

        ./config.status --file version.c:version.in
or
        CONFIG_COMMANDS= CONFIG_LINKS= CONFIG_FILES=version.c:version.in \
                CONFIG_HEADERS= ./config.status

HTH,
        Stepan Kasal




reply via email to

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