Add (and use) git describe to get module version.
This commit is contained in:
parent
1b50ad2d74
commit
4db826209e
@ -5,11 +5,11 @@ else
|
|||||||
KDIR ?= /lib/modules/$(shell uname -r)/build
|
KDIR ?= /lib/modules/$(shell uname -r)/build
|
||||||
PWD := $(shell pwd)
|
PWD := $(shell pwd)
|
||||||
ROOTFS ?=
|
ROOTFS ?=
|
||||||
|
GIT_DESCRIBE = $(shell git describe --dirty --tags)
|
||||||
KERNEL_VER ?= 2.6.32.7
|
KERNEL_VER ?= 2.6.32.7
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) EXTRA_CFLAGS=-I$(PWD)/../include modules
|
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) EXTRA_CFLAGS="-I$(PWD)/../include -DGIT_DESCRIBE='\"${GIT_DESCRIBE}\"'" V=1 modules
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -d -m 0755 $(ROOTFS)/lib/modules/$(KERNEL_VER)/kernel/drivers/misc
|
install -d -m 0755 $(ROOTFS)/lib/modules/$(KERNEL_VER)/kernel/drivers/misc
|
||||||
|
|||||||
@ -90,6 +90,9 @@
|
|||||||
|
|
||||||
#define STATIC
|
#define STATIC
|
||||||
|
|
||||||
|
#ifndef GIT_DESCRIBE
|
||||||
|
#define GIT_DESCRIBE "unknownversion-dirty"
|
||||||
|
#endif
|
||||||
/* Define this if you want to emit debug messages (adds ~8K) */
|
/* Define this if you want to emit debug messages (adds ~8K) */
|
||||||
//#define CONFIG_FUSD_DEBUG
|
//#define CONFIG_FUSD_DEBUG
|
||||||
|
|
||||||
@ -284,7 +287,8 @@ DEFINE_SEMAPHORE (fusd_devlist_sem);
|
|||||||
|
|
||||||
//#ifdef MODULE_LICENSE
|
//#ifdef MODULE_LICENSE
|
||||||
MODULE_AUTHOR ("Jeremy Elson <jelson@acm.org> (c)2001");
|
MODULE_AUTHOR ("Jeremy Elson <jelson@acm.org> (c)2001");
|
||||||
MODULE_AUTHOR ("Manoel Trapier <godzil@godzil.net> (c)2009-2012");
|
MODULE_AUTHOR ("Manoel Trapier <godzil@godzil.net> (c)2009-2018");
|
||||||
|
MODULE_VERSION(GIT_DESCRIBE);
|
||||||
MODULE_LICENSE ("GPL");
|
MODULE_LICENSE ("GPL");
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user