[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with AC_CONFIG_FILES targets that contain variables
From: |
Sander Niemeijer |
Subject: |
Problem with AC_CONFIG_FILES targets that contain variables |
Date: |
Thu, 21 Aug 2008 17:24:08 +0200 |
Hi,
I found the following problem with autoconf version 2.62.
When taking the minimal example with a configure.ac:
----
AC_INIT(foo, 1.0)
AC_CONFIG_FILES([foo-$PACKAGE_VERSION:foo.in])
AC_OUTPUT
----
and a file foo.in containing e.g.:
----
@PACKAGE_VERSION@
----
When running configure it correctly creates the file 'foo-1.0'.
However when I then try to run config.status for the file I get:
----
$ config.status foo-1.0
config.status: error: invalid argument: foo-1.0
----
The problem is that inside config.status there is the line:
----
"foo-$PACKAGE_VERSION") CONFIG_FILES="$CONFIG_FILES foo-
$PACKAGE_VERSION:foo.in" ;;
----
but PACKAGE_VERSION is not defined inside config.status.
It appears that in another place inside config.status there is mention
of the exact string 'foo-1.0', e.g.:
----
# Files that config.status was made for.
config_files=" foo-1.0:foo.in"
----
This makes me think that it must be possible to change autoconf such
that it replaces the line with $PACKAGE_VERSION to a version that has
evaluated versions of variables:
----
"foo-1.0") CONFIG_FILES="$CONFIG_FILES foo-1.0:foo.in" ;;
----
Is this something that can be implemented for a next version?
Right now it gives me problems when also using automake and I change
foo.in. The dependency relation then tries to regenerate foo-1.0 by
running 'config.status foo-1.0', but, as explained, this fails.
Best regards,
Sander Niemeijer
- Problem with AC_CONFIG_FILES targets that contain variables,
Sander Niemeijer <=