Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 16 Jan 2012 22:34:54 +0000 (14:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 16 Jan 2012 22:34:54 +0000 (14:34 -0800)
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  Kbuild: Use dtc's -d (dependency) option
  dtc: Implement -d option to write out a dependency file
  kbuild: Fix comment in Makefile.lib
  scripts/genksyms: clean lex/yacc generated files
  kbuild: Correctly deal with make options which contain an "s"

1  2 
Makefile
arch/arm/boot/Makefile
arch/powerpc/boot/Makefile

diff --combined Makefile
index adddd11c3b3b8a2827dc4f591b573b1fde5768a9,a9c1a3b7f1ee4e63fe6de5785897b999041d9695..4b8ae0483768d74a4eb95817326a0c84c234d754
+++ b/Makefile
@@@ -1,8 -1,8 +1,8 @@@
  VERSION = 3
 -PATCHLEVEL = 1
 +PATCHLEVEL = 2
  SUBLEVEL = 0
 -EXTRAVERSION = -rc1
 -NAME = Sneaky Weasel
 +EXTRAVERSION =
 +NAME = Saber-toothed Squirrel
  
  # *DOCUMENTATION*
  # To see a list of typical targets execute "make help"
@@@ -312,7 -312,7 +312,7 @@@ endi
  # If the user is running make -s (silent mode), suppress echoing of
  # commands
  
- ifneq ($(findstring s,$(MAKEFLAGS)),)
+ ifneq ($(filter s% -s%,$(MAKEFLAGS)),)
    quiet=silent_
  endif
  
diff --combined arch/arm/boot/Makefile
index 5df26a9976a26c10ddfcf0f788302dd2caeb8769,816e91bce2f9aa7d4b52e6c4cfb745f45f86f16b..fc871e719aae8bd6e94d5602591f2948f568f8e9
@@@ -59,14 -59,14 +59,16 @@@ $(obj)/zImage:     $(obj)/compressed/vmlinu
  
  endif
  
+ targets += $(dtb-y)
  # Rule to build device tree blobs
- $(obj)/%.dtb: $(src)/dts/%.dts
-       $(call cmd,dtc)
+ $(obj)/%.dtb: $(src)/dts/%.dts FORCE
+       $(call if_changed_dep,dtc)
  
  $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
  
 +clean-files := *.dtb
 +
  quiet_cmd_uimage = UIMAGE  $@
        cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
                   -C none -a $(LOADADDR) -e $(STARTADDR) \
@@@ -80,16 -80,7 +82,16 @@@ endi
  
  $(obj)/uImage: STARTADDR=$(LOADADDR)
  
 +check_for_multiple_loadaddr = \
 +if [ $(words $(LOADADDR)) -gt 1 ]; then \
 +      echo 'multiple load addresses: $(LOADADDR)'; \
 +      echo 'This is incompatible with uImages'; \
 +      echo 'Specify LOADADDR on the commandline to build an uImage'; \
 +      false; \
 +fi
 +
  $(obj)/uImage:        $(obj)/zImage FORCE
 +      @$(check_for_multiple_loadaddr)
        $(call if_changed,uimage)
        @echo '  Image $@ is ready'
  
index 15986e70799ccbcb78d7aafc924d01bcf167a7a9,5e1f0d5b9eae30432f59a4281fd2847102497808..8844a17ce8ede20213d2c64d25d0d764587e834e
@@@ -45,7 -45,6 +45,7 @@@ $(obj)/cuboot-katmai.o: BOOTCFLAGS += -
  $(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405
  $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
  $(obj)/treeboot-iss4xx.o: BOOTCFLAGS += -mcpu=405
 +$(obj)/treeboot-currituck.o: BOOTCFLAGS += -mcpu=405
  $(obj)/virtex405-head.o: BOOTAFLAGS += -mcpu=405
  
  
@@@ -59,7 -58,7 +59,7 @@@ $(addprefix $(obj)/,$(zlib) cuboot-c2k.
  libfdt       := fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
  libfdtheader := fdt.h libfdt.h libfdt_internal.h
  
 -$(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o): \
 +$(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o epapr.o): \
        $(addprefix $(obj)/,$(libfdtheader))
  
  src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \
@@@ -80,8 -79,7 +80,8 @@@ src-plat := of.c cuboot-52xx.c cuboot-8
                cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \
                virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \
                cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c \
 -              gamecube-head.S gamecube.c wii-head.S wii.c treeboot-iss4xx.c
 +              gamecube-head.S gamecube.c wii-head.S wii.c treeboot-iss4xx.c \
 +              treeboot-currituck.c
  src-boot := $(src-wlib) $(src-plat) empty.c
  
  src-boot := $(addprefix $(obj)/, $(src-boot))
@@@ -173,7 -171,6 +173,7 @@@ quiet_cmd_wrap     = WRAP    $
                $(if $3, -s $3)$(if $4, -d $4)$(if $5, -i $5) vmlinux
  
  image-$(CONFIG_PPC_PSERIES)           += zImage.pseries
 +image-$(CONFIG_PPC_POWERNV)           += zImage.pseries
  image-$(CONFIG_PPC_MAPLE)             += zImage.maple
  image-$(CONFIG_PPC_IBM_CELL_BLADE)    += zImage.pseries
  image-$(CONFIG_PPC_PS3)                       += dtbImage.ps3
@@@ -201,7 -198,6 +201,7 @@@ image-$(CONFIG_EP405)                      += dtbImage.ep4
  image-$(CONFIG_HOTFOOT)                       += cuImage.hotfoot
  image-$(CONFIG_WALNUT)                        += treeImage.walnut
  image-$(CONFIG_ACADIA)                        += cuImage.acadia
 +image-$(CONFIG_OBS600)                        += uImage.obs600
  
  # Board ports in arch/powerpc/platform/44x/Kconfig
  image-$(CONFIG_EBONY)                 += treeImage.ebony cuImage.ebony
@@@ -215,7 -211,6 +215,7 @@@ image-$(CONFIG_WARP)                       += cuImage.war
  image-$(CONFIG_YOSEMITE)              += cuImage.yosemite
  image-$(CONFIG_ISS4xx)                        += treeImage.iss4xx \
                                           treeImage.iss4xx-mpic
 +image-$(CONFIG_CURRITUCK)                     += treeImage.currituck
  
  # Board ports in arch/powerpc/platform/8xx/Kconfig
  image-$(CONFIG_MPC86XADS)             += cuImage.mpc866ads
@@@ -320,12 -315,6 +320,12 @@@ $(obj)/zImage.iseries: vmlinu
  $(obj)/uImage: vmlinux $(wrapperbits)
        $(call if_changed,wrap,uboot)
  
 +$(obj)/uImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
 +      $(call if_changed,wrap,uboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
 +
 +$(obj)/uImage.%: vmlinux $(obj)/%.dtb $(wrapperbits)
 +      $(call if_changed,wrap,uboot-$*,,$(obj)/$*.dtb)
 +
  $(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
        $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
  
@@@ -345,8 -334,8 +345,8 @@@ $(obj)/treeImage.%: vmlinux $(obj)/%.dt
        $(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb)
  
  # Rule to build device tree blobs
- $(obj)/%.dtb: $(src)/dts/%.dts
-       $(call cmd,dtc)
+ $(obj)/%.dtb: $(src)/dts/%.dts FORCE
+       $(call if_changed_dep,dtc)
  
  # If there isn't a platform selected then just strip the vmlinux.
  ifeq (,$(image-y))