Table 10-1 shows targets that print the kernel version, based on a number of different options. They are commonly used by scripts to determine the version of the kernel being built.
Table 10-1. Informational targets
Target
Description
kernelrelease
Displays the current kernel version, as determined by the build system.
kernelversion
Displays the current kernel version, as told by the main Makefile. This differs from the kernelrelease target in that it doesn't use any additional version information based on configuration options or localversion files.