diff options
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | include/linux/Kbuild | 2 |
2 files changed, 8 insertions, 7 deletions
@@ -447,9 +447,11 @@ asm-generic: | |||
447 | # Detect when mixed targets is specified, and make a second invocation | 447 | # Detect when mixed targets is specified, and make a second invocation |
448 | # of make so .config is not included in this case either (for *config). | 448 | # of make so .config is not included in this case either (for *config). |
449 | 449 | ||
450 | version_h := include/generated/linux/version.h | ||
451 | |||
450 | no-dot-config-targets := clean mrproper distclean \ | 452 | no-dot-config-targets := clean mrproper distclean \ |
451 | cscope gtags TAGS tags help %docs check% coccicheck \ | 453 | cscope gtags TAGS tags help %docs check% coccicheck \ |
452 | include/linux/version.h headers_% archheaders archscripts \ | 454 | $(version_h) headers_% archheaders archscripts \ |
453 | kernelversion %src-pkg | 455 | kernelversion %src-pkg |
454 | 456 | ||
455 | config-targets := 0 | 457 | config-targets := 0 |
@@ -819,7 +821,7 @@ endif | |||
819 | # prepare2 creates a makefile if using a separate output directory | 821 | # prepare2 creates a makefile if using a separate output directory |
820 | prepare2: prepare3 outputmakefile asm-generic | 822 | prepare2: prepare3 outputmakefile asm-generic |
821 | 823 | ||
822 | prepare1: prepare2 include/linux/version.h include/generated/utsrelease.h \ | 824 | prepare1: prepare2 $(version_h) include/generated/utsrelease.h \ |
823 | include/config/auto.conf | 825 | include/config/auto.conf |
824 | $(cmd_crmodverdir) | 826 | $(cmd_crmodverdir) |
825 | 827 | ||
@@ -852,7 +854,7 @@ define filechk_version.h | |||
852 | echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) | 854 | echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) |
853 | endef | 855 | endef |
854 | 856 | ||
855 | include/linux/version.h: $(srctree)/Makefile FORCE | 857 | $(version_h): $(srctree)/Makefile FORCE |
856 | $(call filechk,version.h) | 858 | $(call filechk,version.h) |
857 | 859 | ||
858 | include/generated/utsrelease.h: include/config/kernel.release FORCE | 860 | include/generated/utsrelease.h: include/config/kernel.release FORCE |
@@ -897,7 +899,7 @@ PHONY += archscripts | |||
897 | archscripts: | 899 | archscripts: |
898 | 900 | ||
899 | PHONY += __headers | 901 | PHONY += __headers |
900 | __headers: include/linux/version.h scripts_basic asm-generic archheaders archscripts FORCE | 902 | __headers: $(version_h) scripts_basic asm-generic archheaders archscripts FORCE |
901 | $(Q)$(MAKE) $(build)=scripts build_unifdef | 903 | $(Q)$(MAKE) $(build)=scripts build_unifdef |
902 | 904 | ||
903 | PHONY += headers_install_all | 905 | PHONY += headers_install_all |
@@ -1007,8 +1009,7 @@ CLEAN_DIRS += $(MODVERDIR) | |||
1007 | # Directories & files removed with 'make mrproper' | 1009 | # Directories & files removed with 'make mrproper' |
1008 | MRPROPER_DIRS += include/config usr/include include/generated \ | 1010 | MRPROPER_DIRS += include/config usr/include include/generated \ |
1009 | arch/*/include/generated | 1011 | arch/*/include/generated |
1010 | MRPROPER_FILES += .config .config.old .version .old_version \ | 1012 | MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \ |
1011 | include/linux/version.h \ | ||
1012 | Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS | 1013 | Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS |
1013 | 1014 | ||
1014 | # clean - Delete most, but leave enough to build external modules | 1015 | # clean - Delete most, but leave enough to build external modules |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index c57e064666e4..0236a3b346fe 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -20,7 +20,7 @@ header-y += netfilter_ipv6/ | |||
20 | header-y += usb/ | 20 | header-y += usb/ |
21 | header-y += wimax/ | 21 | header-y += wimax/ |
22 | 22 | ||
23 | objhdr-y += version.h | 23 | genhdr-y += version.h |
24 | 24 | ||
25 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ | 25 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ |
26 | $(srctree)/include/asm-$(SRCARCH)/a.out.h \ | 26 | $(srctree)/include/asm-$(SRCARCH)/a.out.h \ |