mirror of https://github.com/schoebel/mars
added BUILDTAG to module version
This commit is contained in:
parent
f3068dec34
commit
507193ac69
9
Makefile
9
Makefile
|
@ -46,3 +46,12 @@ obj-$(CONFIG_MARS_LIGHT) += sy_old/mars_light.o \
|
||||||
ifdef CONFIG_DEBUG_KERNEL
|
ifdef CONFIG_DEBUG_KERNEL
|
||||||
KBUILD_CFLAGS += -fno-inline-functions -fno-inline-small-functions -fno-inline-functions-called-once
|
KBUILD_CFLAGS += -fno-inline-functions -fno-inline-small-functions -fno-inline-functions-called-once
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
.PHONY FORCE: block/mars/buildtag.h
|
||||||
|
block/mars/buildtag.h:
|
||||||
|
set -e; exec > $@;\
|
||||||
|
cd block/mars;\
|
||||||
|
echo -e "/* Automatically generated -- DO NOT EDIT! */";\
|
||||||
|
echo -e "#define BUILDTAG \"$$(git log -1 --pretty='format:%H')\"";\
|
||||||
|
echo -e "#define BUILDHOST \"$$USER@$$HOSTNAME\"";\
|
||||||
|
echo -e "#define BUILDDATE \"$$(date '+%F %T')\""
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
|
|
||||||
#include "strategy.h"
|
#include "strategy.h"
|
||||||
|
#include "../buildtag.h"
|
||||||
|
|
||||||
#include <linux/kthread.h>
|
#include <linux/kthread.h>
|
||||||
#include <linux/wait.h>
|
#include <linux/wait.h>
|
||||||
|
@ -3097,6 +3098,7 @@ const void *dummy2 = &server_brick_type;
|
||||||
|
|
||||||
MODULE_DESCRIPTION("MARS Light");
|
MODULE_DESCRIPTION("MARS Light");
|
||||||
MODULE_AUTHOR("Thomas Schoebel-Theuer <tst@1und1.de>");
|
MODULE_AUTHOR("Thomas Schoebel-Theuer <tst@1und1.de>");
|
||||||
|
MODULE_VERSION(BUILDTAG " (" BUILDHOST BUILDDATE ")");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
module_init(init_light);
|
module_init(init_light);
|
||||||
|
|
Loading…
Reference in New Issue