diff options
author | Tom Zanussi <tom.zanussi@intel.com> | 2012-07-09 12:07:10 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-10 20:27:02 +0100 |
commit | 2dac207e392cd9d94a0812d9bba350e1d8c322eb (patch) | |
tree | 2148cd90e6d83941882dd3e463bec3264575f718 /meta | |
parent | a8c3bc8f1198494ad60b52c8c92fdc8a8224bba0 (diff) | |
download | poky-2dac207e392cd9d94a0812d9bba350e1d8c322eb.tar.gz |
perf: add perf-scripting feature
Add a new feature named 'perf-scripting'. Adding this into the
PERF_FEATURES variable in perf.inc will enable perf scripting on a
target, which will turn on all the language bindings currently
available in perf (Perl and Python), if perf is included in an image.
If 'perf-scripting' isn't named as a feature (the default), all perf
language bindings will be disabled and unavailable.
(From OE-Core rev: fc0661041436013b9099dbd659994a2b8b292c19)
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-kernel/perf/perf_3.4.bb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/meta/recipes-kernel/perf/perf_3.4.bb b/meta/recipes-kernel/perf/perf_3.4.bb index d49424309d..e96552c2d5 100644 --- a/meta/recipes-kernel/perf/perf_3.4.bb +++ b/meta/recipes-kernel/perf/perf_3.4.bb | |||
@@ -9,7 +9,7 @@ as well." | |||
9 | LICENSE = "GPLv2" | 9 | LICENSE = "GPLv2" |
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" |
11 | 11 | ||
12 | PR = "r1" | 12 | PR = "r2" |
13 | 13 | ||
14 | require perf.inc | 14 | require perf.inc |
15 | 15 | ||
@@ -21,7 +21,8 @@ DEPENDS = "virtual/kernel \ | |||
21 | ${MLPREFIX}binutils \ | 21 | ${MLPREFIX}binutils \ |
22 | " | 22 | " |
23 | 23 | ||
24 | RDEPENDS_${PN} += "elfutils perl perl-modules python" | 24 | SCRIPTING_RDEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl perl-modules python', '',d)}" |
25 | RDEPENDS_${PN} += "elfutils ${SCRIPTING_RDEPENDS}" | ||
25 | 26 | ||
26 | PROVIDES = "virtual/perf" | 27 | PROVIDES = "virtual/perf" |
27 | 28 | ||
@@ -45,6 +46,8 @@ export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version | |||
45 | S = "${STAGING_KERNEL_DIR}" | 46 | S = "${STAGING_KERNEL_DIR}" |
46 | B = "${WORKDIR}/${BPN}-${PV}" | 47 | B = "${WORKDIR}/${BPN}-${PV}" |
47 | 48 | ||
49 | SCRIPTING_DEFINES = "${@perf_feature_enabled('perf-scripting', '', 'NO_LIBPERL=1 NO_LIBPYTHON=1',d)}" | ||
50 | |||
48 | EXTRA_OEMAKE = \ | 51 | EXTRA_OEMAKE = \ |
49 | '-C ${S}/tools/perf \ | 52 | '-C ${S}/tools/perf \ |
50 | O=${B} \ | 53 | O=${B} \ |
@@ -53,7 +56,7 @@ EXTRA_OEMAKE = \ | |||
53 | CC="${CC}" \ | 56 | CC="${CC}" \ |
54 | AR="${AR}" \ | 57 | AR="${AR}" \ |
55 | prefix=/usr \ | 58 | prefix=/usr \ |
56 | NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 \ | 59 | NO_GTK2=1 NO_NEWT=1 NO_DWARF=1 ${SCRIPTING_DEFINES} \ |
57 | ' | 60 | ' |
58 | 61 | ||
59 | do_compile() { | 62 | do_compile() { |
@@ -62,6 +65,9 @@ do_compile() { | |||
62 | 65 | ||
63 | do_install() { | 66 | do_install() { |
64 | oe_runmake DESTDIR=${D} install | 67 | oe_runmake DESTDIR=${D} install |
68 | if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ]; then | ||
69 | oe_runmake DESTDIR=${D} install-python_ext | ||
70 | fi | ||
65 | } | 71 | } |
66 | 72 | ||
67 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 73 | PACKAGE_ARCH = "${MACHINE_ARCH}" |