* [PATCH iproute2] devlink, rdma, tipc: properly define TARGETS without HAVE_MNL
@ 2018-01-03 15:28 Matthias Schiffer
2018-01-06 0:34 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Matthias Schiffer @ 2018-01-03 15:28 UTC (permalink / raw)
To: stephen; +Cc: netdev
Leaving a variable with a generic name such as TARGETS undefined would lead
to Make picking up its value from the environment. Avoid this by always
defining TARGETS in the Makefiles.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
---
I also noticed that many Makefiles refer to a variable LIBS, which is
neither defined nor documented to be passed from the outside. Is this
intentional?
devlink/Makefile | 4 +++-
rdma/Makefile | 4 +++-
tipc/Makefile | 4 +++-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/devlink/Makefile b/devlink/Makefile
index 3afda65e..ace34c7b 100644
--- a/devlink/Makefile
+++ b/devlink/Makefile
@@ -1,10 +1,12 @@
# SPDX-License-Identifier: GPL-2.0
include ../config.mk
+TARGETS :=
+
ifeq ($(HAVE_MNL),y)
DEVLINKOBJ = devlink.o mnlg.o
-TARGETS=devlink
+TARGETS += devlink
CFLAGS += $(shell $(PKG_CONFIG) libmnl --cflags)
LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs)
diff --git a/rdma/Makefile b/rdma/Makefile
index c8966bfd..454f25f8 100644
--- a/rdma/Makefile
+++ b/rdma/Makefile
@@ -1,11 +1,13 @@
# SPDX-License-Identifier: GPL-2.0
include ../config.mk
+TARGETS :=
+
ifeq ($(HAVE_MNL),y)
RDMA_OBJ = rdma.o utils.o dev.o link.o
-TARGETS=rdma
+TARGETS += rdma
endif
all: $(TARGETS) $(LIBS)
diff --git a/tipc/Makefile b/tipc/Makefile
index abd33ab0..fdb18d39 100644
--- a/tipc/Makefile
+++ b/tipc/Makefile
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
include ../config.mk
+TARGETS :=
+
ifeq ($(HAVE_MNL),y)
TIPCOBJ=bearer.o \
@@ -10,7 +12,7 @@ TIPCOBJ=bearer.o \
node.o socket.o \
peer.o tipc.o
-TARGETS=tipc
+TARGETS += tipc
endif
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH iproute2] devlink, rdma, tipc: properly define TARGETS without HAVE_MNL
2018-01-03 15:28 [PATCH iproute2] devlink, rdma, tipc: properly define TARGETS without HAVE_MNL Matthias Schiffer
@ 2018-01-06 0:34 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2018-01-06 0:34 UTC (permalink / raw)
To: Matthias Schiffer; +Cc: netdev
On Wed, 3 Jan 2018 16:28:52 +0100
Matthias Schiffer <mschiffer@universe-factory.net> wrote:
> Leaving a variable with a generic name such as TARGETS undefined would lead
> to Make picking up its value from the environment. Avoid this by always
> defining TARGETS in the Makefiles.
>
> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
> ---
>
> I also noticed that many Makefiles refer to a variable LIBS, which is
> neither defined nor documented to be passed from the outside. Is this
> intentional?
>
>
> devlink/Makefile | 4 +++-
> rdma/Makefile | 4 +++-
> tipc/Makefile | 4 +++-
> 3 files changed, 9 insertions(+), 3 deletions(-)
Applied.
Most of the Makefiles are very old.
There maybe other variable issues.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-06 0:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-03 15:28 [PATCH iproute2] devlink, rdma, tipc: properly define TARGETS without HAVE_MNL Matthias Schiffer
2018-01-06 0:34 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).