* [PATCH iproute2-next] Makefile: move HAVE_MLN check to top-level Makefile
@ 2022-03-09 17:03 Andrea Claudi
2022-03-12 16:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Andrea Claudi @ 2022-03-09 17:03 UTC (permalink / raw)
To: netdev; +Cc: stephen, dsahern
dcb, devlink, rdma, tipc and vdpa rely on libmnl to compile, so they
check for libmnl to be installed on their Makefiles.
This moves HAVE_MNL check from the tools to top-level Makefile, thus
avoiding to call their Makefiles if libmnl is not present.
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
---
Makefile | 5 ++++-
dcb/Makefile | 6 ------
devlink/Makefile | 6 ------
rdma/Makefile | 4 ----
tipc/Makefile | 6 ------
vdpa/Makefile | 6 ------
6 files changed, 4 insertions(+), 29 deletions(-)
diff --git a/Makefile b/Makefile
index f6214534..8a17d614 100644
--- a/Makefile
+++ b/Makefile
@@ -65,7 +65,10 @@ WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2
CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS)
YACCFLAGS = -d -t -v
-SUBDIRS=lib ip tc bridge misc netem genl tipc devlink rdma dcb man vdpa
+SUBDIRS=lib ip tc bridge misc netem genl man
+ifeq ($(HAVE_MNL),y)
+SUBDIRS += tipc devlink rdma dcb vdpa
+endif
LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a
LDLIBS += $(LIBNETLINK)
diff --git a/dcb/Makefile b/dcb/Makefile
index 3a2e5d4c..ca65d467 100644
--- a/dcb/Makefile
+++ b/dcb/Makefile
@@ -1,10 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
include ../config.mk
-TARGETS :=
-
-ifeq ($(HAVE_MNL),y)
-
DCBOBJ = dcb.o \
dcb_app.o \
dcb_buffer.o \
@@ -15,8 +11,6 @@ DCBOBJ = dcb.o \
TARGETS += dcb
LDLIBS += -lm
-endif
-
all: $(TARGETS) $(LIBS)
dcb: $(DCBOBJ) $(LIBNETLINK)
diff --git a/devlink/Makefile b/devlink/Makefile
index d37a4b4d..1a1eed7e 100644
--- a/devlink/Makefile
+++ b/devlink/Makefile
@@ -1,16 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
include ../config.mk
-TARGETS :=
-
-ifeq ($(HAVE_MNL),y)
-
DEVLINKOBJ = devlink.o mnlg.o
TARGETS += devlink
LDLIBS += -lm
-endif
-
all: $(TARGETS) $(LIBS)
devlink: $(DEVLINKOBJ) $(LIBNETLINK)
diff --git a/rdma/Makefile b/rdma/Makefile
index 9154efeb..37d904a7 100644
--- a/rdma/Makefile
+++ b/rdma/Makefile
@@ -1,16 +1,12 @@
# SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
include ../config.mk
-TARGETS :=
-
-ifeq ($(HAVE_MNL),y)
CFLAGS += -I./include/uapi/
RDMA_OBJ = rdma.o utils.o dev.o link.o res.o res-pd.o res-mr.o res-cq.o \
res-cmid.o res-qp.o sys.o stat.o stat-mr.o res-ctx.o res-srq.o
TARGETS += rdma
-endif
all: $(TARGETS) $(LIBS)
diff --git a/tipc/Makefile b/tipc/Makefile
index a10debe0..4f0aba7e 100644
--- a/tipc/Makefile
+++ b/tipc/Makefile
@@ -1,10 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
include ../config.mk
-TARGETS :=
-
-ifeq ($(HAVE_MNL),y)
-
TIPCOBJ=bearer.o \
cmdl.o link.o \
media.o misc.o \
@@ -14,8 +10,6 @@ TIPCOBJ=bearer.o \
TARGETS += tipc
-endif
-
all: $(TARGETS) $(LIBS)
tipc: $(TIPCOBJ)
diff --git a/vdpa/Makefile b/vdpa/Makefile
index 253e20a7..86f7221e 100644
--- a/vdpa/Makefile
+++ b/vdpa/Makefile
@@ -1,16 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
include ../config.mk
-TARGETS :=
-
-ifeq ($(HAVE_MNL),y)
-
CFLAGS += -I./include/uapi/
VDPAOBJ = vdpa.o
TARGETS += vdpa
-endif
-
all: $(TARGETS) $(LIBS)
vdpa: $(VDPAOBJ)
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2-next] Makefile: move HAVE_MLN check to top-level Makefile
2022-03-09 17:03 [PATCH iproute2-next] Makefile: move HAVE_MLN check to top-level Makefile Andrea Claudi
@ 2022-03-12 16:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-12 16:10 UTC (permalink / raw)
To: Andrea Claudi; +Cc: netdev, stephen, dsahern
Hello:
This patch was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:
On Wed, 9 Mar 2022 18:03:26 +0100 you wrote:
> dcb, devlink, rdma, tipc and vdpa rely on libmnl to compile, so they
> check for libmnl to be installed on their Makefiles.
>
> This moves HAVE_MNL check from the tools to top-level Makefile, thus
> avoiding to call their Makefiles if libmnl is not present.
>
> Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
>
> [...]
Here is the summary with links:
- [iproute2-next] Makefile: move HAVE_MLN check to top-level Makefile
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=93fb6810e146
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-12 16:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-09 17:03 [PATCH iproute2-next] Makefile: move HAVE_MLN check to top-level Makefile Andrea Claudi
2022-03-12 16:10 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.