* [Buildroot] Is there an include statement in buildroot ?
@ 2012-09-03 21:39 Stefan Fröberg
2012-09-03 21:50 ` Samuel Martin
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Fröberg @ 2012-09-03 21:39 UTC (permalink / raw)
To: buildroot
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 ?
Like something like this:
package/newpackage/A.mk
package/newpackage/C.mk
package/newpackage/D.mk
etc....
package/newpackage/newpackage.mk
And newpackage.mk would have:
include "A.mk"
include "B.mk"
include "C.mk"
etc....
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] Is there an include statement in buildroot ?
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
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Martin @ 2012-09-03 21:50 UTC (permalink / raw)
To: buildroot
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,
--
Sam
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] Is there an include statement in buildroot ?
2012-09-03 21:50 ` Samuel Martin
@ 2012-09-03 22:07 ` Stefan Fröberg
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Fröberg @ 2012-09-03 22:07 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-03 22:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox