externalsrc.bbclass: Support specifying patterns in CONFIGURE_FILES
PATCH 1/3 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.
--- meta/classes/externalsrc.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
meta/classes/externalsrc.bbclass +4 -2
@@ -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)
PATCH 2/3 cmake.bbclass: Add *.cmake to CONFIGURE_FILES
This makes do_configure depend on changes to any cmake file when externalsrc is active.
--- meta/classes-recipe/cmake.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/cmake.bbclass +1 -1
@@ -156,7 +156,7 @@ EOF addtask generate_toolchain_file after do_patch before do_configure -CONFIGURE_FILES = "CMakeLists.txt" +CONFIGURE_FILES = "CMakeLists.txt *.cmake" do_configure[cleandirs] = "${@d.getVar('B') if d.getVar('S') != d.getVar('B') else ''}"
PATCH 3/3 autotools.bbclass: Add *.m4 to CONFIGURE_FILES
In reply to Peter KjellerstedtThis makes do_configure depend on changes to any m4 file when externalsrc is active.
--- meta/classes-recipe/autotools.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/autotools.bbclass +1 -1
@@ -157,7 +157,7 @@ python autotools_aclocals () { do_configure[file-checksums] += "${@' '.join(siteinfo_get_files(d, sysrootcache=False)[1])}" -CONFIGURE_FILES = "${S}/configure.in ${S}/configure.ac ${S}/config.h.in ${S}/acinclude.m4 Makefile.am" +CONFIGURE_FILES = "${S}/configure.in ${S}/configure.ac ${S}/config.h.in *.m4 Makefile.am" autotools_do_configure() { # WARNING: gross hack follows:
A message that is not in the archive (sent off-list or not yet received): [email protected]
RE: [OE-core] [PATCH 2/3] cmake.bbclass: Add *.cmake to CONFIGURE_FILES
Quoted 19 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Peter Kjellerstedt
Sent: den 3 oktober 2023 03:05
To: [email protected]
Subject: [OE-core] [PATCH 2/3] cmake.bbclass: Add *.cmake toCONFIGURE_FILESThis makes
do_configuredepend on changes to any cmake file when externalsrc is active.Signed-off-by Peter Kjellerstedt <[email protected]>--- meta/classes-recipe/cmake.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes-recipe/cmake.bbclass +0
-0
meta/classes-recipe/cmake.bbclass EOF · line 162
Quoted 8 lines
meta/classes-recipe/cmake.bbclass +1
-1@@ -156,7 +156,7 @@ EOF addtask generate_toolchain_file after do_patch before do_configure -CONFIGURE_FILES = "CMakeLists.txt" +CONFIGURE_FILES = "CMakeLists.txt *.cmake" do_configure[cleandirs] = "${@d.getVar('B') if d.getVar('S') != d.getVar('B') else ''}"
Any reason this was not integrated today together with the other two patches in this series?
//Peter