diff options
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py')
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index b006d06720..97aa130431 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
@@ -69,21 +69,25 @@ def init(data): | |||
69 | def supports(fn, d): | 69 | def supports(fn, d): |
70 | return fn[-5:] == ".conf" | 70 | return fn[-5:] == ".conf" |
71 | 71 | ||
72 | def include(parentfn, fn, lineno, data, error_out): | 72 | def include(parentfn, fns, lineno, data, error_out): |
73 | """ | 73 | """ |
74 | error_out: A string indicating the verb (e.g. "include", "inherit") to be | 74 | error_out: A string indicating the verb (e.g. "include", "inherit") to be |
75 | used in a ParseError that will be raised if the file to be included could | 75 | used in a ParseError that will be raised if the file to be included could |
76 | not be included. Specify False to avoid raising an error in this case. | 76 | not be included. Specify False to avoid raising an error in this case. |
77 | """ | 77 | """ |
78 | if parentfn == fn: # prevent infinite recursion | 78 | fns = data.expand(fns) |
79 | return None | ||
80 | |||
81 | fn = data.expand(fn) | ||
82 | parentfn = data.expand(parentfn) | 79 | parentfn = data.expand(parentfn) |
83 | 80 | ||
84 | if not fn: | 81 | # "include" or "require" accept zero to n space-separated file names to include. |
85 | # "include" or "require" without parameter is fine, just return. | 82 | for fn in fns.split(): |
86 | return | 83 | include_single_file(parentfn, fn, lineno, data, error_out) |
84 | |||
85 | def include_single_file(parentfn, fn, lineno, data, error_out): | ||
86 | """ | ||
87 | Helper function for include() which does not expand or split its parameters. | ||
88 | """ | ||
89 | if parentfn == fn: # prevent infinite recursion | ||
90 | return None | ||
87 | 91 | ||
88 | if not os.path.isabs(fn): | 92 | if not os.path.isabs(fn): |
89 | dname = os.path.dirname(parentfn) | 93 | dname = os.path.dirname(parentfn) |