<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div><br>
<br>
---- Paul Eggleton wrote ----<br>
<br>
&gt; Hi Ola,<br>
&gt; <br>
&gt; I like this, thanks. Just one thing commented below.<br>
&gt; <br>
&gt; On Thu, 22 Dec 2016 14:28:03 Ola x Nilsson wrote:<br>
<br>
&gt; &gt; <br>
&gt; &gt; &#43; bb.build.addtask('do_makeclean', 'do_clean', None, d)<br>
&gt; &gt; &#43;<br>
&gt; <br>
&gt; Shouldn't this be do_buildclean here?<br>
&gt; <br>
<br>
Of course it should. The danger of last minute changes. I'll send a v2 patch after the holidays.
<br>
<br>
-- <br>
Ola </div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi Ola,<br>
<br>
I like this, thanks. Just one thing commented below.<br>
<br>
On Thu, 22 Dec 2016 14:28:03 Ola x Nilsson wrote:<br>
&gt; The buildclean task should call the package build system clean<br>
&gt; command, just implemented for Make for now.<br>
&gt; <br>
&gt; This is meant for recipes where S == B, but can be useful as a<br>
&gt; standalone task for other recipes too.<br>
&gt; <br>
&gt; Setting it to run before do_clean will do what most developers expect<br>
&gt; when calling bitbake -c clean.<br>
&gt; <br>
&gt; Signed-off-by: Ola x Nilsson &lt;ola.x.nilsson@axis.com&gt;<br>
&gt; ---<br>
&gt;&nbsp; meta/classes/externalsrc.bbclass | 17 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;-<br>
&gt;&nbsp; 1 file changed, 16 insertions(&#43;), 1 deletion(-)<br>
&gt; <br>
&gt; diff --git a/meta/classes/externalsrc.bbclass<br>
&gt; b/meta/classes/externalsrc.bbclass index e115a47..bc82f1f 100644<br>
&gt; --- a/meta/classes/externalsrc.bbclass<br>
&gt; &#43;&#43;&#43; b/meta/classes/externalsrc.bbclass<br>
&gt; @@ -4,7 &#43;4,7 @@<br>
&gt;&nbsp; # Copyright (C) 2009 Chris Larson &lt;clarson@kergoth.com&gt;<br>
&gt;&nbsp; # Released under the MIT license (see COPYING.MIT for the terms)<br>
&gt;&nbsp; #<br>
&gt; -# externalsrc.bbclass enables use of an existing source tree, usually<br>
&gt; external to <br>
&gt; &#43;# externalsrc.bbclass enables use of an existing source tree,<br>
&gt; usually external to <br>
&gt; # the build system to build a piece of software rather<br>
&gt; than the usual fetch/unpack/patch # process.<br>
&gt;&nbsp; #<br>
&gt; @@ -108,6 &#43;108,8 @@ python () {<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # We don't want the workdir to go away<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d.appendVar('RM_WORK_EXCLUDE', ' ' &#43; d.getVar('PN'))<br>
&gt; <br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bb.build.addtask('do_makeclean', 'do_clean', None, d)<br>
&gt; &#43;<br>
<br>
Shouldn't this be do_buildclean here?<br>
<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # If B=S the same builddir is used even for different<br>
&gt; architectures. # Thus, use a shared CONFIGURESTAMPFILE and STAMP directory<br>
&gt; so that # change of do_configure task hash is correctly detected and stamps<br>
&gt; are @@ -142,6 &#43;144,17 @@ python externalsrc_compile_prefunc() {<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bb.plain('NOTE: %s: compiling from external source tree %s' %<br>
&gt; (d.getVar('PN'), d.getVar('EXTERNALSRC'))) }<br>
&gt; <br>
&gt; &#43;do_buildclean[dirs] = &quot;${S} ${B}&quot;<br>
&gt; &#43;do_buildclean[nostamp] = &quot;1&quot;<br>
&gt; &#43;do_buildclean[doc] = &quot;Call 'make clean' or equivalent in ${B}&quot;<br>
&gt; &#43;externalsrc_do_buildclean() {<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oe_runmake clean || die &quot;make failed&quot;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; else<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bbnote &quot;nothing to compile - no makefile found&quot;<br>
&gt; &#43;&nbsp;&nbsp;&nbsp;&nbsp; fi<br>
&gt; &#43;}<br>
&gt; &#43;<br>
&gt;&nbsp; def srctree_hash_files(d):<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; import shutil<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; import subprocess<br>
&gt; @@ -188,3 &#43;201,5 @@ def srctree_configure_hash_files(d):<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if f in search_files:<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out_items.append('%s:True' % os.path.join(root, f))<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ' '.join(out_items)<br>
&gt; &#43;<br>
&gt; &#43;EXPORT_FUNCTIONS do_buildclean<br>
<br>
Cheers,<br>
Paul<br>
<br>
-- <br>
<br>
Paul Eggleton<br>
Intel Open Source Technology Centre<br>
</div>
</span></font>
</body>
</html>