OpenWRT dependencies

Hi all,

I am a little bit confused about how to correctly use dependencies in an openWRT feed makefile. There are several variables available:

DEPENDS: If you say +package that means if the current package is selected, it will cause package to be selected

DEPENDS - (optional) Which packages must be built/installed before this package.

PKG_BUILD_DEPENDS: Packages that need to be built before this package. Use DEPENDS to establish the runtime dependencies.

EXTRA_DEPENDS - (optional) Runtime dependencies. don't get built, only added to package
control file

About build-time dependencies: If I use DEPENDS I guess i do not need to use PKG_BUILD_DEPENDS.

About run-time dependencies: Can I use the EXTRA_DEPENDS variable for this? When I specify a package here, this package does not need to be build before my package, but it needs to be installed on the target.

EXTRA_DEPENDS will probably not guarantee that this package is automatically selected in the menuconfig (like the DEPENDS variable does)? I guess an error will be thrown when the makefile contains an EXTRA_DEPENDS and this one is not selected by the user?

Thanks in advance for clearing this up.