$(eval $(call GENTARGETS,boot,at91bootstrap))
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
ifeq ($(BR2_TARGET_AT91BOOTSTRAP),y)
-TARGETS+=at91bootstrap
-
# we NEED a board name unless we're at make source
ifeq ($(filter source,$(MAKECMDGOALS)),)
ifeq ($(AT91BOOTSTRAP_BOARD),)
$(error No AT91Bootstrap board name set. Check your BR2_TARGET_AT91BOOTSTRAP_BOARD setting)
endif
endif
-
endif
endef
$(eval $(call GENTARGETS,boot,at91dataflashboot))
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_TARGET_AT91DATAFLASHBOOT),y)
-TARGETS+=at91dataflashboot
-endif
$(eval $(call GENTARGETS,boot,barebox))
ifeq ($(BR2_TARGET_BAREBOX),y)
-TARGETS+=barebox
-
# we NEED a board defconfig file unless we're at make source
ifeq ($(filter source,$(MAKECMDGOALS)),)
ifeq ($(BAREBOX_BOARD_DEFCONFIG),)
$(error No Barebox defconfig file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG setting)
endif
endif
-
endif
endef
$(eval $(call AUTOTARGETS,boot,grub))
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_TARGET_GRUB),y)
-TARGETS+=grub
-endif
endef
$(eval $(call GENTARGETS,boot,syslinux))
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_TARGET_SYSLINUX),y)
-TARGETS+=syslinux
-endif
$(eval $(call GENTARGETS,boot,uboot))
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
ifeq ($(BR2_TARGET_UBOOT),y)
-TARGETS+=u-boot
-
# we NEED a board name unless we're at make source
ifeq ($(filter source,$(MAKECMDGOALS)),)
ifeq ($(UBOOT_BOARD_NAME),)
$(error NO U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting)
endif
endif
-
endif
# after it generated the initramfs list of files.
linux-rebuild-with-initramfs linux26-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt
-
-ifeq ($(BR2_LINUX_KERNEL),y)
-TARGETS+=linux
-endif
-
# Checks to give errors that the user can understand
ifeq ($(filter source,$(MAKECMDGOALS)),)
ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
$$($(2)_TARGET_CLEAN): PKG=$(2)
$$($(2)_TARGET_DIRCLEAN): PKG=$(2)
+# Compute the name of the Kconfig option that correspond to the
+# package being enabled. We handle three cases: the special Linux
+# kernel case, the bootloaders case, and the normal packages case.
+ifeq ($(1),linux)
+$(2)_KCONFIG_VAR = BR2_LINUX_KERNEL
+else ifeq ($(4),boot)
+$(2)_KCONFIG_VAR = BR2_TARGET_$(2)
+else
+$(2)_KCONFIG_VAR = BR2_PACKAGE_$(2)
+endif
+
# add package to the general list of targets if requested by the buildroot
# configuration
-
-ifeq ($$(BR2_PACKAGE_$(2)),y)
+ifeq ($$($$($(2)_KCONFIG_VAR)),y)
TARGETS += $(1)
DL_TOOLS_DEPENDENCIES += bzr
endif # SITE_METHOD
-endif # BR2_PACKAGE_$(2)
+endif # $(2)_KCONFIG_VAR
endef # GENTARGETS_INNER
################################################################################