Re: HELP: Count Lines of Code in Custom Compiled Kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/10/2018 12:30 AM, Faisal Mehmood wrote:
> So I compiled a custom minimal Linux Kernel. I want to list all the
> source files used for this particular .config file. I also want to
> count the lines of code against that .config file compilation.

Hi,

We have a tradition of not doing people's homework for them.  :)

> I tried using 'make  > logfile', but that only lists the generated
> object files. Source files are not listed.

Did you try other build options?

E.g., using "make V=1 ... " will give you verbose output.  It might give
you a list of source files that are compiled.  OTOH, it's probably too verbose.

Or did you look at "make C=1 ..." to invoke the "CHECK" tool on each source
file that is built?

That should be enough of a hint to get you going...

> 'find . -type f -name *.[ch]' includes all the source files, while I
> only need those that are being used by my .config file.


BTW, it would be helpful if one could override "CHECKFLAGS" on the
'make' command line.
As is, CHECKFLAGS is (too) sparse-specific.

-- 
~Randy



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux