All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stefan Fröberg" <stefan.froberg@petroprogram.com>
To: buildroot@busybox.net
Subject: [Buildroot] Is there an include statement in buildroot ?
Date: Tue, 04 Sep 2012 01:07:39 +0300	[thread overview]
Message-ID: <50452A2B.1070802@petroprogram.com> (raw)
In-Reply-To: <CAHXCMM+ZOiZf1FWKKYjVjDgwG9Cy2DfwJNT_18FpqBcbZspZpQ@mail.gmail.com>

Hi Samuel

4.9.2012 0:50, Samuel Martin kirjoitti:
> Hi Stefan,
>
> 2012/9/3 Stefan Fr?berg <stefan.froberg@petroprogram.com>:
>> Hello everyone
>>
>> My package .mk file is getting quite large now and I would like to break
>> it to more easily
>> sizeable and logical chunks.
>>
>> Is there a way to include other .mk files in main .mk file ?
> Actually, you don't need to explicitly include .mk files, this is
> automatically handled in the Makefile at the root of BR.
> To convince yourself ;-) :
> grep -nE 'include .*?mk' Makefile
>
>> Like something like this:
>>
>> package/newpackage/A.mk
>> package/newpackage/C.mk
>> package/newpackage/D.mk
>> etc....
>> package/newpackage/newpackage.mk
> However, if you there is a specific order for the inclusion, you can do:
> package/newpackage/A.mk.in
> package/newpackage/B.mk.in
> ...
>
>> And newpackage.mk would have:
>>
>> include "A.mk"
>> include "B.mk"
>> include "C.mk"
>>
>> etc....
>>
> Then, in the newpackage.mk:
> include A.mk.in
> include B.mk.in
> ...
>
> Or just:
> include ./*.mk.in
>
>
> Cheers,
>

I put the following in newpackage.mk :

include package/newpackage/A.mk.in
include package/newpackage/B.mk.in
etc...

And Oh My God, it worked!
All the variables and other stuff from those files
were now visible in main newpackage.mk!

Thanks Samuel ! :)

Stefan

      reply	other threads:[~2012-09-03 22:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-03 21:39 [Buildroot] Is there an include statement in buildroot ? Stefan Fröberg
2012-09-03 21:50 ` Samuel Martin
2012-09-03 22:07   ` Stefan Fröberg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50452A2B.1070802@petroprogram.com \
    --to=stefan.froberg@petroprogram.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.