buildrootschalter/package/libnfc/Config.in
Thomas De Schampheleire 35eaed8d07 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: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-12-25 12:21:39 +01:00

21 lines
464 B
Plaintext

config BR2_PACKAGE_LIBNFC
bool "libnfc"
depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
select BR2_PACKAGE_LIBUSB
select BR2_PACKAGE_LIBUSB_COMPAT
help
Public platform independent Near Field Communication (NFC) library.
http://www.libnfc.org/
if BR2_PACKAGE_LIBNFC
config BR2_PACKAGE_LIBNFC_EXAMPLES
bool "build libnfc examples"
select BR2_PACKAGE_READLINE
endif
comment "libnfc needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS