xen: add cloc target
authorStefano Stabellini <sstabellini@kernel.org>
Tue, 31 Jul 2018 15:23:01 +0000 (08:23 -0700)
committerJulien Grall <julien.grall@arm.com>
Thu, 2 Aug 2018 11:27:30 +0000 (12:27 +0100)
commite78a27db4b8a35168116249ac5e1eabf4ef6c28d
tree37681ad3d38e1679dafb451a7d6e0e9686d3c230
parenta2ae81893ab7d5231052d96b84f70b5deb54a8ec
xen: add cloc target

Add a Xen build target to count the lines of code of the source files
built. Uses `cloc' to do the job.

With Xen on ARM taking off in embedded, IoT, and automotive, we are
seeing more and more uses of Xen in constrained environments. Users and
system integrators want the smallest Xen and Dom0 configurations. Some
of these deployments require certifications, where you definitely want
the smallest lines of code count. I provided this patch to give us the
lines of code count for that purpose.

Use the .o.d files to account for all the built source files. Generate a
list for the `cloc' utility and invoke `cloc'.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
CC: jbeulich@suse.com
CC: andrew.cooper3@citrix.com
---
Changes in v4:
- use grep regex to get multiple source files from .d files

Changes in v3:
- remove build as dependecy for the cloc target

Changes in v2:
- change implementation to use .o.d to find built source files
xen/Makefile