Re: [PATCH v6 01/12] kbuild: add a tool to list files ignored by git
From: Masahiro Yamada
Date: Mon Feb 27 2023 - 04:51:55 EST
On Mon, Feb 27, 2023 at 5:25 PM Rasmus Villemoes
<rasmus.villemoes@xxxxxxxxx> wrote:
>
> 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
Right.
If you have a strict rule "I never build the kernel in-tree",
your source tree is kept clean.
So, tar will never include generated files.
But, how would you know if the source tree is really clean?
--
Best Regards
Masahiro Yamada