Drop version.h
Some distributions use their own Makefile and thus won't create version.h, resulting in a build failure. Pass the version as define instead. That won't help for generating the driver version with those distributions, but at least the driver will build. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
version.h
|
|
||||||
10
Makefile
10
Makefile
@@ -44,17 +44,13 @@ all: modules
|
|||||||
|
|
||||||
# Targets for running make directly in the external module directory:
|
# Targets for running make directly in the external module directory:
|
||||||
|
|
||||||
DRIVER_VERSION = $(shell git describe --long)
|
EXTRA_CFLAGS=-DIT87_DRIVER_VERSION='\"$(shell git describe --long)\"'
|
||||||
|
|
||||||
version.h: it87.c
|
modules:
|
||||||
@echo "#define IT87_DRIVER_VERSION \"$(DRIVER_VERSION)\"" > version.h
|
@$(MAKE) EXTRA_CFLAGS=$(EXTRA_CFLAGS) -C $(KERNEL_BUILD) M=$(CURDIR) $@
|
||||||
|
|
||||||
modules: version.h
|
|
||||||
@$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) $@
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) $@
|
@$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) $@
|
||||||
rm -f version.h
|
|
||||||
|
|
||||||
install: modules_install
|
install: modules_install
|
||||||
|
|
||||||
|
|||||||
5
it87.c
5
it87.c
@@ -74,7 +74,10 @@
|
|||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "version.h"
|
|
||||||
|
#ifndef IT87_DRIVER_VERSION
|
||||||
|
#define IT87_DRIVER_VERSION "<not provided>"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DRVNAME "it87"
|
#define DRVNAME "it87"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user