1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-10 04:00:28 +00:00

ccache.bbclass: Add task do_cleanccache

(From OE-Core rev: 36cead66fbadd8c3827aec4b67ea124ee3c2ff94)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Robert Yang
2018-12-13 17:33:13 +08:00
committed by Richard Purdie
parent e1cad77fa7
commit 7953d6a8bc
+14
View File
@@ -48,3 +48,17 @@ python() {
d.appendVar('DEPENDS', ' ccache-native')
d.setVar('CCACHE', 'ccache ')
}
addtask cleanccache after do_clean
python do_cleanccache() {
import shutil
ccache_dir = d.getVar('CCACHE_DIR')
if os.path.exists(ccache_dir):
bb.note("Removing %s" % ccache_dir)
shutil.rmtree(ccache_dir)
else:
bb.note("%s doesn't exist" % ccache_dir)
}
addtask cleanall after do_cleanccache
do_cleanccache[nostamp] = "1"