Re: Fix in-src-tree builds by making gdbserver/gnulib/ a separate library (a la libiberty, etc.), and adding ACX_CONFIGURE_DIR.

Pedro Alves
2012-04-18T13:04:16Z

On 04/18/2012 01:51 PM, Jan Kratochvil wrote:

> On Wed, 18 Apr 2012 14:40:18 +0200, Pedro Alves wrote:
>> > This is no different from src/gdb/ vs build/gdb.
> I (and I guess most of the users) always use just in-src-tree-build with src/
> and no separate build/ .

Eh. Why would you prefer doing things that way?

> From my point of view it does not matter how it
> looks in the out-of-src-tree build. I understand you have to introduce
> separate build directory for gnulib/ in your layout.
>
> Couldn't you just use
> gdb/configure.ac: ACX_CONFIGURE_DIR(["gnulib-src"], ["build-gnulib-gdb"])
> gdb/gdbserver/configure.ac: ACX_CONFIGURE_DIR(["../gnulib-src"], ["build-gnulib-gdbserver"])
> and having during in-src-tree build:
> src/gdb/gnulib-src/gnulib/
> src/gdb/build-gnulib-gdb/gnulib/
> src/gdb/gdbserver/build-gnulib-gdbserver/gnulib/

I could, but look at those duplicate "gnulib/"s anyway...

>

> I would be mostly OK also with:
> gdb/configure.ac: ACX_CONFIGURE_DIR(["gnulib-src"], ["build-gnulib"])
> gdb/gdbserver/configure.ac: ACX_CONFIGURE_DIR(["../gnulib-src"], ["build-gnulib"])
> +
> src/gdb/gnulib-src/gnulib/
> src/gdb/build-gnulib/gnulib/
> src/gdb/gdbserver/build-gnulib/gnulib/

All those duplicate "gnulib/"s again...

I really don't think we should complicate the build to somehow change that.
I think you'll have cases like these if you build gcc in tree, for example.

--
Pedro Alves