powerpc: Avoid circular dependency with zImage.%
authorMichal Marek <mmarek@suse.cz>
Wed, 11 Jun 2014 11:53:48 +0000 (13:53 +0200)
committerMichal Marek <mmarek@suse.cz>
Thu, 12 Jun 2014 08:07:35 +0000 (10:07 +0200)
The rule to create the final images uses a zImage.% pattern.
Unfortunately, this also matches the names of the zImage.*.lds linker
scripts, which appear as a dependency of the final images. This somehow
worked when $(srctree) used to be an absolute path, but now the pattern
matches too much. List only the images from $(image-y) as the target of
the rule, to avoid the circular dependency.

Reported-and-tested-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
arch/powerpc/boot/Makefile

index a1f8c7f1ec60138db045ae6b46b57bec62169538..ae640370897132d1b08035185cb2f8ec0d6f2de6 100644 (file)
@@ -315,8 +315,8 @@ $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
 $(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
        $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)
 
-$(obj)/zImage.%: vmlinux $(wrapperbits)
-       $(call if_changed,wrap,$*)
+$(addprefix $(obj)/, $(sort $(filter zImage.%, $(image-y)))): vmlinux $(wrapperbits)
+       $(call if_changed,wrap,$(subst $(obj)/zImage.,,$@))
 
 # dtbImage% - a dtbImage is a zImage with an embedded device tree blob
 $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb