[ale] Including Makefile

Chris Fowler cfowler at outpostsentinel.com
Sat Feb 4 18:32:49 EST 2017


For this tree I that idea introduces some issues because binutils, gcc, and avr-libc need to be build in a work tree out of the src. To solve that the Makefile in the I000../src directory needs to pass its location to make when it enters each sub dir and builds. 

include ../Makefile.inc in those files becomes include ${SRC_DIR}/Makefile.inc 

If src/Makefile has 'include ../Makefile.inc' like I originally wanted to do there would be a problem. Somehow within the Makefile.inc I need to know what directory that inc file is really in. 

> From: "Chris Fowler" <cfowler at outpostsentinel.com>
> To: ale at ale.org
> Sent: Saturday, February 4, 2017 6:10:28 PM
> Subject: [ale] Including Makefile

> I'm including a Makefile in a Makefile via ../../../../ ../Makefile.inc, but I
> want to "cascade" them. Here is a same tree:

> build_root
> I0000025
> src
> binutils-2.25

> One option is to simply use links. In binutil's Makefile I could add
> include ../Makefile.inc

> In src:
> ln -sf ../Makefile.inc Makefile.inc

> I can do that in src'c parent of I0000025. This is easiest.

> I thought If I used a Makefile.inc in each directory that only had 'include
> ../Makefile.inc' I could then modify that inc as needed to add stuff that
> pertains to the children of that directory. The obvious issue of make in
> binutils would always be in binutils and ../Makefile.inc would loop because it
> does not change directory when including. Of course it looped and I get "too
> many open files".

> Is there a way I can do the files instead of links like I want to?

> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20170204/c5bc1ced/attachment.html>


More information about the Ale mailing list