image.mk: do not emit multiple target definitions for kernel images

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45498
This commit is contained in:
Felix Fietkau 2015-04-18 21:35:22 +00:00
parent 6293aae9d3
commit 2f49517c2f

View file

@ -380,8 +380,8 @@ define Device/Build/check_size
endef endef
define Device/Build/kernel define Device/Build/kernel
_KERNEL_IMAGES += $(KDIR)/$$(KERNEL_NAME)
$(KDIR)/$$(KERNEL_NAME): image_prepare $(KDIR)/$$(KERNEL_NAME): image_prepare
touch $$@
$$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE)) $$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE))
$(BIN_DIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_IMAGE) $(BIN_DIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_IMAGE)
cp $$^ $$@ cp $$^ $$@
@ -456,6 +456,9 @@ define BuildImage
$(foreach device,$(TARGET_DEVICES),$(call Device,$(device))) $(foreach device,$(TARGET_DEVICES),$(call Device,$(device)))
$(foreach fs,$(TARGET_FILESYSTEMS) $(fs-subtypes-y),$(call BuildImage/mkfs,$(fs))) $(foreach fs,$(TARGET_FILESYSTEMS) $(fs-subtypes-y),$(call BuildImage/mkfs,$(fs)))
$$(sort $$(_KERNEL_IMAGES)):
@touch $$@
install: kernel_prepare install: kernel_prepare
$(foreach fs,$(TARGET_FILESYSTEMS), $(foreach fs,$(TARGET_FILESYSTEMS),
$(call Image/Build,$(fs)) $(call Image/Build,$(fs))