Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Dec 2012 22:15:53 +0000 (14:15 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Dec 2012 22:15:53 +0000 (14:15 -0800)
Pull kbuild changes from Michal Marek:
 "The kbuild changes are minimal this time:

   - scripts/pnmlogo fix for some newer format

   - minor top-level Makefile cleanup

   - fix for a v3.5 regression with make clean M=<directory>"

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kbuild: Do not remove vmlinux when cleaning external module
  scripts/pnmtologo: fix for plain PBM
  kbuild: Remove reference to uninitialised variable

1  2 
Makefile

diff --combined Makefile
+++ b/Makefile
@@@ -1,7 -1,7 +1,7 @@@
  VERSION = 3
  PATCHLEVEL = 7
  SUBLEVEL = 0
 -EXTRAVERSION = -rc1
 +EXTRAVERSION =
  NAME = Terrified Chipmunk
  
  # *DOCUMENTATION*
@@@ -124,7 -124,7 +124,7 @@@ $(if $(KBUILD_OUTPUT),, 
  PHONY += $(MAKECMDGOALS) sub-make
  
  $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
-       $(Q)@:
+       @:
  
  sub-make: FORCE
        $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
@@@ -437,9 -437,7 +437,9 @@@ endi
  PHONY += asm-generic
  asm-generic:
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
 -                  obj=arch/$(SRCARCH)/include/generated/asm
 +                  src=asm obj=arch/$(SRCARCH)/include/generated/asm
 +      $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
 +                  src=uapi/asm obj=arch/$(SRCARCH)/include/generated/uapi/asm
  
  # To make sure we do not include .config for any of the *config targets
  # catch them early, and hand them over to scripts/kconfig/Makefile
@@@ -719,17 -717,6 +719,17 @@@ endif # INSTALL_MOD_STRI
  export mod_strip_cmd
  
  
 +ifeq ($(CONFIG_MODULE_SIG),y)
 +MODSECKEY = ./signing_key.priv
 +MODPUBKEY = ./signing_key.x509
 +export MODPUBKEY
 +mod_sign_cmd = perl $(srctree)/scripts/sign-file $(MODSECKEY) $(MODPUBKEY)
 +else
 +mod_sign_cmd = true
 +endif
 +export mod_sign_cmd
 +
 +
  ifeq ($(KBUILD_EXTMOD),)
  core-y                += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
  
@@@ -981,12 -968,6 +981,12 @@@ _modinst_post: _modinst
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modinst
        $(call cmd,depmod)
  
 +ifeq ($(CONFIG_MODULE_SIG), y)
 +PHONY += modules_sign
 +modules_sign:
 +      $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modsign
 +endif
 +
  else # CONFIG_MODULES
  
  # Modules not configured
@@@ -1027,11 -1008,14 +1027,14 @@@ clean: rm-dirs  := $(CLEAN_DIRS
  clean: rm-files := $(CLEAN_FILES)
  clean-dirs      := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples)
  
- PHONY += $(clean-dirs) clean archclean
+ PHONY += $(clean-dirs) clean archclean vmlinuxclean
  $(clean-dirs):
        $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
  
- clean: archclean
+ vmlinuxclean:
+       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
+ clean: archclean vmlinuxclean
  
  # mrproper - Delete all generated files, including .config
  #
@@@ -1258,7 -1242,6 +1261,6 @@@ scripts: 
  endif # KBUILD_EXTMOD
  
  clean: $(clean-dirs)
-       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
        $(call cmd,rmdirs)
        $(call cmd,rmfiles)
        @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
@@@ -1327,12 -1310,10 +1329,12 @@@ kernelversion
  
  # Clear a bunch of variables before executing the submake
  tools/: FORCE
 -      $(Q)$(MAKE) LDFLAGS= MAKEFLAGS= -C $(src)/tools/
 +      $(Q)mkdir -p $(objtree)/tools
 +      $(Q)$(MAKE) LDFLAGS= MAKEFLAGS= O=$(objtree) subdir=tools -C $(src)/tools/
  
  tools/%: FORCE
 -      $(Q)$(MAKE) LDFLAGS= MAKEFLAGS= -C $(src)/tools/ $*
 +      $(Q)mkdir -p $(objtree)/tools
 +      $(Q)$(MAKE) LDFLAGS= MAKEFLAGS= O=$(objtree) subdir=tools -C $(src)/tools/ $*
  
  # Single targets
  # ---------------------------------------------------------------------------