From b3967765c082c4fae1954ec70474fb428ef42c70 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Sun, 20 Apr 2008 20:47:38 +0300 Subject: linux-core Makefile: add GIT_REVISION This tries to automatically fetch a git revision string and if succeeds, it #defines GIT_REVISION string macro. Packagers can override it by 'make GIT_REVISION=foo'. Update Nouveau to use GIT_REVISION, if defined, instead of DRIVER_DATE in struct drm_driver. Signed-off-by: Pekka Paalanen --- linux-core/Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'linux-core/Makefile') diff --git a/linux-core/Makefile b/linux-core/Makefile index 7f6b123e..3af6f370 100644 --- a/linux-core/Makefile +++ b/linux-core/Makefile @@ -335,6 +335,11 @@ ifneq (,$(findstring i915,$(DRM_MODULES))) CONFIG_DRM_I915 := m endif +GIT_REVISION := $(shell cd "$(DRMSRCDIR)" && git-describe --abbrev=17) +ifneq ($(GIT_REVISION),) +EXTRA_CFLAGS+=-D"GIT_REVISION=\"$(GIT_REVISION)\"" +endif + include $(DRMSRCDIR)/Makefile.kernel # Depencencies -- cgit v1.2.3