From: Guenter Roeck Date: Sun, 24 Sep 2017 11:13:05 +0000 (-0700) Subject: Makefile: Generate version.h X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e7caee4aaf12aff79a2cd119b47464016cd765ba;p=groeck-it87 Makefile: Generate version.h Update version after each change in it87.c. Signed-off-by: Guenter Roeck --- diff --git a/Makefile b/Makefile index 8481a0a..2064147 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,12 @@ all: modules # Targets for running make directly in the external module directory: -modules clean: +DRIVER_VERSION = $(shell git describe --long) + +version.h: it87.c + @echo "#define IT87_DRIVER_VERSION \"$(DRIVER_VERSION)\"" > version.h + +modules clean: version.h @$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) $@ install: modules_install