Commit 35eaed8d authored by Thomas De Schampheleire's avatar Thomas De Schampheleire Committed by Thomas Petazzoni
Browse files

Config.in files: use if/endif instead of 'depends on' for main symbol



In the Config.in file of package foo, it often happens that there are other
symbols besides BR2_PACKAGE_FOO. Typically, these symbols only make sense
when foo itself is enabled. There are two ways to express this: with
    depends on BR2_PACKAGE_FOO
in each extra symbol, or with
    if BR2_PACKAGE_FOO
        ...
    endif
around the entire set of extra symbols.

The if/endif approach avoids the repetition of 'depends on' statements on
multiple symbols, so this is clearly preferred. But even when there is only
one extra symbol, if/endif is a more logical choice:
- it is future-proof for when extra symbols are added
- it allows to have just one strategy instead of two (less confusion)

This patch modifies the Config.in files accordingly.

Signed-off-by: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 142a81d6
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -7,12 +7,14 @@ config BR2_TARGET_SYSLINUX

	  http://syslinux.org

if BR2_TARGET_SYSLINUX

config BR2_TARGET_SYSLINUX_ISOLINUX
	bool "Install isolinux"
	depends on BR2_TARGET_SYSLINUX
	default y

config BR2_TARGET_SYSLINUX_PXELINUX
	bool "Install pxelinux"
	depends on BR2_TARGET_SYSLINUX
	default y

endif
+4 −1
Original line number Diff line number Diff line
@@ -5,9 +5,10 @@ config BR2_PACKAGE_BINUTILS
	help
	  Install binutils on the target

if BR2_PACKAGE_BINUTILS

config BR2_PACKAGE_BINUTILS_TARGET
	bool "binutils binaries"
	depends on BR2_PACKAGE_BINUTILS
	help
	  The GNU Binutils are a collection of binary tools:

@@ -16,3 +17,5 @@ config BR2_PACKAGE_BINUTILS_TARGET
	  and others...

	  http://www.gnu.org/software/binutils/

endif
+4 −1
Original line number Diff line number Diff line
@@ -20,14 +20,17 @@ config BR2_PACKAGE_CPPCMS

	  http://cppcms.com

if BR2_PACKAGE_CPPCMS

config BR2_PACKAGE_CPPCMS_ICU
	bool "enable icu support"
	depends on BR2_PACKAGE_CPPCMS
	depends on !BR2_arc # icu -> atomic builtins
	select BR2_PACKAGE_ICU
	help
	  Using ICU allows advanced localization features into CppCMS,
	  in another hand ICU is heavier than iconv.

endif

comment "cppcms needs an (e)glibc toolchain w/ C++"
	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC
+4 −1
Original line number Diff line number Diff line
@@ -9,12 +9,15 @@ config BR2_PACKAGE_CVS

	  http://www.nongnu.org/cvs/

if BR2_PACKAGE_CVS

config BR2_PACKAGE_CVS_SERVER
	bool "server support"
	depends on BR2_PACKAGE_CVS
	help
	  Enable cvs server code

endif

comment "cvs needs a toolchain w/ wchar"
	depends on BR2_USE_MMU
	depends on !BR2_USE_WCHAR
+4 −1
Original line number Diff line number Diff line
@@ -8,9 +8,10 @@ config BR2_PACKAGE_DBUS

	  http://www.freedesktop.org/wiki/Software/dbus

if BR2_PACKAGE_DBUS

choice
	prompt "XML library to use"
	depends on BR2_PACKAGE_DBUS
	default BR2_DBUS_EXPAT
	help
	  Select the XML library to use with D-Bus. Select Expat
@@ -27,6 +28,8 @@ choice

endchoice

endif

comment "dbus needs a toolchain w/ threads"
	depends on BR2_USE_MMU
	depends on !BR2_TOOLCHAIN_HAS_THREADS
Loading