Skip to content

Commit

Permalink
kbuild: Automatically remove stale <linux/version.h> file
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
michal42 committed Nov 28, 2014
1 parent 2d56030 commit 223c24a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,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 \
Expand Down Expand Up @@ -1004,6 +1005,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)
Expand Down Expand Up @@ -1172,7 +1174,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 include/linux/version.h
signing_key.x509.signer

# clean - Delete most, but leave enough to build external modules
#
Expand Down

0 comments on commit 223c24a

Please sign in to comment.