aboutsummaryrefslogtreecommitdiffstats
path: root/config/zfs-build.m4
diff options
context:
space:
mode:
authorTony Hutter <[email protected]>2018-03-25 15:00:47 -0700
committerBrian Behlendorf <[email protected]>2018-03-25 15:00:47 -0700
commit9ea6c3d39def9a1e25d2b8bc327667cf45d67409 (patch)
tree95aef286752ff4f8e39c43c4266f86cc1c336eea /config/zfs-build.m4
parent157ef7f6a527239e3cb3afa3be2acf502794a5d4 (diff)
Fedora 28: Fix "Macro %_dracutdir has empty body"
If you run ./configure --with-config=srpm, it will not trigger the user m4 scripts to populate the dracut and udev directories. This causes a build error on Fedora 28. Make the dracut and udev lines conditional to get around this. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #7326 Closes #7328
Diffstat (limited to 'config/zfs-build.m4')
-rw-r--r--config/zfs-build.m421
1 files changed, 17 insertions, 4 deletions
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
index e6c386e82..818e99982 100644
--- a/config/zfs-build.m4
+++ b/config/zfs-build.m4
@@ -185,10 +185,23 @@ AC_DEFUN([ZFS_AC_RPM], [
RPM_DEFINE_COMMON+=' --define "$(DEBUGINFO_ZFS) 1"'
RPM_DEFINE_COMMON+=' --define "$(ASAN_ZFS) 1"'
- RPM_DEFINE_UTIL='--define "_dracutdir $(dracutdir)"'
- RPM_DEFINE_UTIL+=' --define "_udevdir $(udevdir)"'
- RPM_DEFINE_UTIL+=' --define "_udevruledir $(udevruledir)"'
- RPM_DEFINE_UTIL+=' --define "_initconfdir $(DEFAULT_INITCONF_DIR)"'
+
+ RPM_DEFINE_UTIL=' --define "_initconfdir $(DEFAULT_INITCONF_DIR)"'
+
+ dnl # Make the next three RPM_DEFINE_UTIL additions conditional, since
+ dnl # their values may not be set when running:
+ dnl #
+ dnl # ./configure --with-config=srpm
+ dnl #
+ AS_IF([test -n "$dracutdir" ], [
+ RPM_DEFINE_UTIL='--define "_dracutdir $(dracutdir)"'
+ ])
+ AS_IF([test -n "$udevdir" ], [
+ RPM_DEFINE_UTIL+=' --define "_udevdir $(udevdir)"'
+ ])
+ AS_IF([test -n "$udevruledir" ], [
+ RPM_DEFINE_UTIL+=' --define "_udevdir $(udevruledir)"'
+ ])
RPM_DEFINE_UTIL+=' $(DEFINE_INITRAMFS)'
RPM_DEFINE_UTIL+=' $(DEFINE_SYSTEMD)'