summaryrefslogtreecommitdiffstats
path: root/meta/classes/externalsrc.bbclass
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2023-10-03 03:05:27 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-06 11:50:54 +0100
commit09873b3fb24a00cfbd73282d29e4c5821774f579 (patch)
tree4bad849e60632f53e2978bacc7e159e0a01943ea /meta/classes/externalsrc.bbclass
parent46dd8ce41756dbc2aa0f9001416f208cced1c8d5 (diff)
downloadopenembedded-core-09873b3fb24a00cfbd73282d29e4c5821774f579.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. 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/externalsrc.bbclass')
-rw-r--r--meta/classes/externalsrc.bbclass6
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):
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)