diff options
Diffstat (limited to 'meta/classes/ccache.bbclass')
-rw-r--r-- | meta/classes/ccache.bbclass | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass index f3612c5019..fb3fbdf25c 100644 --- a/meta/classes/ccache.bbclass +++ b/meta/classes/ccache.bbclass | |||
@@ -48,3 +48,17 @@ python() { | |||
48 | d.appendVar('DEPENDS', ' ccache-native') | 48 | d.appendVar('DEPENDS', ' ccache-native') |
49 | d.setVar('CCACHE', 'ccache ') | 49 | d.setVar('CCACHE', 'ccache ') |
50 | } | 50 | } |
51 | |||
52 | addtask cleanccache after do_clean | ||
53 | python do_cleanccache() { | ||
54 | import shutil | ||
55 | |||
56 | ccache_dir = d.getVar('CCACHE_DIR') | ||
57 | if os.path.exists(ccache_dir): | ||
58 | bb.note("Removing %s" % ccache_dir) | ||
59 | shutil.rmtree(ccache_dir) | ||
60 | else: | ||
61 | bb.note("%s doesn't exist" % ccache_dir) | ||
62 | } | ||
63 | addtask cleanall after do_cleanccache | ||
64 | do_cleanccache[nostamp] = "1" | ||