1 |
On Sun, 13 Jan 2013 09:05:31 -0600 |
2 |
William Hubbs <williamh@g.o> wrote: |
3 |
|
4 |
> On Sun, Jan 13, 2013 at 02:29:43PM +0100, Michał Górny wrote: |
5 |
> > The run_in_build_dir() command simply runs given command |
6 |
> > in the directory stated as BUILD_DIR. This variable is used commonly |
7 |
> > by autotools-utils, cmake-utils and python-r1 eclasses, therefore I'm |
8 |
> > proposing adding the relevant function to eutils. |
9 |
> > --- |
10 |
> > gx86/eclass/eutils.eclass | 19 +++++++++++++++++++ |
11 |
> > 1 file changed, 19 insertions(+) |
12 |
> > |
13 |
> > diff --git a/gx86/eclass/eutils.eclass b/gx86/eclass/eutils.eclass |
14 |
> > index 6588792..bb3c1e3 100644 |
15 |
> > --- a/gx86/eclass/eutils.eclass |
16 |
> > +++ b/gx86/eclass/eutils.eclass |
17 |
> > @@ -1495,6 +1495,25 @@ prune_libtool_files() { |
18 |
> > fi |
19 |
> > } |
20 |
> > |
21 |
> > +# @FUNCTION: run_in_build_dir |
22 |
> > +# @USAGE: <argv>... |
23 |
> > +# @DESCRIPTION: |
24 |
> > +# Run the given command in the directory pointed by BUILD_DIR. |
25 |
> |
26 |
> I think I would make this more generic if it is going in eutiles, |
27 |
> e.g. rename it something like run_in_dir and pass in the directory as the |
28 |
> first argument. |
29 |
|
30 |
That's not going to work for us since the command is subject to a loop |
31 |
which sets BUILD_DIR, e.g.: |
32 |
|
33 |
python_foreach_impl run_in_build_dir ... |
34 |
|
35 |
with python_foreach_impl setting BUILD_DIR. |
36 |
|
37 |
-- |
38 |
Best regards, |
39 |
Michał Górny |