device-mapper-multipath/0008-multipath-tools-Makefiles-separate-rules-for-.so-and.patch
DistroBaker 28d3ae407e Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/device-mapper-multipath.git#26a2cd7a3e189bf91263d17bc8a8c449cc043fb0
2021-01-21 16:56:27 +00:00

97 lines
2.8 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Tue, 22 Sep 2020 12:52:49 +0200
Subject: [PATCH] multipath-tools Makefiles: separate rules for .so and man
pages
Rely more on "make" functionality than on sequential command execution.
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmpathcmd/Makefile | 8 +++++---
libmpathpersist/Makefile | 10 +++++++---
libmultipath/Makefile | 8 +++++---
3 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/libmpathcmd/Makefile b/libmpathcmd/Makefile
index 0f6b8166..08ccb811 100644
--- a/libmpathcmd/Makefile
+++ b/libmpathcmd/Makefile
@@ -8,13 +8,15 @@ CFLAGS += $(LIB_CFLAGS)
OBJS = mpath_cmd.o
-all: $(LIBS)
+all: $(DEVLIB)
$(LIBS): $(OBJS)
$(CC) $(LDFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ -o $@ $(OBJS) $(LIBDEPS)
- $(LN) $@ $(DEVLIB)
-install: $(LIBS)
+$(DEVLIB): $(LIBS)
+ $(LN) $(LIBS) $@
+
+install: all
$(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir)
$(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(syslibdir)/$(LIBS)
$(LN) $(LIBS) $(DESTDIR)$(syslibdir)/$(DEVLIB)
diff --git a/libmpathpersist/Makefile b/libmpathpersist/Makefile
index 21fdad80..9e869fdc 100644
--- a/libmpathpersist/Makefile
+++ b/libmpathpersist/Makefile
@@ -11,15 +11,19 @@ LIBDEPS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath \
OBJS = mpath_persist.o mpath_updatepr.o mpath_pr_ioctl.o
-all: $(LIBS)
+all: $(DEVLIB) man
$(LIBS): $(OBJS)
$(CC) $(LDFLAGS) $(SHARED_FLAGS) $(LIBDEPS) -Wl,-soname=$@ -o $@ $(OBJS)
- $(LN) $(LIBS) $(DEVLIB)
+
+$(DEVLIB): $(LIBS)
+ $(LN) $(LIBS) $@
+
+man:
$(GZIP) mpath_persistent_reserve_in.3 > mpath_persistent_reserve_in.3.gz
$(GZIP) mpath_persistent_reserve_out.3 > mpath_persistent_reserve_out.3.gz
-install: $(LIBS)
+install: all
$(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir)
$(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(syslibdir)/$(LIBS)
$(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(syslibdir)
diff --git a/libmultipath/Makefile b/libmultipath/Makefile
index 62ba16e8..40028556 100644
--- a/libmultipath/Makefile
+++ b/libmultipath/Makefile
@@ -54,7 +54,7 @@ OBJS = memory.o parser.o vector.o devmapper.o callout.o \
io_err_stat.o dm-generic.o generic.o foreign.o nvme-lib.o \
libsg.o valid.o
-all: $(LIBS)
+all: $(DEVLIB)
nvme-lib.o: nvme-lib.c nvme-ioctl.c nvme-ioctl.h
$(CC) $(CFLAGS) -Wno-unused-function -c -o $@ $<
@@ -74,9 +74,11 @@ nvme-ioctl.h: nvme/nvme-ioctl.h
$(LIBS): $(OBJS)
$(CC) $(LDFLAGS) $(SHARED_FLAGS) -Wl,-soname=$@ -o $@ $(OBJS) $(LIBDEPS)
- $(LN) $@ $(DEVLIB)
-install:
+$(DEVLIB): $(LIBS)
+ $(LN) $(LIBS) $@
+
+install: all
$(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir)
$(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(syslibdir)/$(LIBS)
$(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(libdir)
--
2.17.2