summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2012-09-18 12:07:04 +0530
committerTushar Behera <tushar.behera@linaro.org>2013-01-22 10:13:12 +0530
commit5d3510231f50273d45d76d4ef9ac7bee8302ca16 (patch)
tree95d7c808f06eaf65362a4323ebf96bd6c8b79cc2 /Makefile
parent246e57e7aa7c844e5a292ad3d57642570482d589 (diff)
downloadlinux-topics-5d3510231f50273d45d76d4ef9ac7bee8302ca16.tar.gz
kbuild: Add support to extract information about current git commit HEAD
Many cases it is difficult to get to the exact commit at which the current kernel is compiled. Adding an additional print statement to explicitly tell the current HEAD. Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 253a455d8d8..34260008319 100644
--- a/Makefile
+++ b/Makefile
@@ -795,7 +795,6 @@ include/config/kernel.release: include/config/auto.conf FORCE
$(Q)rm -f $@
$(Q)echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" > $@
-
# Things we need to do before we recursively start building the kernel
# or the modules are listed in "prepare".
# A multi level approach is used. prepareN is processed before prepareN-1.
@@ -845,7 +844,9 @@ define filechk_utsrelease.h
echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
exit 1; \
fi; \
- (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";)
+ (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; \
+ echo \#define KERNEL_GIT_ID \"$(shell \
+ git rev-parse --verify --short HEAD 2>/dev/null)\";)
endef
define filechk_version.h