build: add git version signature to svec.ko

We need to track the commit this binary comes from, as a general
policy
parent 14da9eaa
......@@ -10,9 +10,12 @@ LINUX ?= "/acc/sys/$(CPU)/usr/src/kernels/$(KVER)"
FMC_DRV ?= $(shell ../check-fmc-bus)
export FMC_DRV
GIT_VERSION = $(shell git describe --dirty --long --tags)
ccflags-y += -I$(FMC_DRV)/include
ccflags-y += -I/acc/dsc/src/drivers/coht/vmebridge/include
ccflags-y += -DDEBUG
ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
KBUILD_EXTRA_SYMBOLS += $(M)/Module.symvers.vme
KBUILD_EXTRA_SYMBOLS += $(M)/Module.symvers.fmc
......@@ -29,7 +32,10 @@ all: modules
.PHONY: all modules clean help install modules_install
modules help install modules_install:
$(MAKE) -C $(LINUX) M=$(shell pwd) CPU=$(CPU) KVER=$(KVER) $@
echo $(GIT_VERSION)
$(MAKE) -C $(LINUX) M=$(shell pwd) CPU=$(CPU) \
KVER=$(KVER) GIT_VERSION=$(GIT_VERSION) \
$@
# be able to run the "clean" rule even if $(LINUX) is not valid
clean:
......
......@@ -510,4 +510,5 @@ module_exit(svec_exit);
MODULE_AUTHOR("Juan David Gonzalez Cobas");
MODULE_LICENSE("GPL");
MODULE_VERSION(GIT_VERSION);
MODULE_DESCRIPTION("svec driver");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment