From d066ec92dc6453b372cf5796f43c484400c060e8 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Tue, 3 Oct 2023 03:05:27 +0200 Subject: 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 Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/classes/externalsrc.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'meta/classes') 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): Get the list of files that should trigger do_configure to re-execute, based on the value of CONFIGURE_FILES """ + import fnmatch + in_files = (d.getVar('CONFIGURE_FILES') or '').split() out_items = [] search_files = [] @@ -263,8 +265,8 @@ def srctree_configure_hash_files(d): if search_files: s_dir = d.getVar('EXTERNALSRC') for root, _, files in os.walk(s_dir): - for f in files: - if f in search_files: + for p in search_files: + for f in fnmatch.filter(files, p): out_items.append('%s:True' % os.path.join(root, f)) return ' '.join(out_items) -- cgit v1.2.3-54-g00ecf