M is not an option for make. Note it lacks the hyphen. M is a variable assigned to the execution of make. If make executes a Makefile script, this script can read the variable M and use its contents.
In the example you provide, make will read Makefile in ~/kernel-2.6 and assign your present working directory to variable M. Typically, this will allow for make to return to your current directory after processing Makefile.