Chinaunix首页 | 论坛 | 博客
  • 博客访问: 918466
  • 博文数量: 132
  • 博客积分: 9976
  • 博客等级: 中将
  • 技术积分: 1781
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-30 20:40
文章分类

全部博文(132)

文章存档

2013年(1)

2011年(1)

2010年(15)

2009年(77)

2008年(36)

2007年(2)

我的朋友

分类: LINUX

2009-03-03 19:36:54

openwrt Makefile 问题
==========================================================================
from: http://lists.openwrt.org/pipermail/openwrt-devel/2008-April/002033.html

--------------------------------------------------------------------------
DEPENDS versus PKG_BUILD_DEPENDS 1
--------------------------------------------------------------------------

[OpenWrt-Devel] DEPENDS versus PKG_BUILD_DEPENDS?

Robert P. J. Day rpjday at crashcourse.ca
Thu Apr 10 15:15:02 CEST 2008
  undoubtedly a dumb question but this might help me debug why some
packages don't build for me. if i'm looking at the Makefile for
qolyester, i see:

...
PKG_BUILD_DEPENDS:=libnotimpl
...
define Package/qolyester
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libpthread
TITLE:=OLSR implementation with QoS
URL:=
endef
...

regarding that "DEPENDS" directive, i'm going to assume that that
means that qolyester has an *installation* dependency of libpthread
(along the lines of what i'm used to as a "yum" installation
dependency).

but when you list "PKG_BUILD_DEPENDS", does that mean that this
build depends on libnotimpl simply being *selected* for the build, or
does it mean that libnotimpl must have already been *built* before
this package can be built? thanks.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

Waterloo, Ontario, CANADA
========================================================================


--------------------------------------------------------------------------
DEPENDS versus PKG_BUILD_DEPENDS 2
--------------------------------------------------------------------------

[OpenWrt-Devel] DEPENDS versus PKG_BUILD_DEPENDS?

RB aoz.syn at gmail.com
Thu Apr 10 15:25:55 CEST 2008
>   regarding that "DEPENDS" directive, i'm going to assume that that
> means that qolyester has an *installation* dependency of libpthread
> (along the lines of what i'm used to as a "yum" installation
> dependency).

Coming from DEPEND and RDEPEND in Gentoo (which is a fantastic OpenWRT
development platform, BTW), I believe that means build-time versus
run-time dependencies. Build-time being the -dev packages in
RPM-based distros, if you will, and run-time being whatever is linked
at execution.

So, I take that to mean PKG_BUILD_DEPENDS *should* be built before
package X is, whereas as long as DEPENDS doesn't matter so much until
execution. Then again, I've been completely wrong before.


--------------------------------------------------------------------------
DEPENDS versus PKG_BUILD_DEPENDS 3
--------------------------------------------------------------------------
Felix Fietkau nbd at openwrt.org
Thu Apr 10 15:26:16 CEST 2008
Robert P. J. Day wrote:
> undoubtedly a dumb question but this might help me debug why some
> packages don't build for me. if i'm looking at the Makefile for
> qolyester, i see:
>
> ...
> PKG_BUILD_DEPENDS:=libnotimpl
> ...
> define Package/qolyester
> SECTION:=net
> CATEGORY:=Network
> DEPENDS:=+libpthread
> TITLE:=OLSR implementation with QoS
> URL:=
> endef
> ...
>
> regarding that "DEPENDS" directive, i'm going to assume that that
> means that qolyester has an *installation* dependency of libpthread
> (along the lines of what i'm used to as a "yum" installation
> dependency).
Yes, DEPENDS is an installation dependency, which also implies a build time
dependency.

> but when you list "PKG_BUILD_DEPENDS", does that mean that this
> build depends on libnotimpl simply being *selected* for the build, or
> does it mean that libnotimpl must have already been *built* before
> this package can be built? thanks.
PKG_BUILD_DEPENDS:=libnotimpl means that libnotimpl will not be selected,
but it will be built before this package.

- Felix

--------------------------------------------------------------------------
DEPENDS versus PKG_BUILD_DEPENDS 4
--------------------------------------------------------------------------
>  Yes, DEPENDS is an installation dependency, which also implies a build time
> dependency.
...
> PKG_BUILD_DEPENDS:=libnotimpl means that libnotimpl will not be selected,
> but it will be built before this package.

Note to self - give real devs time to respond. I was only partly
wrong, but sufficiently so as to make someone else completely
misunderstand.

==========================================================================

[OpenWrt-Devel] Build dependencies

thomas.langer at infineon.com thomas.langer at infineon.com
Thu Aug 2 19:05:30 CEST 2007
Hi,

I have a question regarding the build system and the dependencies
(Kamikaze 7.07):

Is it possible to dynamical (re-)define the build dependencies?
I know about PKG_BUILD_DEPENDS, but I want to do something like:

ifdef CONFIG_option_X
PKG_BUILD_DEPENDS+=my-package-Y
endif

Is it possible to trigger such a behaviour, maybe via some other
definitions in my Makefile?

Thanks for your help,
Thomas


--------------------------------------------------------------------------
Hello Thomas,

Such dependency is possible, you can have a look at how freeradius handles
it : https://dev.openwrt.org/browser/packages/net/freeradius/Makefile

This package is divided into several modules, each of these module have custom
dependencies, and passes arguments.

Some other packages also check the SDK, including, this might be closer to
your question.

I hope this answers your question ?

Le jeudi 2 août 2007, thomas.langer at infineon.com a écrit :
> Hi,
>
> I have a question regarding the build system and the dependencies
> (Kamikaze 7.07):
>
> Is it possible to dynamical (re-)define the build dependencies?
> I know about PKG_BUILD_DEPENDS, but I want to do something like:
>
> ifdef CONFIG_option_X
> PKG_BUILD_DEPENDS+=my-package-Y
> endif
>
> Is it possible to trigger such a behaviour, maybe via some other
> definitions in my Makefile?
>
> Thanks for your help,
> Thomas
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
--------------------------------------------------------------------------

Hi Florian,

this does not answer my question, I asked about PKG_BUILD_DEPENDS, not DEPENDS!
Defining the dependencies between packages is not the problem.

My problem is an application, that can manage two different chips via their drivers.
To build the application I need the sources of the driver unpacked/installed before compiling,
to include the interface definition of the driver.

For a single driver it is no problem to define
PKG_BUILD_DEPENDS:=driver_x

But if I can select a second driver and define
PKG_BUILD_DEPENDS:=driver_x driver_y
both drivers gets unpacked and built (which is not what I want, but would be a workaround!).
You can try the same with ppp and libpcap (which is only listed as build-dependency!)

If I do the definition like described in my first mail, no build-dependency is defined,
as the config-options are not known during package-scan (which is correct in general).

Maybe you have an idea, how to restrict the build-dependencies to the selected packages.
Currently updating to kamikaze/trunk is not an option, even if it might be fixed there.

Hoping for another hint,
Thomas

> -----Original Message-----
> From: Florian Fainelli [mailto:florian.fainelli at int-evry.fr]
> Sent: Thursday, August 02, 2007 7:22 PM
> To: openwrt-devel at lists.openwrt.org
> Cc: Langer Thomas (IFAG COM AC SD BBA)
> Subject: Re: [OpenWrt-Devel] Build dependencies
>
> Hello Thomas,
>
> Such dependency is possible, you can have a look at how
> freeradius handles
> it : https://dev.openwrt.org/browser/packages/net/freeradius/Makefile
>
> This package is divided into several modules, each of these
> module have custom
> dependencies, and passes arguments.
>
> Some other packages also check the SDK, including, this might
> be closer to
> your question.
>
> I hope this answers your question ?
>
> Le jeudi 2 août 2007, thomas.langer at infineon.com a écrit :
> > Hi,
> >
> > I have a question regarding the build system and the dependencies
> > (Kamikaze 7.07):
> >
> > Is it possible to dynamical (re-)define the build dependencies?
> > I know about PKG_BUILD_DEPENDS, but I want to do something like:
> >
> > ifdef CONFIG_option_X
> > PKG_BUILD_DEPENDS+=my-package-Y
> > endif
> >
> > Is it possible to trigger such a behaviour, maybe via some other
> > definitions in my Makefile?
> >
> > Thanks for your help,
> > Thomas
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
>
> --
> Cordialement, Florian Fainelli

--------------------------------------------------------------------------

thomas.langer at infineon.com wrote:
> Hi Florian,
>
> this does not answer my question, I asked about PKG_BUILD_DEPENDS, not DEPENDS!
> Defining the dependencies between packages is not the problem.
>
> My problem is an application, that can manage two different chips via their drivers.
> To build the application I need the sources of the driver unpacked/installed before compiling,
> to include the interface definition of the driver.
>
> For a single driver it is no problem to define
> PKG_BUILD_DEPENDS:=driver_x
>
> But if I can select a second driver and define
> PKG_BUILD_DEPENDS:=driver_x driver_y
> both drivers gets unpacked and built (which is not what I want, but would be a workaround!).
> You can try the same with ppp and libpcap (which is only listed as build-dependency!)
>
> If I do the definition like described in my first mail, no build-dependency is defined,
> as the config-options are not known during package-scan (which is correct in general).
>
> Maybe you have an idea, how to restrict the build-dependencies to the selected packages.
> Currently updating to kamikaze/trunk is not an option, even if it might be fixed there.

Currently those dynamic dependencies are not possible, because
dependencies are calculated at package scan time, before menuconfig is run.
I will add an extension for config option based dependencies soon, e.g.
DEPENDS:= +CONFIG_FOO:bar

- Felix
==========================================================================
阅读(1537) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~