On Friday 14 October 2011 03:08:14 Michael Haubenwallner wrote: > On 10/14/11 01:48, Mike Frysinger wrote: > > i've found myself a few times having to implement logic like so: > > CFLAGS=${BUILD_CFLAGS:--O1 -pipe} \ > > CXXFLAGS=${BUILD_CXXFLAGS:--O1 -pipe} \ > > CPPFLAGS=${BUILD_CPPFLAGS} \ > > LDFLAGS=${BUILD_LDFLAGS} \ > > CC=$(tc-getBUILD_CC) \ > > LD=$(tc-getBUILD_LD) \ > > econf --host=${CBUILD} "$@" > > <snip> > > > so rather than continuing to copy & paste this logic everywhere, i'm > > going to add it to toolchain-funcs.eclass as "econf_build". any > > feedback before i do ? > > Eventually not to stick to 'econf', but provide a more generic one, > so it is useable like this (in lack of a better name): > > run_with_build_env econf --host=${CBUILD} ...
i thought of that, but it seems like we've generally moved away from this style in the tree. the biggest example being `try ...` -> `... || die`. i'll probably implement as an @INTERNAL: tc-env_build() { ... } then define econf_build on top of that as an exported API. then let's see what grows organically beyond. -mike
signature.asc
Description: This is a digitally signed message part.