* Is it possible for a recipe to include/require something from a subdirectory?
@ 2009-08-20 14:31 Ulf Samuelsson
2009-08-20 15:26 ` Chris Larson
0 siblings, 1 reply; 3+ messages in thread
From: Ulf Samuelsson @ 2009-08-20 14:31 UTC (permalink / raw)
To: openembedded-devel
I just finished a nice gnome script which allows me to automatically
generate SRC_URI_append's
I select the files[1-4] in <recipy-dir>/<recipy>/<xxx>/<yyy>",
and then run the script
result is:
SRC_URI_append_<board> = "\
file://<file1> \
file://<file2> \
file://<file3> \
file://<file4> \
"
Now, in <recipy-dir>/<recipy>.bb I want to include the file using
require <xxx>/<yyy>/SRC_URI_append
This did not work, so I tried symlinking - bad move...
I'd hate having to move it to the top directory of the recipe.
Any ideas?
--
Best Regards
Ulf Samuelsson
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Is it possible for a recipe to include/require something from a subdirectory?
2009-08-20 14:31 Is it possible for a recipe to include/require something from a subdirectory? Ulf Samuelsson
@ 2009-08-20 15:26 ` Chris Larson
2009-08-22 8:13 ` Ulf Samuelsson
0 siblings, 1 reply; 3+ messages in thread
From: Chris Larson @ 2009-08-20 15:26 UTC (permalink / raw)
To: openembedded-devel
On Thu, Aug 20, 2009 at 7:31 AM, Ulf Samuelsson<ulf.samuelsson@atmel.com> wrote:
> I just finished a nice gnome script which allows me to automatically
> generate SRC_URI_append's
>
> I select the files[1-4] in <recipy-dir>/<recipy>/<xxx>/<yyy>",
> and then run the script
>
> result is:
>
> SRC_URI_append_<board> = "\
> file://<file1> \
> file://<file2> \
> file://<file3> \
> file://<file4> \
> "
>
> Now, in <recipy-dir>/<recipy>.bb I want to include the file using
>
> require <xxx>/<yyy>/SRC_URI_append
>
> This did not work, so I tried symlinking - bad move...
> I'd hate having to move it to the top directory of the recipe.
>
> Any ideas?
include/require obey BBPATH. As far as I know, the parser should be
temporarily changing bbpath to facilitate includes relative to the
file doing the including. If that isn't working, you could try
require ${FILE_DIRNAME}/foo/bar instead.
--
Chris Larson
clarson at kergoth dot com
clarson at mvista dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Software Engineer
MontaVista Software, Inc.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Is it possible for a recipe to include/require something from a subdirectory?
2009-08-20 15:26 ` Chris Larson
@ 2009-08-22 8:13 ` Ulf Samuelsson
0 siblings, 0 replies; 3+ messages in thread
From: Ulf Samuelsson @ 2009-08-22 8:13 UTC (permalink / raw)
To: openembedded-devel
Chris Larson skrev:
> On Thu, Aug 20, 2009 at 7:31 AM, Ulf Samuelsson<ulf.samuelsson@atmel.com> wrote:
>> I just finished a nice gnome script which allows me to automatically
>> generate SRC_URI_append's
>>
>> I select the files[1-4] in <recipy-dir>/<recipy>/<xxx>/<yyy>",
>> and then run the script
>>
>> result is:
>>
>> SRC_URI_append_<board> = "\
>> file://<file1> \
>> file://<file2> \
>> file://<file3> \
>> file://<file4> \
>> "
>>
>> Now, in <recipy-dir>/<recipy>.bb I want to include the file using
>>
>> require <xxx>/<yyy>/SRC_URI_append
>>
>> This did not work, so I tried symlinking - bad move...
>> I'd hate having to move it to the top directory of the recipe.
>>
>> Any ideas?
>
> include/require obey BBPATH. As far as I know, the parser should be
> temporarily changing bbpath to facilitate includes relative to the
> file doing the including. If that isn't working, you could try
> require ${FILE_DIRNAME}/foo/bar instead.
That worked,
This saves me a lot of time.
I am thinking of checking in the script that generates the file.
Anyone interested?
Got as few other gnome scripts which I find useful.
1: Select <dir>; Copy <dir> to <dir>-0rig for creating a patch
2: Select <dir1> and <dir2>; diff -urN <dir1> <dir2>
3: Select <patch>.patch;
splitdiff the patch into the directory <patch>/patchdir.
Rename each <patch> to <patch>.patch
If the file "template" is present:
For each <string> (one per line) in template
If a patch matches the string:
create the <string> directory
move all matching patches to this directory.
4: Select <source> and <patch-directory>
The <patch-directory> is identified by having "./patchdir"
"./patchdir contains a number of directories (patchsets).
Attempt to apply all patches in the patch directory
to the source tree using --dry-run.
Provide OK/FAIL result + a list of all
working patches are collected in a file.
5: Select a number of files; Generate SRC_URI_append.inc,
optimized for the kernel
It will check if a file "arch" exists and for
each machine listed in "arch" it will check its subdirectory
for a "defconfig", and will generate a
SRC_URI_append_<arch>.inc, containing the stuff for each arch.
6: Select <file>; Set the execute bit on the <file>
7: Select <dir> <file>.patch; apply <patch>.patch to <dir>
Report results
--
Best Regards
Ulf Samuelsson
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-22 8:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-20 14:31 Is it possible for a recipe to include/require something from a subdirectory? Ulf Samuelsson
2009-08-20 15:26 ` Chris Larson
2009-08-22 8:13 ` Ulf Samuelsson
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.