Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 20 Dec 2014 21:31:14 +0000 (13:31 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 20 Dec 2014 21:31:14 +0000 (13:31 -0800)
Pull kbuild updates from Michal Marek:
 "Here are the kbuild changes for v3.19-rc1:

   - Cleanups and deduplication in the main Makefile and
     scripts/Makefile.*
   - Sort the output of *config targets in make help
   - Old <linux/version.h> is always removed to avoid a surprise during
     bisecting
   - Warning fix in kconfig"

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kbuild: remove redundant -rR flag of hdr-inst
  kbuild: Fix make help-<board series> on powerpc
  kbuild: Automatically remove stale <linux/version.h> file
  kconfig: Fix warning "‘jump’ may be used uninitialized"
  Makefile: sort list of defconfig targets in make help output
  kbuild: Remove duplicate $(cmd) definition in Makefile.clean
  kbuild: collect shorthands into scripts/Kbuild.include

1  2 
Makefile
scripts/Kbuild.include

diff --combined Makefile
+++ b/Makefile
@@@ -1,8 -1,8 +1,8 @@@
  VERSION = 3
  PATCHLEVEL = 18
  SUBLEVEL = 0
 -EXTRAVERSION = -rc1
 -NAME = Shuffling Zombie Juror
 +EXTRAVERSION =
 +NAME = Diseased Newt
  
  # *DOCUMENTATION*
  # To see a list of typical targets execute "make help"
@@@ -297,7 -297,7 +297,7 @@@ CONFIG_SHELL := $(shell if [ -x "$$BASH
  
  HOSTCC       = gcc
  HOSTCXX      = g++
 -HOSTCFLAGS   = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
 +HOSTCFLAGS   = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
  HOSTCXXFLAGS = -O2
  
  ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)
@@@ -401,8 -401,7 +401,8 @@@ KBUILD_CPPFLAGS := -D__KERNEL_
  KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
                   -fno-strict-aliasing -fno-common \
                   -Werror-implicit-function-declaration \
 -                 -Wno-format-security
 +                 -Wno-format-security \
 +                 -std=gnu89
  
  KBUILD_AFLAGS_KERNEL :=
  KBUILD_CFLAGS_KERNEL :=
@@@ -481,9 -480,10 +481,10 @@@ 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 \
+                        cscope gtags TAGS tags help% %docs check% coccicheck \
                         $(version_h) headers_% archheaders archscripts \
                         kernelversion %src-pkg
  
@@@ -1005,6 -1005,7 +1006,7 @@@ ende
  
  $(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)
@@@ -1036,8 -1037,6 +1038,6 @@@ firmware_install: FORC
  #Default location for installed headers
  export INSTALL_HDR_PATH = $(objtree)/usr
  
- hdr-inst := -rR -f $(srctree)/scripts/Makefile.headersinst obj
  # If we do an all arch process set dst to asm-$(hdr-arch)
  hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
  
@@@ -1175,7 -1174,7 +1175,7 @@@ MRPROPER_FILES += .config .config.old .
                  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
  #
@@@ -1235,7 -1234,7 +1235,7 @@@ rpm: include/config/kernel.release FORC
  # ---------------------------------------------------------------------------
  
  boards := $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*_defconfig)
- boards := $(notdir $(boards))
+ boards := $(sort $(notdir $(boards)))
  board-dirs := $(dir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*/*_defconfig))
  board-dirs := $(sort $(notdir $(board-dirs:/=)))
  
@@@ -1326,7 -1325,7 +1326,7 @@@ help-board-dirs := $(addprefix help-,$(
  
  help-boards: $(help-board-dirs)
  
- boards-per-dir = $(notdir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/$*/*_defconfig))
+ boards-per-dir = $(sort $(notdir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/$*/*_defconfig)))
  
  $(help-board-dirs): help-%:
        @echo  'Architecture specific targets ($(SRCARCH) $*):'
@@@ -1581,11 -1580,6 +1581,6 @@@ ifneq ($(cmd_files),
    include $(cmd_files)
  endif
  
- # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir
- # Usage:
- # $(Q)$(MAKE) $(clean)=dir
- clean := -f $(srctree)/scripts/Makefile.clean obj
  endif # skip-makefile
  
  PHONY += FORCE
diff --combined scripts/Kbuild.include
@@@ -179,12 -179,18 +179,24 @@@ build := -f $(srctree)/scripts/Makefile
  # $(Q)$(MAKE) $(modbuiltin)=dir
  modbuiltin := -f $(srctree)/scripts/Makefile.modbuiltin obj
  
 +###
 +# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.dtbinst obj=
 +# Usage:
 +# $(Q)$(MAKE) $(dtbinst)=dir
 +dtbinst := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.dtbinst obj
 +
+ ###
+ # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=
+ # Usage:
+ # $(Q)$(MAKE) $(clean)=dir
+ clean := -f $(srctree)/scripts/Makefile.clean obj
+ ###
+ # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.headersinst obj=
+ # Usage:
+ # $(Q)$(MAKE) $(hdr-inst)=dir
+ hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj
  # Prefix -I with $(srctree) if it is not an absolute path.
  # skip if -I has no parameter
  addtree = $(if $(patsubst -I%,%,$(1)), \