qmake2: Define env var for strip. Convert to use INC_PR.
[openembedded.git] / classes / rm_work.bbclass
blobe6f3aa012e0a9997a2873fe02172f8dc44b7f1c9
2 # Removes source after build
4 # To use it add that line to conf/local.conf:
6 # INHERIT += "rm_work"
9 # Use the completion scheulder by default when rm_work is active
10 # to try and reduce disk usage
11 BB_SCHEDULER ?= "completion"
13 RMWORK_ORIG_TASK := "${BB_DEFAULT_TASK}"
14 BB_DEFAULT_TASK = "rm_work_all"
16 do_rm_work () {
17     cd ${WORKDIR}
18     for dir in *
19     do
20         if [ `basename ${dir}` = "temp" ]; then
21             echo "Not removing temp"
22         else 
23             echo "Removing $dir" ; rm -rf $dir
24         fi
25     done
27 addtask rm_work after do_${RMWORK_ORIG_TASK}
29 do_rm_work_all () {
30         :
32 do_rm_work_all[recrdeptask] = "do_rm_work"
33 addtask rm_work_all after do_rm_work
36 addhandler rmwork_stampfixing_eventhandler
37 python rmwork_stampfixing_eventhandler() {
38     if bb.event.getName(e) == "StampUpdate":
39         for (fn, task) in e.targets:
40             if task == 'rm_work_all':
41                 continue
42             stamp = "%s.do_rm_work" % e.stampPrefix[fn]
43             if os.path.exists(stamp):
44                 dir = "%s.*" % e.stampPrefix[fn]
45                 bb.note("Removing stamps: " + dir)
46                 os.system('rm -f '+ dir)