2 # Removes source after build
4 # To use it add that line to conf/local.conf:
9 RMWORK_ORIG_TASK := "${BB_DEFAULT_TASK}"
10 BB_DEFAULT_TASK = "rm_work_all"
16 if [ `basename ${S}` = $dir ]; then
21 addtask rm_work after do_${RMWORK_ORIG_TASK}
26 do_rm_work_all[recrdeptask] = "do_rm_work"
27 addtask rm_work_all after do_rm_work
30 addhandler rmwork_stampfixing_eventhandler
31 python rmwork_stampfixing_eventhandler() {
32 from bb.event import getName
35 if getName(e) == "StampUpdate":
36 for (fn, task) in e.targets:
37 if task == 'rm_work_all':
39 stamp = "%s.do_rm_work" % e.stampPrefix[fn]
40 if os.path.exists(stamp):
41 dir = "%s.*" % e.stampPrefix[fn]
42 bb.note("Removing stamps: " + dir)
43 os.system('rm -f '+ dir)