On Thu, 2011-11-24 at 09:36 -0800, Khem Raj wrote: > On (24/11/11 12:44), Julian Pidancet wrote: > > >> +def get_gcc_multiarch_setting(bb, d): > > >> + if 'multiarch' in bb.data.getVar('DISTRO_FEATURES',d,1).split() : > > >> + if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'i586', 'i686' ] : > > >> + return "--enable-targets=all" > > >> + if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'powerpc' ] : > > >> + return "--enable-targets=powerpc64" > > >> + if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'sparc' ] : > > >> + return "--enable-targets=all" > > >> + return "" > > looking at above function can this be made into a single if statement > instead of 3
Julian: Could you update this to use the syntax d.getVar instead of bb.data.getVar(..., d) please? We recently did a fairly big cleanup of these and I'd rather not see it creep back in! We also prefer "True" instead of "1" although we've not done a big cleanup on that yet (its planned). As Khem mentioned, we can probably get this down to a couple of getVar calls instead of the above too! Cheers, Richard _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core