multipath-tools: replace LDFLAGS with LIBDEPS for groups of libraries in Makefiles
PATCH 1/1 multipath-tools: replace LDFLAGS with LIBDEPS for groups of libraries in Makefiles
--- kpartx/Makefile | 4 ++-- mpathpersist/Makefile | 4 ++-- multipath/Makefile | 4 ++-- multipathd/Makefile | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-)
kpartx/Makefile +2 -2
@@ -5,7 +5,7 @@ include ../Makefile.inc CFLAGS += -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -LDFLAGS += -ldevmapper +LIBDEPS += -ldevmapper LIBDM_API_COOKIE = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_set_cookie' /usr/include/libdevmapper.h)
@@ -21,7 +21,7 @@ EXEC = kpartx all: $(EXEC) $(EXEC): $(OBJS) - $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) + $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz install: $(EXEC) $(EXEC).8
mpathpersist/Makefile +2 -2
@@ -2,7 +2,7 @@ include ../Makefile.inc CFLAGS += -I$(multipathdir) -I$(mpathpersistdir) -LDFLAGS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist \ +LIBDEPS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist \ -L$(multipathdir) -L$(mpathcmddir) -lmpathcmd -lmultipath -ludev EXEC = mpathpersist
@@ -12,7 +12,7 @@ OBJS = main.o all: $(EXEC) $(EXEC): $(OBJS) - $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS) + $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS) $(LIBDEPS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz install:
multipath/Makefile +2 -2
@@ -5,7 +5,7 @@ include ../Makefile.inc CFLAGS += -I$(multipathdir) -I$(mpathcmddir) -LDFLAGS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev \ +LIBDEPS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev \ -L$(mpathcmddir) -lmpathcmd EXEC = multipath
@@ -15,7 +15,7 @@ OBJS = main.o all: $(EXEC) $(EXEC): $(OBJS) - $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) + $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz
multipathd/Makefile +4 -4
@@ -8,16 +8,16 @@ include ../Makefile.inc #CFLAGS += -DLOGDBG CFLAGS += -I$(multipathdir) -I$(mpathpersistdir) -I$(mpathcmddir) -LDFLAGS += -ludev -ldl -L$(multipathdir) -lmultipath -L$(mpathpersistdir) \ +LIBDEPS += -ludev -ldl -L$(multipathdir) -lmultipath -L$(mpathpersistdir) \ -lmpathpersist -L$(mpathcmddir) -lmpathcmd -lurcu -lpthread \ -ldevmapper -lreadline ifdef SYSTEMD CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD) ifeq ($(shell test $(SYSTEMD) -gt 209 && echo 1), 1) - LDFLAGS += -lsystemd + LIBDEPS += -lsystemd else - LDFLAGS += -lsystemd-daemon + LIBDEPS += -lsystemd-daemon endif endif
@@ -28,7 +28,7 @@ EXEC = multipathd all : $(EXEC) $(EXEC): $(OBJS) - $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) + $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) $(LIBDEPS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz install:
Signature · 1 line
2.7.4
Quoted 3 lines · Xose Vazquez Perez
Cc Christophe Varoqui <[email protected]>Cc device-mapper development <[email protected]>Signed-off-by Xose Vazquez Perez <[email protected]>
It seems like a patch description that motivates why this change is considered useful is missing completely? Anyway, have you considered to use a name that is consistent by what is expected by automake, namely LDADD (see also https://www.gnu.org/software/automake/manual/html_node/Linking.html#Linking)?
Bart.
Quoted 2 lines · Bart Van Assche
It seems like a patch description that motivates why this change is considered useful is missing completely? Anyway, have you considered to use a name that is consistent by what is expected by automake, namely LDADD (see also https://www.gnu.org/software/automake/manual/html_node/Linking.html#Linking)?
I followed just same rule as in the rest of multipath-tools' Makefiles. Where it's called "LIBDEPS":
libmpathpersist/Makefile:LIBDEPS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath \
libmultipath/Makefile: LIBDEPS += -lsystemd libmultipath/Makefile: LIBDEPS += -lsystemd-daemon
Quoted 6 lines · Xose Vazquez Perez
Quoted 4 lines · Bart Van Assche
It seems like a patch description that motivates why this change is
considered useful is missing completely? Anyway, have you considered
to use a name that is consistent by what is expected by automake,
namely LDADD (see also https://www.gnu.org/software/automake/manual/html_node/Linking.html#Linking)?
Quoted 6 lines
I followed just same rule as in the rest of multipath-tools' Makefiles. Where it's called "LIBDEPS":
libmpathpersist/Makefile:LIBDEPS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath \
libmultipath/Makefile: LIBDEPS += -lsystemd libmultipath/Makefile: LIBDEPS += -lsystemd-daemon
Hello Xose,
Thanks for the clarification. Since LIBDEPS is already used elsewhere in multipath-tools makefiles I'm fine with using that name. I don't think it's worth to rename all uses of LIBDEPS in other Makefiles.
Bart.
Applied then.
Thanks.
On Tue, Aug 16, 2016 at 5:02 PM, Bart Van Assche <[email protected]
Quoted 37 lines
wrote:
Quoted 7 lines · Xose Vazquez Perez
Quoted 5 lines · Bart Van Assche
It seems like a patch description that motivates why this change is
Quoted 1 line
considered useful is missing completely? Anyway, have you considered
to use a name that is consistent by what is expected by automake, namely LDADD (see also https://www.gnu.org/software/a
utomake/manual/html_node/Linking.html#Linking)?
Quoted 9 lines
I followed just same rule as in the rest of multipath-tools' Makefiles. Where it's called "LIBDEPS":
libmpathpersist/Makefile:LIBDEPS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath \
libmultipath/Makefile: LIBDEPS += -lsystemd libmultipath/Makefile: LIBDEPS += -lsystemd-daemonHello Xose,
Thanks for the clarification. Since LIBDEPS is already used elsewhere in multipath-tools makefiles I'm fine with using that name. I don't think it's worth to rename all uses of LIBDEPS in other Makefiles.
Bart.
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel