diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-03 11:21:22 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-05 10:23:53 -0800 |
| commit | b1aeaa8b0dcf27ef8dcd87279901c6f5817d9e94 (patch) | |
| tree | 62b315fdc05e03677922a0161fdc7a39e2985466 /meta/classes/icecc.bbclass | |
| parent | 22f0df2aa737bda1ae3bce862ee5ceba5b2d204b (diff) | |
| download | poky-b1aeaa8b0dcf27ef8dcd87279901c6f5817d9e94.tar.gz | |
meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)
sed \
-e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data.expand *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/icecc.bbclass')
| -rw-r--r-- | meta/classes/icecc.bbclass | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass index a14e02db0e..45570739f2 100644 --- a/meta/classes/icecc.bbclass +++ b/meta/classes/icecc.bbclass | |||
| @@ -39,7 +39,7 @@ def icecc_dep_prepend(d): | |||
| 39 | DEPENDS_prepend += "${@icecc_dep_prepend(d)} " | 39 | DEPENDS_prepend += "${@icecc_dep_prepend(d)} " |
| 40 | 40 | ||
| 41 | def get_cross_kernel_cc(bb,d): | 41 | def get_cross_kernel_cc(bb,d): |
| 42 | kernel_cc = bb.data.expand('${KERNEL_CC}', d) | 42 | kernel_cc = d.expand('${KERNEL_CC}') |
| 43 | kernel_cc = kernel_cc.replace('ccache', '').strip() | 43 | kernel_cc = kernel_cc.replace('ccache', '').strip() |
| 44 | kernel_cc = kernel_cc.split(' ')[0] | 44 | kernel_cc = kernel_cc.split(' ')[0] |
| 45 | kernel_cc = kernel_cc.strip() | 45 | kernel_cc = kernel_cc.strip() |
| @@ -49,7 +49,7 @@ def create_path(compilers, bb, d): | |||
| 49 | """ | 49 | """ |
| 50 | Create Symlinks for the icecc in the staging directory | 50 | Create Symlinks for the icecc in the staging directory |
| 51 | """ | 51 | """ |
| 52 | staging = os.path.join(bb.data.expand('${STAGING_BINDIR}', d), "ice") | 52 | staging = os.path.join(d.expand('${STAGING_BINDIR}'), "ice") |
| 53 | if icc_is_kernel(bb, d): | 53 | if icc_is_kernel(bb, d): |
| 54 | staging += "-kernel" | 54 | staging += "-kernel" |
| 55 | 55 | ||
| @@ -78,7 +78,7 @@ def create_path(compilers, bb, d): | |||
| 78 | return staging | 78 | return staging |
| 79 | 79 | ||
| 80 | def use_icc(bb,d): | 80 | def use_icc(bb,d): |
| 81 | package_tmp = bb.data.expand('${PN}', d) | 81 | package_tmp = d.expand('${PN}') |
| 82 | 82 | ||
| 83 | system_class_blacklist = [ "none" ] | 83 | system_class_blacklist = [ "none" ] |
| 84 | user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split() | 84 | user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split() |
| @@ -101,7 +101,7 @@ def use_icc(bb,d): | |||
| 101 | return "no" | 101 | return "no" |
| 102 | 102 | ||
| 103 | if d.getVar('PARALLEL_MAKE') == "": | 103 | if d.getVar('PARALLEL_MAKE') == "": |
| 104 | bb.note(package_tmp, " ", bb.data.expand('${PV}', d), " has empty PARALLEL_MAKE, disable icecc") | 104 | bb.note(package_tmp, " ", d.expand('${PV}'), " has empty PARALLEL_MAKE, disable icecc") |
| 105 | return "no" | 105 | return "no" |
| 106 | 106 | ||
| 107 | return "yes" | 107 | return "yes" |
| @@ -124,19 +124,19 @@ def icc_version(bb, d): | |||
| 124 | 124 | ||
| 125 | if icc_is_native(bb, d): | 125 | if icc_is_native(bb, d): |
| 126 | archive_name = "local-host-env" | 126 | archive_name = "local-host-env" |
| 127 | elif bb.data.expand('${HOST_PREFIX}', d) == "": | 127 | elif d.expand('${HOST_PREFIX}') == "": |
| 128 | bb.fatal(bb.data.expand("${PN}", d), " NULL prefix") | 128 | bb.fatal(d.expand("${PN}"), " NULL prefix") |
| 129 | else: | 129 | else: |
| 130 | prefix = bb.data.expand('${HOST_PREFIX}' , d) | 130 | prefix = d.expand('${HOST_PREFIX}' ) |
| 131 | distro = bb.data.expand('${DISTRO}', d) | 131 | distro = d.expand('${DISTRO}') |
| 132 | target_sys = bb.data.expand('${TARGET_SYS}', d) | 132 | target_sys = d.expand('${TARGET_SYS}') |
| 133 | float = d.getVar('TARGET_FPU') or "hard" | 133 | float = d.getVar('TARGET_FPU') or "hard" |
| 134 | archive_name = prefix + distro + "-" + target_sys + "-" + float | 134 | archive_name = prefix + distro + "-" + target_sys + "-" + float |
| 135 | if icc_is_kernel(bb, d): | 135 | if icc_is_kernel(bb, d): |
| 136 | archive_name += "-kernel" | 136 | archive_name += "-kernel" |
| 137 | 137 | ||
| 138 | import socket | 138 | import socket |
| 139 | ice_dir = bb.data.expand('${STAGING_DIR_NATIVE}${prefix_native}', d) | 139 | ice_dir = d.expand('${STAGING_DIR_NATIVE}${prefix_native}') |
| 140 | tar_file = os.path.join(ice_dir, 'ice', archive_name + "-@VERSION@-" + socket.gethostname() + '.tar.gz') | 140 | tar_file = os.path.join(ice_dir, 'ice', archive_name + "-@VERSION@-" + socket.gethostname() + '.tar.gz') |
| 141 | 141 | ||
| 142 | return tar_file | 142 | return tar_file |
| @@ -146,7 +146,7 @@ def icc_path(bb,d): | |||
| 146 | return create_path( [get_cross_kernel_cc(bb,d), ], bb, d) | 146 | return create_path( [get_cross_kernel_cc(bb,d), ], bb, d) |
| 147 | 147 | ||
| 148 | else: | 148 | else: |
| 149 | prefix = bb.data.expand('${HOST_PREFIX}', d) | 149 | prefix = d.expand('${HOST_PREFIX}') |
| 150 | return create_path( [prefix+"gcc", prefix+"g++"], bb, d) | 150 | return create_path( [prefix+"gcc", prefix+"g++"], bb, d) |
| 151 | 151 | ||
| 152 | def icc_get_tool(bb, d, tool): | 152 | def icc_get_tool(bb, d, tool): |
| @@ -155,8 +155,8 @@ def icc_get_tool(bb, d, tool): | |||
| 155 | elif icc_is_kernel(bb, d): | 155 | elif icc_is_kernel(bb, d): |
| 156 | return os.popen("which %s" % get_cross_kernel_cc(bb, d)).read()[:-1] | 156 | return os.popen("which %s" % get_cross_kernel_cc(bb, d)).read()[:-1] |
| 157 | else: | 157 | else: |
| 158 | ice_dir = bb.data.expand('${STAGING_BINDIR_TOOLCHAIN}', d) | 158 | ice_dir = d.expand('${STAGING_BINDIR_TOOLCHAIN}') |
| 159 | target_sys = bb.data.expand('${TARGET_SYS}', d) | 159 | target_sys = d.expand('${TARGET_SYS}') |
| 160 | return os.path.join(ice_dir, "%s-%s" % (target_sys, tool)) | 160 | return os.path.join(ice_dir, "%s-%s" % (target_sys, tool)) |
| 161 | 161 | ||
| 162 | set_icecc_env() { | 162 | set_icecc_env() { |
