[Top][All Lists]

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

Re: Why is srcdir passed as .

From: Alexandre Oliva
Subject: Re: Why is srcdir passed as .
Date: 27 Oct 2000 00:49:08 -0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

On Oct 26, 2000, Ben Woodard <address@hidden> wrote:

>   ac_configure_args="${ac_configure_args} --enable-local-tdb=${srcdir}/tdb"

This is just plain wrong in case srcdir is a relative pathname.  The
problem isn't the `.' special-case, the problem is that this assumes
${srcdir} is absolute.  autoconf is designed to support relative
srcdir, and it takes a significant amount of trouble to do so
(the `.' special-case is part of that trouble).

Now, if *you* want your packages to support a relative srcdir, you'll
have to adjust ac_configure_args so as to adjust occurrences of a
relative ${srcdir} so that they become relative to the right
directory.  For example, given a tree:


Assume you enter `foo/build' and run `../configure'.  srcdir is `..'.
When `foo/configure' runs `foo/bar/configure' from within
`foo/build/bar', it will set srcdir to `../../bar', so that srcdir
points to the source tree of the bar sub-project.  This is all

You seem to want srcdir to start pointing to `../..', i.e., `foo',
even when running sub-packages' `configure's.  This would be just
wrong.  Each (sub-)package is supposed to have its own srcdir, that is
the root of its own tree.

If there are inter-dependencies between sub-directories, one might
just argue they're not really separate sub-packages, and you should
just use a single top-level configure for them all.  If you mean to
keep them separate, you have to take the same trouble autoconf takes
to adjust srcdir and do it for any other potentially relative

> This is not true in my experience. If I use Mo's trick and set srcdir
> to `cd $srcdir;pwd` or if I remove the special case for '.' then it
> still works with no modification to the subpackages configuration
> scripts.

Try `cd build; ../configure' after removing the `.' special case and
note that it won't work.  You're just barking up the wrong tree.

Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                  address@hidden,}
CS PhD student at IC-Unicamp        address@hidden,}
Free Software Evangelist    *Please* write to mailing lists, not to me

reply via email to

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