]> git.karo-electronics.de Git - linux-beck.git/commitdiff
kbuild: unconditionally clobber include/linux/version.h on distclean
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 13 Feb 2014 21:28:58 +0000 (16:28 -0500)
committerMichal Marek <mmarek@suse.cz>
Sat, 29 Mar 2014 19:58:18 +0000 (20:58 +0100)
As of v3.7, the UAPI changes relocated headers around such that the
kernel version header lived in a new place.

If a person is bisecting and if you go back to pre-UAPI days,
you will create an include/linux/version.h  -- then if you checkout a
post-UAPI kernel, and even run "make distclean" it still won't delete
that old version file.  So you get a situation like this:

$ grep -R LINUX_VERSION_CODE include/
include/generated/uapi/linux/version.h:#define LINUX_VERSION_CODE 200192
include/linux/version.h:#define LINUX_VERSION_CODE 132646

The value in that second line is representative of a v2.6.38 version.
And it will be sourced/used, hence leading to strange behaviours, such
as drivers/staging content (which typically hasn't been purged of version
ifdefs) failing to build.

Since it is a subtle mode of failure, lets always clobber the old
file when doing a distclean.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Makefile

index 606ef7c4a544913bf0fdcd6c4b62a359d5ad8e53..aae58aad01c5d6f2dcf4392adf8c924afd8396d3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1070,7 +1070,7 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
                  Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
                  signing_key.priv signing_key.x509 x509.genkey         \
                  extra_certificates signing_key.x509.keyid             \
-                 signing_key.x509.signer
+                 signing_key.x509.signer include/linux/version.h
 
 # clean - Delete most, but leave enough to build external modules
 #