summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authormartin f. krafft <madduck@debian.org>2010-05-28 14:12:41 +0200
committerNeilBrown <neilb@suse.de>2010-05-31 12:52:37 +1000
commit26f467a9548dcebe07d576deb6ceb02b947eaecc (patch)
treeb3ab159f6a3875b9af96733a61c30f641d961a2c /Makefile
parent5082750467726d7cad6059ee8a41713da23426d3 (diff)
downloadmdadm-26f467a9548dcebe07d576deb6ceb02b947eaecc.tar.gz
mdadm-26f467a9548dcebe07d576deb6ceb02b947eaecc.tar.xz
mdadm-26f467a9548dcebe07d576deb6ceb02b947eaecc.zip
Compile-time switch to enable 0.9 metadata as default
This commit introduces DEFAULT_OLD_METADATA as a preprocessor definition. If defined, it causes mdadm to assume metadata version 0.9 as default. If not defined, version 1.x (currently 1.2) is used as default. The man page mdadm.8 is also modified to reflect the chosen default. The selftests will not work if the old default is chosen. This patch was requested by Debian so they could distribute a current mdadm together with boot loaders that only understand 0.90 metadata for md-raid. Preferred usage is simply make DEFAULT_OLD_METADATA=yes Signed-off-by: martin f. krafft <madduck@debian.org> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2517f75..3af1665 100644
--- a/Makefile
+++ b/Makefile
@@ -48,9 +48,15 @@ CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O
endif
ifdef DEBIAN
-CPPFLAGS= -DDEBIAN
+CPPFLAGS := -DDEBIAN
else
-CPPFLAGS=
+CPPFLAGS :=
+endif
+ifdef DEFAULT_OLD_METADATA
+ CPPFLAG += -DDEFAULT_OLD_METADATA
+ DEFAULT_METADATA=0.90
+else
+ DEFAULT_METADATA=1.2
endif
SYSCONFDIR = /etc
@@ -180,6 +186,9 @@ mdassemble.klibc : $(ASSEMBLE_SRCS) mdadm.h
rm -f $(OBJS)
$(KLIBC_GCC) $(ASSEMBLE_FLAGS) -o mdassemble $(ASSEMBLE_SRCS)
+mdadm.8 : mdadm.8.in
+ sed -e 's/{DEFAULT_METADATA}/$(DEFAULT_METADATA)/g' mdadm.8.in > mdadm.8
+
mdadm.man : mdadm.8
nroff -man mdadm.8 > mdadm.man