Re: [PATCH] gdbserver: start a gitignore

Eli Zaretskii
2010-12-22T11:24:28Z

> Date: Wed, 22 Dec 2010 08:45:18 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
>
> I'm OK but slightly hesitant to introduce a .gitignore for files that
> are compilation artifacts, not development artifacts. If we start
> on that road, the list is possibly quite long.

How long can it be? Something like *.o, *.so, *.exe, and a couple of
binaries we produce? Is that really a problem?

I see such exclusions in every GNU project I'm working on. I don't
think this road is too long ;-)

> I believe that we should encourage people to compile GDB using
> a build directory that is different from the source directory.

Right, but you cannot (and shouldn't, IMO) force people doing that by
such measures. People who want to build in the source tree will
complain, but will not stop doing that.

> Except I don't know why I think that! :-).

I do. From gdb/README:

You can build GDB right in the source directory:

cd gdb-VERSION
./configure
make
cp gdb/gdb /usr/local/bin/gdb (or wherever you want)

However, we recommend that an empty directory be used instead.
This way you do not clutter your source tree with binary files
and will be able to create different builds with different
configuration options.