The KBUILD_CONFIG_NO_CHECK_DIRTY environment variable controls thegit "-dirty" check. If this variable is either empty or undefined,then a "-dirty" check is performed (the default), otherwise, thischeck is omitted.

o Fixed to work correctly with the "O=" Makefile argument and the KBUILD_OUTPUT environment variable, so that .config files created in directories outside of the source tree are tagged correctly.

o Uses scripts/setlocalversion, which handles not only git, but also mercurial and svn.

o Make the new behavior default-off, as scripts/setlocalversion has significant latency. A new environment variable named "KBUILD_CONFIG_LOCALVERSION" must be set to enable the "-01836-g90a6501-dirty" style of string.

This is intended to address James Cloos's concern that this feature will slow down casual kernel builds.

It has been suggested that this string be output at boot and oops time.If there is general agreement, this will be the subject of a separatepatch.