Commit 250af24d authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Peter Korsgaard
Browse files

libnl: simplify makefile by using --{enable, disable}-cli



The libnl configure script has a --{enable,disable}-cli options that
allows to enable or disable the compilation of the libnl tools. Use
this option instead of compiling everything and then removing the
installed programs.

Note that we also get rid of the uninstall command, which is planned
to be globally removed in Buildroot.

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: default avatarSamuel Martin <s.martin49@gmail.com>
parent c016a48b
Loading
Loading
Loading
Loading
+4 −15
Original line number Diff line number Diff line
@@ -10,22 +10,11 @@ LIBNL_LICENSE = LGPLv2.1+
LIBNL_LICENSE_FILES = COPYING
LIBNL_INSTALL_STAGING = YES
LIBNL_DEPENDENCIES = host-bison host-flex
LIBNL_BINARIES = class-add class-delete class-list classid-lookup cls-add \
	cls-delete cls-list link-list pktloc-lookup qdisc-add qdisc-delete \
	qdisc-list

define LIBNL_UNINSTALL_TARGET_CMDS
	rm -r $(TARGET_DIR)/usr/lib/libnl.* $(TARGET_DIR)/usr/lib/libnl-*.*
	rm -rf $(TARGET_DIR)/usr/lib/libnl
endef

define LIBNL_REMOVE_TOOLS
	rm -rf $(addprefix $(TARGET_DIR)/usr/sbin/nl-, $(LIBNL_BINARIES))
	rm -rf $(TARGET_DIR)/usr/sbin/genl-ctrl-list
endef

ifneq ($(BR2_PACKAGE_LIBNL_TOOLS),y)
LIBNL_POST_INSTALL_TARGET_HOOKS += LIBNL_REMOVE_TOOLS
ifeq ($(BR2_PACKAGE_LIBNL_TOOLS),y)
LIBNL_CONF_OPT += --enable-cli
else
LIBNL_CONF_OPT += --disable-cli
endif

$(eval $(autotools-package))