summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/autotools.bbclass2
-rw-r--r--meta/classes/cmake.bbclass2
-rw-r--r--meta/classes/externalsrc.bbclass22
3 files changed, 26 insertions, 0 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index e1686206f7..257e094149 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -229,6 +229,8 @@ python autotools_copy_aclocals () {
229} 229}
230autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA" 230autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA"
231 231
232CONFIGURE_FILES = "${S}/configure.in ${S}/configure.ac ${S}/config.h.in ${S}/acinclude.m4 Makefile.am"
233
232autotools_do_configure() { 234autotools_do_configure() {
233 # WARNING: gross hack follows: 235 # WARNING: gross hack follows:
234 # An autotools built package generally needs these scripts, however only 236 # An autotools built package generally needs these scripts, however only
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 77ab626f9f..feabf6dea9 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -84,6 +84,8 @@ EOF
84 84
85addtask generate_toolchain_file after do_patch before do_configure 85addtask generate_toolchain_file after do_patch before do_configure
86 86
87CONFIGURE_FILES = "CMakeLists.txt"
88
87cmake_do_configure() { 89cmake_do_configure() {
88 if [ "${OECMAKE_BUILDPATH}" ]; then 90 if [ "${OECMAKE_BUILDPATH}" ]; then
89 bbnote "cmake.bbclass no longer uses OECMAKE_BUILDPATH. The default behaviour is now out-of-tree builds with B=WORKDIR/build." 91 bbnote "cmake.bbclass no longer uses OECMAKE_BUILDPATH. The default behaviour is now out-of-tree builds with B=WORKDIR/build."
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index da7eb4781c..f173496ae8 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -89,6 +89,7 @@ python () {
89 # function is run every time 89 # function is run every time
90 d.setVar('BB_DONT_CACHE', '1') 90 d.setVar('BB_DONT_CACHE', '1')
91 d.setVarFlag('do_compile', 'file-checksums', '${@srctree_hash_files(d)}') 91 d.setVarFlag('do_compile', 'file-checksums', '${@srctree_hash_files(d)}')
92 d.setVarFlag('do_configure', 'file-checksums', '${@srctree_configure_hash_files(d)}')
92 93
93 # We don't want the workdir to go away 94 # We don't want the workdir to go away
94 d.appendVar('RM_WORK_EXCLUDE', ' ' + d.getVar('PN', True)) 95 d.appendVar('RM_WORK_EXCLUDE', ' ' + d.getVar('PN', True))
@@ -152,3 +153,24 @@ def srctree_hash_files(d):
152 else: 153 else:
153 ret = d.getVar('EXTERNALSRC', True) + '/*:True' 154 ret = d.getVar('EXTERNALSRC', True) + '/*:True'
154 return ret 155 return ret
156
157def srctree_configure_hash_files(d):
158 """
159 Get the list of files that should trigger do_configure to re-execute,
160 based on the value of CONFIGURE_FILES
161 """
162 in_files = (d.getVar('CONFIGURE_FILES', True) or '').split()
163 out_items = []
164 search_files = []
165 for entry in in_files:
166 if entry.startswith('/'):
167 out_items.append('%s:%s' % (entry, os.path.exists(entry)))
168 else:
169 search_files.append(entry)
170 if search_files:
171 s_dir = d.getVar('EXTERNALSRC', True)
172 for root, _, files in os.walk(s_dir):
173 for f in files:
174 if f in search_files:
175 out_items.append('%s:True' % os.path.join(root, f))
176 return ' '.join(out_items)