aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2014-11-27 16:13:17 +0100
committerMoyster <oysterized@gmail.com>2018-11-29 16:57:57 +0100
commit83a59365e88f4608489510c518dc2c9e5a08a853 (patch)
treefff4d2b53317c3281d26b4f86b8f073af7949a28
parented7222dac7ce30475d682aceaee499a751740d9c (diff)
kbuild: Automatically remove stale <linux/version.h> file
In 3.7, the file moved from include/linux/ to include/generated/uapi/linux/. The path in the #include directive remained the same for compatibility reasons, but this created a problem when bisecting. Commit 9c8cdb71 (kbuild: unconditionally clobber include/linux/version.h on distclean) fixes this, provided the user does make distclean between builds. Better not rely on the user and delete the stale file each time make is invoked. Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 93bc9243e..7bfb7f7ac 100644
--- a/Makefile
+++ b/Makefile
@@ -468,6 +468,7 @@ asm-generic:
# of make so .config is not included in this case either (for *config).
version_h := include/generated/uapi/linux/version.h
+old_version_h := include/linux/version.h
no-dot-config-targets := clean mrproper distclean \
cscope gtags TAGS tags help %docs check% coccicheck \
@@ -952,6 +953,7 @@ endef
$(version_h): $(srctree)/Makefile FORCE
$(call filechk,version.h)
+ $(Q)rm -f $(old_version_h)
include/generated/utsrelease.h: include/config/kernel.release FORCE
$(call filechk,utsrelease.h)