diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2013-03-07 18:39:00 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-09 06:27:25 +0000 |
commit | 4a98bd02ab8918e639353829b221b0c4b6c58165 (patch) | |
tree | 986470696f02b03c8c8dd4e7b96b59f9e102f7b1 /meta/recipes-kernel/perf/perf-features.inc | |
parent | c18a4bded48ed1f8fd39e1741beb2a3452ae43e3 (diff) | |
download | openembedded-core-4a98bd02ab8918e639353829b221b0c4b6c58165.tar.gz openembedded-core-4a98bd02ab8918e639353829b221b0c4b6c58165.tar.bz2 openembedded-core-4a98bd02ab8918e639353829b221b0c4b6c58165.zip |
perf: rename perf.inc to perf-features.inc
The contents of perf.inc are really specific to perf features and
shouldn't use the generic perf.inc name, which implies common recipe
code. It's always confusing to open up this file and find out that's
not what it is.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/perf/perf-features.inc')
-rw-r--r-- | meta/recipes-kernel/perf/perf-features.inc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/recipes-kernel/perf/perf-features.inc b/meta/recipes-kernel/perf/perf-features.inc new file mode 100644 index 0000000000..b8859ab7d5 --- /dev/null +++ b/meta/recipes-kernel/perf/perf-features.inc @@ -0,0 +1,22 @@ +PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui" + +def perf_feature_enabled(feature, trueval, falseval, d): + """ + Check which perf features are enabled. + + The PERF_FEATURES_ENABLE variable lists the perf features to + enable. Override it if you want something different from what's + listed above, which is the default. If empty, the build won't + enable any features (which may be exactly what you want, just a + barebones perf without any extra baggage, what you get if you + specify an empty feature list). + + Available perf features: + perf-scripting: enable support for Perl and Python bindings + perf-tui: enable support for the perf TUI (via libnewt) + + """ + enabled_features = d.getVar("PERF_FEATURES_ENABLE", True) or "" + if feature in enabled_features: + return trueval + return falseval |