[LEDE-DEV] Fwd: Makefile question

Yousong Zhou yszhou4tech at gmail.com
Thu Feb 16 05:55:10 PST 2017


Whoops, still missed the lede-dev list...

                yousong


---------- Forwarded message ----------
From: Yousong Zhou <yszhou4tech at gmail.com>
Date: 16 February 2017 at 21:52
Subject: Re: [LEDE-DEV] Makefile question
To: Philip Prindeville <philipp_subx at redfish-solutions.com>
Cc: David Lang <david at lang.hm>, Felix Fietkau <nbd at nbd.name>


On 16 February 2017 at 09:38, Philip Prindeville
<philipp_subx at redfish-solutions.com> wrote:
> Dropping the lists because this is probably not of interest to anyone else.
>
>
>> On Feb 14, 2017, at 7:09 PM, Yousong Zhou <yszhou4tech at gmail.com> wrote:
>>
>> On 15 February 2017 at 06:33, Philip Prindeville
>> <philipp_subx at redfish-solutions.com> wrote:
>>
>> [...]
>>
>>>>>
>>>>> Part of the problem is making package/Makefile recurse with additional arguments and a different working directory…  When I try to do this, the submake of package/Makefile gets run without inherited variables like $(INCLUDE_DIR), etc.
>>>>
>>>> package/Makefile was included by $(TOPDIR)/Makefile which included
>>>> $(TOPDIR)/rules.mk first and that's where was INCLUDE_DIR defined but
>>>> not exported.
>>>
>>>
>>> Okay, so just add “export INCLUDE_DIR” and I’m done?
>>>
>>
>> It should work, but if there are other ways around, imho, minimal
>> usage of global export is preferred to avoid cluttering the
>> environment.
>>
>> […]
>
>
> What sort of ways?  I’m eager to get this working so I can move on to more interesting things...
>
>
>>
>>>>
>>>> The other thing is if it's just about pre/post hooks, then I guess the
>>>> Build/IncludeOverlay mechanism should already fulfil most (if not all)
>>>> of your needs.
>>>>
>>>>               yousong
>>>
>>>
>>> Well, I need to get things working with OpenWRT and then move the entire product over to LEDE.
>>
>> That Build/IncludeOverlay is also available in OpenWrt as it was there
>> since 2009-08-31
>
> I couldn’t find any examples of how to use this.
>
> When does it get run?
>
> Thanks,
>
> -Philip
>

Adding back the list as the example may also be helpful to other users.

I have crafted an example and created a github gist [1] .  The content
of which as of this writing is also attached.  It was only tested with
LEDE.

 [1] https://gist.github.com/yousong/1df4fcee324dd6b6095e6b551e2806a9

                yousong
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello.mk
Type: application/octet-stream
Size: 880 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170216/4ca3e818/attachment.obj>


More information about the Lede-dev mailing list