This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Remove files in make clean
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 23 Nov 2014 14:17:34 +0400
- Subject: Re: [RFC] Remove files in make clean
- Authentication-results: sourceware.org; auth=none
- References: <1416224764-5607-1-git-send-email-yao at codesourcery dot com>
> I am looking at how 'make clean' in testsuite/ directory remove files
> generated during testing. We manually maintain a list of
> executables and shared libraries in Makefile.in, and they are removed
> in 'make clean'. However, the list will be stale as the code evolves.
> I am wondering a better approach than the current one. I find
> that name of most the executables is the same as the name of .exp or
> .c file, so I modify clean target in testsuite/Makefile.in to delete
> executables according to the name of .exp and .c file, in a
> speculative way. As a result, the manually maintained list in
> testsuite/gdb.XXX/Makefile.in is shorter, only executables, which are
> not covered by the speculation, should be listed. So this approach
> is a hybrid approach, that is most of the executables can be removed,
> without any special care and special care is needed for the rest of them.
>
> This is a RFC, because I'd like ask people's opinion on this. If it
> is good, I'll update other gdb.XXX/Makefile.in.
>
> gdb/testsuite:
>
> 2014-11-17 Yao Qi <yao@codesourcery.com>
>
> * Makefile.in (clean): Remove files according to .exp and .c
> file name in srcdir.
> * gdb.base/Makefile.in (EXECUTABLES): Remove some entries.
FWIW, I think we should give it a try, and see how well this works
in practice. I agree with Yao that this is an issue (one that I have
given up on, especially since I moved to out-of-tree builds).
--
Joel