From: Samuel Mendoza-Jonas Date: Tue, 19 Apr 2016 01:54:24 +0000 (+1000) Subject: nvme: add optional udev support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c0293c3cc9f99b81c78ed193a7ce6187c6c4c78d;p=buildroot.git nvme: add optional udev support Commands like 'nvme list' require libudev but support for libudev is decided at compile time, and in buildroot this is hard disabled. Add a check for udev and if it is available build nvme with udev support. Signed-off-by: Samuel Mendoza-Jonas [Thomas: - add comment to explain the LIBUDEV variable value - use += instead of = to assign _MAKE_OPTS.] Signed-off-by: Thomas Petazzoni --- diff --git a/package/nvme/nvme.mk b/package/nvme/nvme.mk index 7c4bd8eb07..b745025fdf 100755 --- a/package/nvme/nvme.mk +++ b/package/nvme/nvme.mk @@ -9,10 +9,19 @@ NVME_SITE = $(call github,linux-nvme,nvme-cli,$(NVME_VERSION)) NVME_LICENSE = GPLv2+ NVME_LICENSE_FILES = LICENSE +# Yes LIBUDEV=0 means udev support enabled, LIBUDEV=1 means udev +# support disabled. +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +NVME_DEPENDENCIES += udev +NVME_MAKE_OPTS += LIBUDEV=0 +else +NVME_MAKE_OPTS += LIBUDEV=1 +endif + # LIBUDEV=1 means that libudev is _disabled_ define NVME_BUILD_CMDS $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \ - LIBUDEV=1 -C $(@D) + $(NVME_MAKE_OPTS) -C $(@D) endef define NVME_INSTALL_TARGET_CMDS