-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Jow,
With the bool depends option I meant the option itself only to be
displayed if mylib was selected to be built. That indeed created a
recursive dependency.
After some trial-and-error I finally was able to realize the desired
configuration by moving depends PACKAGE_mylib to the
Package/myPackage/config section (Note that I intended "option" to be
visible only if library is selected and not to let option select
library). It also was possible to remove the PKG_BUILD_DEPENDS as
suggested before.
Thanks jow, for the support.
FYI: The config now looks like that:
define Package/myPackage
...
DEPENDS:MYPACKAGE_USES_LIBRARY:myLib
...
endef
define Package/myPackage/config
source "$(SOURCE)/Config.in"
depends on PACKAGE_myPackage && PACKAGE_myLib #[1]
endef
[1] moving this line up into Config.in or even before the source ""...
line seems to link the dependency to myPackage rather than to the option
itself - that might be the circular dependency...
and:
config MYPACKAGE_USES_LIBRARY
bool "use library"
default n
help
bla...
Result:
- "use library" option only visible if myPackage AND myLib are used
- if not selected build without library features and without linking
library
- if selected build library beforehand, compile features and link
library as well as add opkg dependency
Am 07.01.2012 15:18, schrieb Jo-Philipp Wich:
> Looking again at your Kconfig snippet, the depends do not make sense to
> me. The bool option which ultimatively is supposed to select mylib
> depends itself at mylib. This looks like a recursive dependency to me
> and it does not surprise me that it does not work as expected. Are you
> sure you didn't mean something like the snippet below?
>
> config MYPACKAGE_USES_LIBRARY
> bool "Use library"
> depends PACKAGE_mypackage
> selects PACKAGE_mylib
> default n
> help
> bla...
>
> Actually the select would be redundant as well since
> "DEPENDS:=+MYPACKAGE_USES_LIBRARY:mylib" would inject the required
> selects by default.
>
> In order to debug the final Kconfig code I also suggest to examine the
> output of
>
> ./scripts/metadata.pl package_config tmp/.packageinfo
>
> ~ Jow
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk8JjeYACgkQh655pvNJE5DqqgCfWJZ8q9ezcFSX/0rMCv52cQha
Ld0Ani6vszgx6EnMhlSAv1j/4ZKDajjZ
=9DFa
-----END PGP SIGNATURE-----
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel