Hello,

I have a problem defining a library dependency in the Makefile of a project.

- First of all I defined a Config.in file like so:

config MYPACKAGE_USES_LIBRARY
    bool "Use library"
    depends PACKAGE_mypackage && PACKAGE_mylib
    default n
    help
      bla...

- included it in the Makefile:

...
define Package/mypackage/config
  source "$(SOURCE)/Config.in"
endef
...

- added the package build dependency:

...
PKG_BUILD_DEPENDS:=MYPACKAGE_USES_LIBRARY:mylib
...

- and poke around now with the DEPENDS setting:

define Package/mypackage
...
  DEPENDS:=CONFIG_MYPACKAGE_USES_LIBRARY:mylib
...
endef

I can toggle the bool on and off and the build includes or excludes the
library triggering the build beforehand or not.

If i now install the package on the target the dependency is not
recognized by opkg so mylib does not get
installed. If I omit DEPENDS:= that has the same result.

How can I configure the dependency of mypackage from mylib?

As I read in the mailing list the DEPENDS is scanned only if make
menuconfig is executed, what means the
MYPACKAGE_USES_LIBRARY is not set yet. Is that right?

When I toggle the setting and re-run make menuconfig there seems to be
made no re-scanning, therefore also
the dependencies are not updated. Is there a special package/rescan or
so target?

Thanks,

jan

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to