* [PATCH] kbuild: do not overwrite .gitignore in output directory
@ 2019-03-26 4:26 Masahiro Yamada
2019-03-27 19:20 ` Andre Przywara
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2019-03-26 4:26 UTC (permalink / raw)
To: linux-kbuild
Cc: Andre Przywara, Vladimir Kondratiev, Masahiro Yamada,
Michal Marek, linux-kernel
Commit 3a51ff344204 ("kbuild: gitignore output directory") seemed to
bother people who version-control output directories.
Andre Przywara says:
"Unfortunately this breaks my setup, because I keep a totally separate
git repository in my build directories to track (various versions of)
.config. So .gitignore there is carefully crafted to ignore most build
artefacts, but not .config, for instance."
Link: https://lkml.org/lkml/2019/3/22/1819
Reported-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 5fe5431..70fc778 100644
--- a/Makefile
+++ b/Makefile
@@ -499,7 +499,8 @@ outputmakefile:
ifneq ($(KBUILD_SRC),)
$(Q)ln -fsn $(srctree) source
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
- $(Q){ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
+ $(Q)test -e .gitignore || \
+ { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
endif
ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: do not overwrite .gitignore in output directory
2019-03-26 4:26 [PATCH] kbuild: do not overwrite .gitignore in output directory Masahiro Yamada
@ 2019-03-27 19:20 ` Andre Przywara
2019-03-28 9:07 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Andre Przywara @ 2019-03-27 19:20 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-kbuild, Vladimir Kondratiev, Michal Marek, linux-kernel
On Tue, 26 Mar 2019 13:26:58 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
Masahiro,
> Commit 3a51ff344204 ("kbuild: gitignore output directory") seemed to
> bother people who version-control output directories.
Thanks a lot for the patch, that works for me.
> Andre Przywara says:
> "Unfortunately this breaks my setup, because I keep a totally separate
> git repository in my build directories to track (various versions of)
> .config. So .gitignore there is carefully crafted to ignore most build
> artefacts, but not .config, for instance."
>
> Link: https://lkml.org/lkml/2019/3/22/1819
> Reported-by: Andre Przywara <andre.przywara@arm.com>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre.
> ---
>
> Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 5fe5431..70fc778 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -499,7 +499,8 @@ outputmakefile:
> ifneq ($(KBUILD_SRC),)
> $(Q)ln -fsn $(srctree) source
> $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
> - $(Q){ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
> + $(Q)test -e .gitignore || \
> + { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
> endif
>
> ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: do not overwrite .gitignore in output directory
2019-03-27 19:20 ` Andre Przywara
@ 2019-03-28 9:07 ` Masahiro Yamada
0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2019-03-28 9:07 UTC (permalink / raw)
To: Andre Przywara
Cc: Linux Kbuild mailing list, Vladimir Kondratiev, Michal Marek,
Linux Kernel Mailing List
On Thu, Mar 28, 2019 at 4:20 AM Andre Przywara <andre.przywara@arm.com> wrote:
>
> On Tue, 26 Mar 2019 13:26:58 +0900
> Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
> Masahiro,
>
> > Commit 3a51ff344204 ("kbuild: gitignore output directory") seemed to
> > bother people who version-control output directories.
>
> Thanks a lot for the patch, that works for me.
>
> > Andre Przywara says:
> > "Unfortunately this breaks my setup, because I keep a totally separate
> > git repository in my build directories to track (various versions of)
> > .config. So .gitignore there is carefully crafted to ignore most build
> > artefacts, but not .config, for instance."
> >
> > Link: https://lkml.org/lkml/2019/3/22/1819
> > Reported-by: Andre Przywara <andre.przywara@arm.com>
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> Tested-by: Andre Przywara <andre.przywara@arm.com>
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Applied to linux-kbuild/fixes.
> Cheers,
> Andre.
>
> > ---
> >
> > Makefile | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 5fe5431..70fc778 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -499,7 +499,8 @@ outputmakefile:
> > ifneq ($(KBUILD_SRC),)
> > $(Q)ln -fsn $(srctree) source
> > $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
> > - $(Q){ echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
> > + $(Q)test -e .gitignore || \
> > + { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore
> > endif
> >
> > ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-28 9:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-26 4:26 [PATCH] kbuild: do not overwrite .gitignore in output directory Masahiro Yamada
2019-03-27 19:20 ` Andre Przywara
2019-03-28 9:07 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®