bug-autoconf
[Top][All Lists]
Advanced

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

Invalid @srcdir@ for files outside srcdir in sub-configures


From: Bert Wesarg
Subject: Invalid @srcdir@ for files outside srcdir in sub-configures
Date: Thu, 20 Feb 2014 14:09:40 +0100

Hi,

If one wants to substitue @srcdir@ in AC_CONFIG_FILES generated by an
sub-configure, the result is an invalid path, if the target files is
not below that configure.

Let me demonstrate this:

---- 8< configure 8< -----
AC_PREREQ([2.69])
AC_INIT([autotools-srcdir-bug], [1.0])

AC_CONFIG_SUBDIRS([build])

AC_CONFIG_FILES([srcdir:test/srcdir.in])
AC_CONFIG_FILES([test/srcdir-top:test/srcdir.in])

AC_OUTPUT
---- >8 configure >8 -----

---- 8< build/configure 8< -----
AC_PREREQ([2.69])
AC_INIT([autotools-srcdir-bug], [1.0])

AC_CONFIG_FILES([srcdir:../test/srcdir.in])
AC_CONFIG_FILES([../test/srcdir-build:../test/srcdir.in])

AC_OUTPUT
---- >8 build/configure >8 -----

---- 8< test/srcdir.in 8< -----
address@hidden@
---- >8 test/srcdir.in >8 -----

For some unknown reason, configure needs an install-sh, and its not
providede by 'autoreconf --install' either.
---- 8< install-sh 8< -----
---- >8 install-sh >8 -----

After running autoreconf and ../configure from an vpath I get:

$ cat srcdir
srcdir=..

This looks correct.

$ cat test/srcdir-top
srcdir=../../test

This one too. @srcdir@ points to the directory where srcdir.in resides.

$ cat build/srcdir
srcdir=../../build

This one also looks correct, @srcdir@ points to 'build'.

$ cat test/srcdir-build
srcdir=../../../../build/../test

But this one is broken. It does not to resolve an valid path at all.

Am I doing something wrong, or is something broken in autoconf?

Thanks for any advice.

Kind Regards,
Bert Wesarg



reply via email to

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