diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-03 10:59:25 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-05 10:22:56 -0800 |
commit | 06f2f8ce0a3093973ca54b48f542f8485b666079 (patch) | |
tree | dbcfa5c491eb2e5d237aa539cb7c6e77dc07dd6f /meta/recipes-core/uclibc/uclibc-config.inc | |
parent | d01dadfb87cfd2284b3e849d35a35fe5df0239c4 (diff) | |
download | poky-06f2f8ce0a3093973ca54b48f542f8485b666079.tar.gz |
meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
Using "1" with getVar is bad coding style and "True" is preferred.
This patch is a sed over the meta directory of the form:
sed \
-e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \
-e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \
-i `grep -ril getVar *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/uclibc/uclibc-config.inc')
-rw-r--r-- | meta/recipes-core/uclibc/uclibc-config.inc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/recipes-core/uclibc/uclibc-config.inc b/meta/recipes-core/uclibc/uclibc-config.inc index 8bb094800d..0e0c1885ac 100644 --- a/meta/recipes-core/uclibc/uclibc-config.inc +++ b/meta/recipes-core/uclibc/uclibc-config.inc | |||
@@ -35,7 +35,7 @@ def map_uclibc_arch(a, d): | |||
35 | """Return the uClibc architecture for the given TARGET_ARCH.""" | 35 | """Return the uClibc architecture for the given TARGET_ARCH.""" |
36 | import re | 36 | import re |
37 | 37 | ||
38 | valid_archs = d.getVar('valid_archs', 1).split() | 38 | valid_archs = d.getVar('valid_archs', True).split() |
39 | 39 | ||
40 | if re.match('^(arm|sa110).*', a): return 'arm' | 40 | if re.match('^(arm|sa110).*', a): return 'arm' |
41 | elif re.match('^(i.86|athlon)$', a): return 'i386' | 41 | elif re.match('^(i.86|athlon)$', a): return 'i386' |
@@ -50,14 +50,14 @@ def map_uclibc_arch(a, d): | |||
50 | else: | 50 | else: |
51 | bb.error("cannot map '%s' to a uClibc architecture" % a) | 51 | bb.error("cannot map '%s' to a uClibc architecture" % a) |
52 | 52 | ||
53 | export UCLIBC_ARCH = "${@map_uclibc_arch(d.getVar('TARGET_ARCH', 1), d)}" | 53 | export UCLIBC_ARCH = "${@map_uclibc_arch(d.getVar('TARGET_ARCH', True), d)}" |
54 | 54 | ||
55 | def map_uclibc_abi(o, d): | 55 | def map_uclibc_abi(o, d): |
56 | """Return the uClibc ABI for the given TARGET_OS.""" | 56 | """Return the uClibc ABI for the given TARGET_OS.""" |
57 | import re | 57 | import re |
58 | 58 | ||
59 | arch = d.getVar('TARGET_ARCH', 1) | 59 | arch = d.getVar('TARGET_ARCH', True) |
60 | if map_uclibc_arch(d.getVar('TARGET_ARCH', 1), d) == "arm": | 60 | if map_uclibc_arch(d.getVar('TARGET_ARCH', True), d) == "arm": |
61 | if re.match('.*eabi$', o): return 'ARM_EABI' | 61 | if re.match('.*eabi$', o): return 'ARM_EABI' |
62 | else: return 'ARM_OABI' | 62 | else: return 'ARM_OABI' |
63 | # FIXME: This is inaccurate! Handle o32, n32, n64 | 63 | # FIXME: This is inaccurate! Handle o32, n32, n64 |
@@ -65,7 +65,7 @@ def map_uclibc_abi(o, d): | |||
65 | elif re.match('^mips.*', arch): return 'MIPS_O32_ABI' | 65 | elif re.match('^mips.*', arch): return 'MIPS_O32_ABI' |
66 | return "" | 66 | return "" |
67 | 67 | ||
68 | export UCLIBC_ABI = "${@map_uclibc_abi(d.getVar('TARGET_OS', 1), d)}" | 68 | export UCLIBC_ABI = "${@map_uclibc_abi(d.getVar('TARGET_OS', True), d)}" |
69 | 69 | ||
70 | def map_uclibc_endian(a, d): | 70 | def map_uclibc_endian(a, d): |
71 | """Return the uClibc endianess for the given TARGET_ARCH.""" | 71 | """Return the uClibc endianess for the given TARGET_ARCH.""" |
@@ -79,7 +79,7 @@ def map_uclibc_endian(a, d): | |||
79 | return 'BIG' | 79 | return 'BIG' |
80 | return 'LITTLE' | 80 | return 'LITTLE' |
81 | 81 | ||
82 | export UCLIBC_ENDIAN = "${@map_uclibc_endian(d.getVar('TARGET_ARCH', 1), d)}" | 82 | export UCLIBC_ENDIAN = "${@map_uclibc_endian(d.getVar('TARGET_ARCH', True), d)}" |
83 | 83 | ||
84 | # internal helper | 84 | # internal helper |
85 | def uclibc_cfg(feature, features, tokens, cnf, rem): | 85 | def uclibc_cfg(feature, features, tokens, cnf, rem): |