[LEDE-DEV] Makefile question

Philip Prindeville philipp_subx at redfish-solutions.com
Tue Feb 14 14:33:30 PST 2017


> On Feb 13, 2017, at 11:25 PM, Yousong Zhou <yszhou4tech at gmail.com> wrote:
> 
> On 14 February 2017 at 10:51, Philip Prindeville
> <philipp_subx at redfish-solutions.com> wrote:
>> 
>> Hi Yousong,
>> 
>> I’ve been working on both OpenWRT and LEDE and needed to get some hooks working in OpenWRT so I focused on that first.
>> 
>> These are the changes I made, but I couldn’t get it to work.
>> 
>> Was wondering if anyone can run with this.
>> 
>> 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?


> 
>> 
>> Also odd is even though the top of package/Makefile says:
>> 
>> curdir:=package
>> 
>> when it recurses $(curdir) retains some other value like “target” or “toolchain”.  Not sure why.
>> 
> 
> No idea how this happened as I do not yet have time to check the patch
> in details.  Does it take these values in a random way?

On two different runs, I seem to remember them being either value.  And that was with -j1 so it’s not a parallelism indeterminism.


> 
> 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.

Are you on IRC?

-Philip




More information about the Lede-dev mailing list