Skip to content

Commit

Permalink
kbuild: do not overwrite .gitignore in output directory
Browse files Browse the repository at this point in the history
Commit 3a51ff3 ("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 <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
Tested-by: Andre Przywara <[email protected]>
Reviewed-by: Andre Przywara <[email protected]>
  • Loading branch information
masahir0y committed Mar 28, 2019
1 parent 221cc2d commit 156e7cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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),)
Expand Down

0 comments on commit 156e7cb

Please sign in to comment.