c5432960d9
Update to the head of the upstream staging branch * Previous patches 0001-0042 are included in the source tarball * Patches 0001-0032 are from the upstream staging branch Rename redhat patches * Previous patches 0043-0053 are now patches 0033-0043 Change back to using readline instead of libedit * The code the uses readline has been isolated from the code that is licensed gpl v2 only. Add libmpathutil libraries to spec file Add multipathc program to spec file Add multipath.conf systemd tempfile configuration to spec file Misc spec file cleanups
137 lines
3.9 KiB
Diff
137 lines
3.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martin Wilck <mwilck@suse.com>
|
|
Date: Thu, 27 Oct 2022 21:59:36 +0200
|
|
Subject: [PATCH] multipath-tools Makefiles: clean up executable Makefiles
|
|
|
|
Move the EXEC definition to the top, and use simple make variables
|
|
where possible.
|
|
|
|
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
kpartx/Makefile | 15 +++++++--------
|
|
multipath/Makefile | 6 +++---
|
|
multipathd/Makefile | 30 ++++++++++++++----------------
|
|
3 files changed, 24 insertions(+), 27 deletions(-)
|
|
|
|
diff --git a/kpartx/Makefile b/kpartx/Makefile
|
|
index 464925ad..7ceae96b 100644
|
|
--- a/kpartx/Makefile
|
|
+++ b/kpartx/Makefile
|
|
@@ -3,20 +3,19 @@
|
|
#
|
|
include ../Makefile.inc
|
|
|
|
-CPPFLAGS += -I. -I$(multipathdir) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
|
-CFLAGS += $(BIN_CFLAGS)
|
|
-LDFLAGS += $(BIN_LDFLAGS)
|
|
-
|
|
-LIBDEPS += -ldevmapper
|
|
+EXEC := kpartx
|
|
|
|
+CPPFLAGS += -I. -I$(multipathdir) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
|
ifneq ($(call check_func,dm_task_set_cookie,$(devmapper_incdir)/libdevmapper.h),0)
|
|
CPPFLAGS += -DLIBDM_API_COOKIE
|
|
endif
|
|
|
|
-OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \
|
|
- gpt.o mac.o ps3.o crc32.o lopart.o xstrncpy.o devmapper.o
|
|
+CFLAGS += $(BIN_CFLAGS)
|
|
+LDFLAGS += $(BIN_LDFLAGS)
|
|
+LIBDEPS += -ldevmapper
|
|
|
|
-EXEC = kpartx
|
|
+OBJS := bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \
|
|
+ gpt.o mac.o ps3.o crc32.o lopart.o xstrncpy.o devmapper.o
|
|
|
|
all: $(EXEC)
|
|
|
|
diff --git a/multipath/Makefile b/multipath/Makefile
|
|
index 1c4e7a52..7f7b341d 100644
|
|
--- a/multipath/Makefile
|
|
+++ b/multipath/Makefile
|
|
@@ -3,15 +3,15 @@
|
|
#
|
|
include ../Makefile.inc
|
|
|
|
+EXEC := multipath
|
|
+
|
|
CPPFLAGS += -I$(multipathdir) -I$(mpathutildir) -I$(mpathcmddir)
|
|
CFLAGS += $(BIN_CFLAGS)
|
|
LDFLAGS += $(BIN_LDFLAGS)
|
|
LIBDEPS += -L$(multipathdir) -lmultipath -L$(mpathutildir) -lmpathutil \
|
|
-L$(mpathcmddir) -lmpathcmd -lpthread -ldevmapper -ldl -ludev
|
|
|
|
-EXEC = multipath
|
|
-
|
|
-OBJS = main.o
|
|
+OBJS := main.o
|
|
|
|
all: $(EXEC) multipath.rules tmpfiles.conf
|
|
|
|
diff --git a/multipathd/Makefile b/multipathd/Makefile
|
|
index 7221b6af..bb8f7770 100644
|
|
--- a/multipathd/Makefile
|
|
+++ b/multipathd/Makefile
|
|
@@ -1,27 +1,30 @@
|
|
include ../Makefile.inc
|
|
|
|
+EXEC := multipathd
|
|
+CLI := multipathc
|
|
+
|
|
+CPPFLAGS += -I$(multipathdir) -I$(mpathutildir) -I$(mpathpersistdir) -I$(mpathcmddir) -I$(thirdpartydir) \
|
|
+ $(shell $(PKGCONFIG) --modversion liburcu 2>/dev/null | \
|
|
+ awk -F. '{ printf("-DURCU_VERSION=0x%06x", 256 * ( 256 * $$1 + $$2) + $$3); }') \
|
|
+ -DBINDIR='"$(bindir)"' $(SYSTEMD_CPPFLAGS)
|
|
+
|
|
+ifeq ($(ENABLE_DMEVENTS_POLL),0)
|
|
+ CPPFLAGS += -DNO_DMEVENTS_POLL
|
|
+endif
|
|
ifneq ($(call check_func,dm_task_get_errno,$(devmapper_incdir)/libdevmapper.h),0)
|
|
CPPFLAGS += -DLIBDM_API_GET_ERRNO
|
|
endif
|
|
-
|
|
ifneq ($(call check_var,ELS_DTAG_LNK_INTEGRITY,$(kernel_incdir)/scsi/fc/fc_els.h),0)
|
|
CPPFLAGS += -DFPIN_EVENT_HANDLER
|
|
FPIN_SUPPORT = 1
|
|
endif
|
|
+
|
|
#
|
|
# debugging stuff
|
|
#
|
|
#CPPFLAGS += -DLCKDBG
|
|
-#CPPFLAGS += -D_DEBUG_
|
|
#CPPFLAGS += -DLOGDBG
|
|
|
|
-CPPFLAGS += -I$(multipathdir) -I$(mpathutildir) -I$(mpathpersistdir) -I$(mpathcmddir) -I$(thirdpartydir) \
|
|
- $(shell $(PKGCONFIG) --modversion liburcu 2>/dev/null | \
|
|
- awk -F. '{ printf("-DURCU_VERSION=0x%06x", 256 * ( 256 * $$1 + $$2) + $$3); }') \
|
|
- -DBINDIR='"$(bindir)"' $(SYSTEMD_CPPFLAGS)
|
|
-ifeq ($(ENABLE_DMEVENTS_POLL),0)
|
|
- CPPFLAGS += -DNO_DMEVENTS_POLL
|
|
-endif
|
|
CFLAGS += $(BIN_CFLAGS)
|
|
LDFLAGS += $(BIN_LDFLAGS)
|
|
|
|
@@ -43,18 +46,13 @@ RL_CPPFLAGS := -DUSE_LIBREADLINE
|
|
RL_LIBDEPS := -lreadline
|
|
endif
|
|
|
|
-OBJS = main.o pidfile.o uxlsnr.o uxclnt.o cli.o cli_handlers.o waiter.o \
|
|
+CLI_OBJS := multipathc.o cli.o
|
|
+OBJS := main.o pidfile.o uxlsnr.o uxclnt.o cli.o cli_handlers.o waiter.o \
|
|
dmevents.o init_unwinder.o
|
|
-
|
|
-CLI_OBJS = multipathc.o cli.o
|
|
-
|
|
ifeq ($(FPIN_SUPPORT),1)
|
|
OBJS += fpin_handlers.o
|
|
endif
|
|
|
|
-EXEC = multipathd
|
|
-CLI = multipathc
|
|
-
|
|
all : $(EXEC) $(CLI)
|
|
|
|
$(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so
|