Commit d183e6f570f3c0c23d253fd262c90244e72d7ffd

Authored by David Howells
1 parent 494b3e1c49

UAPI: Move linux/version.h

Move include/linux/version.h to the include/generated/ header directory.
A later patch will move it to include/uapi/generated/.

This allows us to get rid of the objhdr-y list.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>

Showing 2 changed files with 8 additions and 7 deletions Side-by-side Diff

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