summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorThomas Petazzoni2011-11-13 09:54:45 +0100
committerPeter Korsgaard2011-11-13 21:28:50 +0100
commitd0afbdad6b5a5b0fe7b0665cc0d9a337f0ace412 (patch)
treeca679d3355025f637093e310b4eb5f821c51ec23 /docs
parentdoc: mention how to format the Config.in file (diff)
downloadbuildroot-d0afbdad6b5a5b0fe7b0665cc0d9a337f0ace412.tar.gz
buildroot-d0afbdad6b5a5b0fe7b0665cc0d9a337f0ace412.tar.xz
buildroot-d0afbdad6b5a5b0fe7b0665cc0d9a337f0ace412.zip
doc: more details about expressing dependencies in Config.in
[Peter: Minor tweak] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'docs')
-rw-r--r--docs/manual/adding-packages-directory.txt45
1 files changed, 45 insertions, 0 deletions
diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt
index 2e8786a20..58f026261 100644
--- a/docs/manual/adding-packages-directory.txt
+++ b/docs/manual/adding-packages-directory.txt
@@ -46,6 +46,51 @@ supposed to contain anything but the 'bare' name of the package.
source "package/libfoo/Config.in"
--------------------------
+The +Config.in+ file of your package must also ensure that
+dependencies are enabled. Typically, Buildroot uses the following
+rules:
+
+* Use a +select+ type of dependency for dependencies on
+ libraries. These dependencies are generally not obvious and it
+ therefore make sense to have the kconfig system ensure that the
+ dependencies are selected. For example, the _libgtk2_ package uses
+ +select BR2_PACKAGE_LIBGLIB2+ to make sure this library is also
+ enabled.
+
+* Use a +depends on+ type of dependency when the user really needs to
+ be aware of the dependency. Typically, Buildroot uses this type of
+ dependency for dependencies on toolchain options (large file
+ support, RPC support, IPV6 support), or for dependencies on "big"
+ things, such as the X.org system. In some cases, especially
+ dependency on toolchain options, it is recommended to add a
+ +comment+ displayed when the option is not enabled, so that the user
+ knows why the package is not available.
+
+An example illustrates both the usage of +select+ and +depends on+.
+
+--------------------------
+config BR2_PACKAGE_ACL
+ bool "acl"
+ select BR2_PACKAGE_ATTR
+ depends on BR2_LARGEFILE
+ help
+ POSIX Access Control Lists, which are used to define more
+ fine-grained discretionary access rights for files and
+ directories.
+ This package also provides libacl.
+
+ http://savannah.nongnu.org/projects/acl
+
+comment "acl requires a toolchain with LARGEFILE support"
+ depends on !BR2_LARGEFILE
+--------------------------
+
+
+Note that such dependencies will make sure that the dependency option
+is also enabled, but not necessarily built before your package. To do
+so, the dependency also needs to be expressed in the +.mk+ file of the
+package.
+
The +.mk+ file
~~~~~~~~~~~~~~