Skip to content

Commit 223c24a

Browse files
committed
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 9c8cdb7 (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 <[email protected]> Cc: David Howells <[email protected]> Signed-off-by: Michal Marek <[email protected]>
1 parent 2d56030 commit 223c24a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ asm-generic:
480480
# of make so .config is not included in this case either (for *config).
481481

482482
version_h := include/generated/uapi/linux/version.h
483+
old_version_h := include/linux/version.h
483484

484485
no-dot-config-targets := clean mrproper distclean \
485486
cscope gtags TAGS tags help %docs check% coccicheck \
@@ -1004,6 +1005,7 @@ endef
10041005

10051006
$(version_h): $(srctree)/Makefile FORCE
10061007
$(call filechk,version.h)
1008+
$(Q)rm -f $(old_version_h)
10071009

10081010
include/generated/utsrelease.h: include/config/kernel.release FORCE
10091011
$(call filechk,utsrelease.h)
@@ -1172,7 +1174,7 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
11721174
Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
11731175
signing_key.priv signing_key.x509 x509.genkey \
11741176
extra_certificates signing_key.x509.keyid \
1175-
signing_key.x509.signer include/linux/version.h
1177+
signing_key.x509.signer
11761178

11771179
# clean - Delete most, but leave enough to build external modules
11781180
#

0 commit comments

Comments
 (0)