blob: 587bfd4ab5b81a11479950ca9891a917abf205c0 [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():
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007 if d.getVarFlag(e, 'task'):
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008 maxlen = max(maxlen, len(e))
9 if e.endswith('_setscene'):
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010 desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc') or '')
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011 else:
Brad Bishop6e60e8b2018-02-01 10:27:11 -050012 desc = d.getVarFlag(e, 'doc') or ''
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013 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
Brad Bishop6e60e8b2018-02-01 10:27:11 -050031 dir = "%s.*" % d.getVar('STAMP')
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032 bb.note("Removing " + dir)
33 oe.path.remove(dir)
34
Brad Bishop6e60e8b2018-02-01 10:27:11 -050035 for f in (d.getVar('CLEANFUNCS') or '').split():
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036 bb.build.exec_func(f, d)
37}
38
39addtask checkuri
40do_checkuri[nostamp] = "1"
41python do_checkuri() {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050042 src_uri = (d.getVar('SRC_URI') or "").split()
Patrick Williamsc124f4f2015-09-15 14:41:29 -050043 if len(src_uri) == 0:
44 return
45
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046 try:
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050047 fetcher = bb.fetch2.Fetch(src_uri, d)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048 fetcher.checkstatus()
Patrick Williamsc0f7c042017-02-23 20:41:17 -060049 except bb.fetch2.BBFetchException as e:
50 bb.fatal(str(e))
Patrick Williamsc124f4f2015-09-15 14:41:29 -050051}
52
53addtask checkuriall after do_checkuri
54do_checkuriall[recrdeptask] = "do_checkuriall do_checkuri"
55do_checkuriall[recideptask] = "do_${BB_DEFAULT_TASK}"
56do_checkuriall[nostamp] = "1"
57do_checkuriall() {
58 :
59}
60
61addtask fetchall after do_fetch
62do_fetchall[recrdeptask] = "do_fetchall do_fetch"
63do_fetchall[recideptask] = "do_${BB_DEFAULT_TASK}"
64do_fetchall() {
65 :
66}