]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
externalsrc.bbclass: Support specifying patterns in CONFIGURE_FILES
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Tue, 3 Oct 2023 01:05:27 +0000 (03:05 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 Oct 2023 10:50:54 +0000 (11:50 +0100)
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>
meta/classes/externalsrc.bbclass

index cba80bb1d4d21bcedb33b9116b0e34bfdb90bb2f..a54f316aa0aa3506d0ea72d8f209168f9652d958 100644 (file)
@@ -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)