diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2023-10-03 03:05:27 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-06 11:51:11 +0100 |
commit | d066ec92dc6453b372cf5796f43c484400c060e8 (patch) | |
tree | ce08420af82414328544b27c934223baf509afa8 /meta/classes | |
parent | b8b5c786e73dd385ae6a532571480d12c1883378 (diff) | |
download | poky-d066ec92dc6453b372cf5796f43c484400c060e8.tar.gz |
externalsrc.bbclass: Support specifying patterns in CONFIGURE_FILES
This allows, e.g., *.cmake to be added to CONFIGURE_FILES to make the
do_configure task depend on changes to any cmake file.
(From OE-Core rev: 09873b3fb24a00cfbd73282d29e4c5821774f579)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/externalsrc.bbclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index cba80bb1d4..a54f316aa0 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass | |||
@@ -252,6 +252,8 @@ def srctree_configure_hash_files(d): | |||
252 | Get the list of files that should trigger do_configure to re-execute, | 252 | Get the list of files that should trigger do_configure to re-execute, |
253 | based on the value of CONFIGURE_FILES | 253 | based on the value of CONFIGURE_FILES |
254 | """ | 254 | """ |
255 | import fnmatch | ||
256 | |||
255 | in_files = (d.getVar('CONFIGURE_FILES') or '').split() | 257 | in_files = (d.getVar('CONFIGURE_FILES') or '').split() |
256 | out_items = [] | 258 | out_items = [] |
257 | search_files = [] | 259 | search_files = [] |
@@ -263,8 +265,8 @@ def srctree_configure_hash_files(d): | |||
263 | if search_files: | 265 | if search_files: |
264 | s_dir = d.getVar('EXTERNALSRC') | 266 | s_dir = d.getVar('EXTERNALSRC') |
265 | for root, _, files in os.walk(s_dir): | 267 | for root, _, files in os.walk(s_dir): |
266 | for f in files: | 268 | for p in search_files: |
267 | if f in search_files: | 269 | for f in fnmatch.filter(files, p): |
268 | out_items.append('%s:True' % os.path.join(root, f)) | 270 | out_items.append('%s:True' % os.path.join(root, f)) |
269 | return ' '.join(out_items) | 271 | return ' '.join(out_items) |
270 | 272 | ||