aboutsummaryrefslogtreecommitdiffstats
path: root/classes/rm_work.bbclass
blob: e3c92b8572fa89e4f9a8f521b7a59d3840c0eb27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# Removes source after build
#
# To use it add that line to conf/local.conf:
#
# INHERIT += "rm_work"
#

do_rm_work () {
    cd ${WORKDIR}
    for dir in *
    do
        if [ `basename ${S}` = $dir ]; then
            rm -rf $dir/*
        elif [ $dir != 'temp' ]; then
            rm -rf $dir
        fi
    done
}

addtask rmall after do_rm_work
do_rmall[recrdeptask] = "do_rm_work"
do_rmall() {
        :
}


addtask rm_work before do_build
addtask rm_work after do_populate_staging