Re: [PATCH v6 01/12] kbuild: add a tool to list files ignored by git
From: Rasmus Villemoes
Date: Mon Feb 27 2023 - 03:31:42 EST
On 15/02/2023 02.20, Masahiro Yamada wrote:
> In short, the motivation of this commit is to build a source package
> without cleaning the source tree.
>
> The deb-pkg and (src)rpm-pkg targets first run 'make clean' before
> creating a source tarball. Otherwise build artifacts such as *.o,
> *.a, etc. would be included in the tarball. Yet, the tarball ends up
> containing several garbage files since 'make clean' does not clean
> everything.
>
> Cleaning the tree every time is annoying since it makes the incremental
> build impossible. It is desirable to create a source tarball without
> cleaning the tree.
>
> In fact, there are some ways to achieve this.
> The easiest solution is 'git archive'.
Eh, no, the easiest solution is to just don't build in-tree? Can you
explain why 'make O=/over/there' isn't sufficient for whatever it is you
really want to do here?
Rasmus