blob: e817b899a6bc6bbc73a8f7cf7b528c56d93e3cac [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001addtask listtasks
2do_listtasks[nostamp] = "1"
3python do_listtasks() {
4 taskdescs = {}
5 maxlen = 0
6 for e in d.keys():
7 if d.getVarFlag(e, 'task'):
8 maxlen = max(maxlen, len(e))
9 if e.endswith('_setscene'):
10 desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc') or '')
11 else:
12 desc = d.getVarFlag(e, 'doc') or ''
13 taskdescs[e] = desc
14
15 tasks = sorted(taskdescs.keys())
16 for taskname in tasks:
17 bb.plain("%s %s" % (taskname.ljust(maxlen), taskdescs[taskname]))
18}
19
20CLEANFUNCS ?= ""
21
22T_task-clean = "${LOG_DIR}/cleanlogs/${PN}"
23addtask clean
24do_clean[nostamp] = "1"
25python do_clean() {
26 """clear the build and temp directories"""
27 dir = d.expand("${WORKDIR}")
28 bb.note("Removing " + dir)
29 oe.path.remove(dir)
30
31 dir = "%s.*" % bb.data.expand(d.getVar('STAMP', False), d)
32 bb.note("Removing " + dir)
33 oe.path.remove(dir)
34
35 for f in (d.getVar('CLEANFUNCS', True) or '').split():
36 bb.build.exec_func(f, d)
37}
38
39addtask checkuri
40do_checkuri[nostamp] = "1"
41python do_checkuri() {
42 src_uri = (d.getVar('SRC_URI', True) or "").split()
43 if len(src_uri) == 0:
44 return
45
46 localdata = bb.data.createCopy(d)
47 bb.data.update_data(localdata)
48
49 try:
50 fetcher = bb.fetch2.Fetch(src_uri, localdata)
51 fetcher.checkstatus()
52 except bb.fetch2.BBFetchException, e:
53 raise bb.build.FuncFailed(e)
54}
55
56addtask checkuriall after do_checkuri
57do_checkuriall[recrdeptask] = "do_checkuriall do_checkuri"
58do_checkuriall[recideptask] = "do_${BB_DEFAULT_TASK}"
59do_checkuriall[nostamp] = "1"
60do_checkuriall() {
61 :
62}
63
64addtask fetchall after do_fetch
65do_fetchall[recrdeptask] = "do_fetchall do_fetch"
66do_fetchall[recideptask] = "do_${BB_DEFAULT_TASK}"
67do_fetchall() {
68 :
69}