1 # (C) 2017 Jan-Simon Möller <dl9pf@gmx.de>
6 # cloc --sum-reports `find . -name "*clocreport" | grep -v "\-native" ` --out summary.report
8 CLOC_DIRECTORY ??= "${DEPLOY_DIR}/cloc/"
9 CLOCSTATEDIR = "${WORKDIR}/cloc-destdir/"
15 source_dir = d.getVar('S', True)
16 pn = d.getVar('PN', True)
18 destdir = d.expand('${CLOCSTATEDIR}')
19 bb.utils.mkdirhier(destdir)
21 cloc_cmd = 'cloc %s -q --out=%s/%s.clocreport' % (source_dir, destdir, pn )
22 subprocess.call(cloc_cmd, shell=True)
27 addtask cloc before do_configure after do_unpack
29 EXPORT_FUNCTIONS do_cloc