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

Jan Kratochvil
2012-04-18T12:52:40Z

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/ . 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 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 names have been chosen for friendly tab-completion.)

I did not try it, though.

Thanks,
Jan