On Sun, Jan 13, 2013 at 04:08:18PM +0100, Michał Górny wrote:
> On Sun, 13 Jan 2013 09:05:31 -0600
> William Hubbs <willi...@gentoo.org> wrote:
> 
> > On Sun, Jan 13, 2013 at 02:29:43PM +0100, Michał Górny wrote:
> > > The run_in_build_dir() command simply runs given command
> > > in the directory stated as BUILD_DIR. This variable is used commonly
> > > by autotools-utils, cmake-utils and python-r1 eclasses, therefore I'm
> > > proposing adding the relevant function to eutils.
> > > ---
> > >  gx86/eclass/eutils.eclass | 19 +++++++++++++++++++
> > >  1 file changed, 19 insertions(+)
> > > 
> > > diff --git a/gx86/eclass/eutils.eclass b/gx86/eclass/eutils.eclass
> > > index 6588792..bb3c1e3 100644
> > > --- a/gx86/eclass/eutils.eclass
> > > +++ b/gx86/eclass/eutils.eclass
> > > @@ -1495,6 +1495,25 @@ prune_libtool_files() {
> > >   fi
> > >  }
> > >  
> > > +# @FUNCTION: run_in_build_dir
> > > +# @USAGE: <argv>...
> > > +# @DESCRIPTION:
> > > +# Run the given command in the directory pointed by BUILD_DIR.
> > 
> > I think I would make this more generic if it is going in eutiles,
> > e.g. rename it something like run_in_dir and pass in the directory as the
> > first argument.
> 
> That's not going to work for us since the command is subject to a loop
> which sets BUILD_DIR, e.g.:
> 
>   python_foreach_impl run_in_build_dir ...

Can you not change the logic so it doesn't die if build_dir isn't set,
but uses the value of $1 and calls shift?

Thanks,

William

Attachment: pgpR5xEg_ZVrc.pgp
Description: PGP signature

Reply via email to