Wednesday, October 7, 2015

Listing 'make targets' related to Linux Kernel

The README file in the root of linux kernel source tree lists and explains only most commonly used 'make targets' supported by the kernel Makefile, but does not list them all.

So after playing a little with grep I concluded following would be useful for listing all possible 'make targets' (ignoring some false positives) in the Linux kernel Makefile.

grep  ^.*: Makefile | grep -v = | grep  -v ^#
Snipped output:
help:
prepare: ;
scripts: ;
clean: $(clean-dirs)
tags TAGS cscope gtags: FORCE
includecheck:
versioncheck:
coccicheck:
namespacecheck:
export_report:
checkstack:
kernelrelease:
kernelversion:
image_name:
Note: I have a feeling that better solution(s) than this exists to list the same, so please leave in comments.

No comments:

Post a Comment