Commit be084204 authored by Thomas De Schampheleire's avatar Thomas De Schampheleire Committed by Peter Korsgaard
Browse files

Config.in files: add missing dependencies to toolchain option comments



When a package A depends on config option B and toolchain option C, then
the comment that is given when C is not fulfilled should also depend on B.
For example:

config BR2_PACKAGE_A
	depends on BR2_B
	depends on BR2_LARGEFILE
	depends on BR2_WCHAR

comment "A needs a toolchain w/ largefile, wchar"
	depends on !BR2_LARGEFILE || !BR2_WCHAR

This comment should actually be:

comment "A needs a toolchain w/ largefile, wchar"
	depends on BR2_B
	depends on !BR2_LARGEFILE || !BR2_WCHAR

or if possible (typically when B is a package config option declared in that
same Config.in file):

if BR2_B

comment "A needs a toolchain w/ largefile, wchar"
	depends on !BR2_LARGEFILE || !BR2_WCHAR

[other config options depending on B]

endif

Otherwise, the comment would be visible even though the other dependencies
are not met.

This patch adds such missing dependencies, and changes existing such
dependencies from
  depends on BR2_BASE_DEP && !BR2_TOOLCHAIN_USES_GLIBC
to
  depends on BR2_BASE_DEP
  depends on !BR2_TOOLCHAIN_USES_GLIBC
so that (positive) base dependencies are separate from the (negative)
toolchain dependencies. This strategy makes it easier to write such comments
(because one can simply copy the base dependency from the actual package
config option), but also avoids complex and long boolean expressions.

Signed-off-by: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: default avatarArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
 (untested)
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 3c33c113
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -13,4 +13,5 @@ config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU
	default "fs/iso9660/menu.lst"

comment "iso image requires a Linux kernel to be built"
	depends on (BR2_i386 || BR2_x86_64) && !BR2_LINUX_KERNEL
	depends on BR2_i386 || BR2_x86_64
	depends on !BR2_LINUX_KERNEL
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ config BR2_LINUX_KERNEL_EXT_XENOMAI
	  PowerPC, 2.6.35.7, 2.6.36.4, 3.0.8.

comment "xenomai needs a toolchain w/ threads"
	depends on BR2_i386 || BR2_x86_64 || BR2_arm || \
		   BR2_bfin || BR2_powerpc || BR2_sh4
	depends on !BR2_TOOLCHAIN_HAS_THREADS

config BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH
+2 −1
Original line number Diff line number Diff line
@@ -9,4 +9,5 @@ config BR2_PACKAGE_A10DISP
	  http://github.com/hglm/a10disp

comment "a10disp requires the linux kernel"
	depends on BR2_arm && !BR2_LINUX_KERNEL
	depends on BR2_arm
	depends on !BR2_LINUX_KERNEL
+1 −0
Original line number Diff line number Diff line
@@ -20,4 +20,5 @@ config BR2_PACKAGE_AICCU
	  http://www.sixxs.net/tools/aiccu/

comment "aiccu needs a toolchain w/ IPv6, wchar, threads"
	depends on BR2_USE_MMU
	depends on !(BR2_INET_IPV6 && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS)
+1 −0
Original line number Diff line number Diff line
@@ -11,5 +11,6 @@ config BR2_PACKAGE_AIRCRACK_NG
	  http://www.aircrack-ng.org/

comment "aircrack-ng needs a toolchain w/ largefile, threads"
	depends on BR2_USE_MMU
	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
Loading