|
|
790dca |
From 03ab9763f51ddf2030f60f83e76cf9c1b50b726c Mon Sep 17 00:00:00 2001
|
|
|
790dca |
From: Tkaczyk Mariusz <mariusz.tkaczyk@intel.com>
|
|
|
790dca |
Date: Fri, 15 May 2020 11:23:14 +0200
|
|
|
790dca |
Subject: [PATCH 078/108] Makefile: add EXTRAVERSION support
|
|
|
790dca |
|
|
|
790dca |
Add optional EXTRAVERSION parameter to Makefile and allow to mark version
|
|
|
790dca |
by user friendly label. It might be useful when creating custom
|
|
|
790dca |
spins of mdadm, or labeling some instance in between major releases.
|
|
|
790dca |
|
|
|
790dca |
Signed-off-by: Tkaczyk Mariusz <mariusz.tkaczyk@intel.com>
|
|
|
790dca |
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
|
|
790dca |
---
|
|
|
790dca |
Makefile | 3 ++-
|
|
|
790dca |
ReadMe.c | 5 ++++-
|
|
|
790dca |
2 files changed, 6 insertions(+), 2 deletions(-)
|
|
|
790dca |
|
|
|
790dca |
diff --git a/Makefile b/Makefile
|
|
|
790dca |
index a33319a..0a20b75 100644
|
|
|
790dca |
--- a/Makefile
|
|
|
790dca |
+++ b/Makefile
|
|
|
790dca |
@@ -105,7 +105,8 @@ VERSION = $(shell [ -d .git ] && git describe HEAD | sed 's/mdadm-//')
|
|
|
790dca |
VERS_DATE = $(shell [ -d .git ] && date --iso-8601 --date="`git log -n1 --format=format:%cd --date=iso --date=short`")
|
|
|
790dca |
DVERS = $(if $(VERSION),-DVERSION=\"$(VERSION)\",)
|
|
|
790dca |
DDATE = $(if $(VERS_DATE),-DVERS_DATE="\"$(VERS_DATE)\"",)
|
|
|
790dca |
-CFLAGS += $(DVERS) $(DDATE)
|
|
|
790dca |
+DEXTRAVERSION = $(if $(EXTRAVERSION),-DEXTRAVERSION="\" - $(EXTRAVERSION)\"",)
|
|
|
790dca |
+CFLAGS += $(DVERS) $(DDATE) $(DEXTRAVERSION)
|
|
|
790dca |
|
|
|
790dca |
# The glibc TLS ABI requires applications that call clone(2) to set up
|
|
|
790dca |
# TLS data structures, use pthreads until mdmon implements this support
|
|
|
790dca |
diff --git a/ReadMe.c b/ReadMe.c
|
|
|
790dca |
index eaf1042..06b8f7e 100644
|
|
|
790dca |
--- a/ReadMe.c
|
|
|
790dca |
+++ b/ReadMe.c
|
|
|
790dca |
@@ -33,7 +33,10 @@
|
|
|
790dca |
#ifndef VERS_DATE
|
|
|
790dca |
#define VERS_DATE "2018-10-01"
|
|
|
790dca |
#endif
|
|
|
790dca |
-char Version[] = "mdadm - v" VERSION " - " VERS_DATE "\n";
|
|
|
790dca |
+#ifndef EXTRAVERSION
|
|
|
790dca |
+#define EXTRAVERSION ""
|
|
|
790dca |
+#endif
|
|
|
790dca |
+char Version[] = "mdadm - v" VERSION " - " VERS_DATE EXTRAVERSION "\n";
|
|
|
790dca |
|
|
|
790dca |
/*
|
|
|
790dca |
* File: ReadMe.c
|
|
|
790dca |
--
|
|
|
790dca |
2.7.5
|
|
|
790dca |
|