[oe-commits] Chris Larson : autotools: use oe.utils.inherits
git version control
git at git.openembedded.org
Fri Feb 4 15:00:32 UTC 2011
Module: openembedded.git
Branch: master
Commit: f751d6c74e812fcaa055a71b992a2d6d6ef1c9d6
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=f751d6c74e812fcaa055a71b992a2d6d6ef1c9d6
Author: Chris Larson <chris_larson at mentor.com>
Date: Mon Jan 31 09:28:42 2011 -0700
autotools: use oe.utils.inherits
Signed-off-by: Chris Larson <chris_larson at mentor.com>
---
classes/autotools.bbclass | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
index 3850ae9..c8cb0e9 100644
--- a/classes/autotools.bbclass
+++ b/classes/autotools.bbclass
@@ -12,12 +12,11 @@ def autotools_deps(d):
return deps
deps += 'autoconf-native automake-native help2man-native '
- if not pn in ['libtool', 'libtool-native', 'libtool-cross']:
+ if pn not in ['libtool', 'libtool-native', 'libtool-cross']:
deps += 'libtool-native '
- if not bb.data.inherits_class('native', d) \
- and not bb.data.inherits_class('cross', d) \
- and not bb.data.inherits_class('sdk', d) \
- and not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1):
+ if (not oe.utils.inherits(d, 'native', 'nativesdk', 'cross',
+ 'sdk') and
+ not d.getVar('INHIBIT_DEFAULT_DEPS', True)):
deps += 'libtool-cross '
return deps + 'gnu-config-native '
@@ -31,11 +30,7 @@ DEPENDS_virtclass-nativesdk_prepend = "${@autotools_deps(d)}"
inherit siteinfo
def _autotools_get_sitefiles(d):
- def inherits(d, *classes):
- if any(bb.data.inherits_class(cls, d) for cls in classes):
- return True
-
- if inherits(d, "native", "nativesdk"):
+ if oe.utils.inherits(d, 'native', 'nativesdk'):
return
sitedata = siteinfo_data(d)
More information about the Openembedded-commits
mailing list