aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2014-11-27 10:13:17 -0500
committerMichal Marek <mmarek@suse.cz>2014-11-28 10:39:05 -0500
commit223c24a7dba9db1f5ec2ae501b7d342396e83a9a (patch)
tree7278ff181f43f71e21005365eedb41e5891f3258 /Makefile
parent2d560306096739e2251329ab5c16059311a151b0 (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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 88b7fa50f619..107eb9ed648f 100644
--- a/Makefile
+++ b/Makefile
@@ -480,6 +480,7 @@ asm-generic:
480# of make so .config is not included in this case either (for *config). 480# of make so .config is not included in this case either (for *config).
481 481
482version_h := include/generated/uapi/linux/version.h 482version_h := include/generated/uapi/linux/version.h
483old_version_h := include/linux/version.h
483 484
484no-dot-config-targets := clean mrproper distclean \ 485no-dot-config-targets := clean mrproper distclean \
485 cscope gtags TAGS tags help %docs check% coccicheck \ 486 cscope gtags TAGS tags help %docs check% coccicheck \
@@ -1004,6 +1005,7 @@ endef
1004 1005
1005$(version_h): $(srctree)/Makefile FORCE 1006$(version_h): $(srctree)/Makefile FORCE
1006 $(call filechk,version.h) 1007 $(call filechk,version.h)
1008 $(Q)rm -f $(old_version_h)
1007 1009
1008include/generated/utsrelease.h: include/config/kernel.release FORCE 1010include/generated/utsrelease.h: include/config/kernel.release FORCE
1009 $(call filechk,utsrelease.h) 1011 $(call filechk,utsrelease.h)
@@ -1172,7 +1174,7 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
1172 Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \ 1174 Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
1173 signing_key.priv signing_key.x509 x509.genkey \ 1175 signing_key.priv signing_key.x509 x509.genkey \
1174 extra_certificates signing_key.x509.keyid \ 1176 extra_certificates signing_key.x509.keyid \
1175 signing_key.x509.signer include/linux/version.h 1177 signing_key.x509.signer
1176 1178
1177# clean - Delete most, but leave enough to build external modules 1179# clean - Delete most, but leave enough to build external modules
1178# 1180#