aboutsummaryrefslogtreecommitdiffstats
path: root/main/iproute2/fix-install-errors.patch
blob: d514032b77f68f5ee5fe4ac78a091a71de5cb126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Without this patch the following error message shows up three times
during `make install:`

	install -m 0755  /home/travis/build/alpinelinux/aports/main/iproute2/pkg/iproute2/sbin
	BusyBox v1.28.4 (2018-05-30 10:45:57 UTC) multi-call binary.
	Usage: install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [-t DIR] [SOURCE]... DEST
	Copy files and set attributes
		-c	Just copy (default)
		-d	Create directories
		-D	Create leading target directories
		-s	Strip symbol table
		-p	Preserve date
		-o USER	Set ownership
		-g GRP	Set group ownership
		-m MODE	Set permissions
		-t DIR	Install to DIR
	make[1]: *** [Makefile:25: install] Error 1

diff -upr iproute2-4.17.0.orig/Makefile iproute2-4.17.0/Makefile
--- iproute2-4.17.0.orig/Makefile	2018-06-27 22:58:35.818077991 +0200
+++ iproute2-4.17.0/Makefile	2018-06-27 23:00:33.118560603 +0200
@@ -61,7 +61,17 @@ WFLAGS += -Wmissing-declarations -Wold-s
 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 man
+SUBDIRS=lib ip tc bridge misc netem genl man
+
+# The following subdirs require libmnl. If libmnl isn't installed
+# install(1) is called with invalid arguments when the install
+# target is invoked in those subdirs because $(TARGETS) is empty.
+#
+# To prevent these errors we only include the subdirs if libmnl is
+# actually available.
+ifeq ($(HAVE_MNL),y)
+SUBDIRS += tipc devlink rdma
+endif
 
 LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a
 LDLIBS += $(LIBNETLINK)