summaryrefslogtreecommitdiffstats
path: root/meta/classes/icecc.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-03 11:21:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-05 10:23:53 -0800
commitb1aeaa8b0dcf27ef8dcd87279901c6f5817d9e94 (patch)
tree62b315fdc05e03677922a0161fdc7a39e2985466 /meta/classes/icecc.bbclass
parent22f0df2aa737bda1ae3bce862ee5ceba5b2d204b (diff)
downloadpoky-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.bbclass26
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):
39DEPENDS_prepend += "${@icecc_dep_prepend(d)} " 39DEPENDS_prepend += "${@icecc_dep_prepend(d)} "
40 40
41def get_cross_kernel_cc(bb,d): 41def 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
80def use_icc(bb,d): 80def 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
152def icc_get_tool(bb, d, tool): 152def 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
162set_icecc_env() { 162set_icecc_env() {