Makefile: Generate version.h

Update version after each change in it87.c.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
Guenter Roeck
2017-09-24 04:13:05 -07:00
parent 59ea85eb83
commit e7caee4aaf

View File

@@ -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