mirror of
https://git.yoctoproject.org/poky
synced 2026-05-07 16:59:22 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
b8b5c786e7
commit
d066ec92dc
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user