<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>
> 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>
<br>
> > <br>
> > + bb.build.addtask('do_makeclean', 'do_clean', None, d)<br>
> > +<br>
> <br>
> Shouldn't this be do_buildclean here?<br>
> <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>
> The buildclean task should call the package build system clean<br>
> command, just implemented for Make for now.<br>
> <br>
> This is meant for recipes where S == B, but can be useful as a<br>
> standalone task for other recipes too.<br>
> <br>
> Setting it to run before do_clean will do what most developers expect<br>
> when calling bitbake -c clean.<br>
> <br>
> Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com><br>
> ---<br>
> meta/classes/externalsrc.bbclass | 17 ++++++++++++++++-<br>
> 1 file changed, 16 insertions(+), 1 deletion(-)<br>
> <br>
> diff --git a/meta/classes/externalsrc.bbclass<br>
> b/meta/classes/externalsrc.bbclass index e115a47..bc82f1f 100644<br>
> --- a/meta/classes/externalsrc.bbclass<br>
> +++ b/meta/classes/externalsrc.bbclass<br>
> @@ -4,7 +4,7 @@<br>
> # Copyright (C) 2009 Chris Larson <clarson@kergoth.com><br>
> # Released under the MIT license (see COPYING.MIT for the terms)<br>
> #<br>
> -# externalsrc.bbclass enables use of an existing source tree, usually<br>
> external to <br>
> +# externalsrc.bbclass enables use of an existing source tree,<br>
> usually external to <br>
> # the build system to build a piece of software rather<br>
> than the usual fetch/unpack/patch # process.<br>
> #<br>
> @@ -108,6 +108,8 @@ python () {<br>
> # We don't want the workdir to go away<br>
> d.appendVar('RM_WORK_EXCLUDE', ' ' + d.getVar('PN'))<br>
> <br>
> + bb.build.addtask('do_makeclean', 'do_clean', None, d)<br>
> +<br>
<br>
Shouldn't this be do_buildclean here?<br>
<br>
> # If B=S the same builddir is used even for different<br>
> architectures. # Thus, use a shared CONFIGURESTAMPFILE and STAMP directory<br>
> so that # change of do_configure task hash is correctly detected and stamps<br>
> are @@ -142,6 +144,17 @@ python externalsrc_compile_prefunc() {<br>
> bb.plain('NOTE: %s: compiling from external source tree %s' %<br>
> (d.getVar('PN'), d.getVar('EXTERNALSRC'))) }<br>
> <br>
> +do_buildclean[dirs] = "${S} ${B}"<br>
> +do_buildclean[nostamp] = "1"<br>
> +do_buildclean[doc] = "Call 'make clean' or equivalent in ${B}"<br>
> +externalsrc_do_buildclean() {<br>
> + if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then<br>
> + oe_runmake clean || die "make failed"<br>
> + else<br>
> + bbnote "nothing to compile - no makefile found"<br>
> + fi<br>
> +}<br>
> +<br>
> def srctree_hash_files(d):<br>
> import shutil<br>
> import subprocess<br>
> @@ -188,3 +201,5 @@ def srctree_configure_hash_files(d):<br>
> if f in search_files:<br>
> out_items.append('%s:True' % os.path.join(root, f))<br>
> return ' '.join(out_items)<br>
> +<br>
> +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>