package/nvme: add systemd optional dependency
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Wed, 20 Jan 2021 20:16:22 +0000 (21:16 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 23 Jan 2021 20:49:01 +0000 (21:49 +0100)
systemd is an optional dependency (enabled by default) since version
1.10 and
https://github.com/linux-nvme/nvme-cli/commit/48c10dbfaf00777170e209db20f7d07e47f7a983

Fixes:
 - http://autobuild.buildroot.org/results/8d14a5702aa1ffe3f036d1e1505e9596e3d4d466

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/nvme/nvme.mk

index 678b978211adebf9969bf722407088ef8c191385..53f9dff753cc73faa07c00f2508f491cbfd4bb75 100644 (file)
@@ -18,6 +18,15 @@ else
 NVME_MAKE_OPTS += LIBUUID=1
 endif
 
+# Yes, HAVE_SYSTEMD=0 means systemd support enabled.
+# HAVE_SYSTEMD=1 means systemd support disabled.
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+NVME_DEPENDENCIES += systemd
+NVME_MAKE_OPTS += HAVE_SYSTEMD=0
+else
+NVME_MAKE_OPTS += HAVE_SYSTEMD=1
+endif
+
 define NVME_BUILD_CMDS
        $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
                $(NVME_MAKE_OPTS) -C $(@D)