build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer return true for auto features. Instead, the
expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: Iebfa27c0094b2001eb3f87fcfbbf209d803d2190
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meson.build b/meson.build
index 5e3e630..4cf01fe 100644
--- a/meson.build
+++ b/meson.build
@@ -66,8 +66,8 @@
conf.set('MMC_LAYOUT', get_option('bmc-layout').contains('mmc'))
# Configurable features
-conf.set('HOST_BIOS_UPGRADE', get_option('host-bios-upgrade').enabled())
-conf.set('WANT_SIGNATURE_VERIFY', get_option('verify-signature').enabled())
+conf.set('HOST_BIOS_UPGRADE', get_option('host-bios-upgrade').allowed())
+conf.set('WANT_SIGNATURE_VERIFY', get_option('verify-signature').allowed())
# Configurable variables
conf.set('ACTIVE_BMC_MAX_ALLOWED', get_option('active-bmc-max-allowed'))
@@ -89,12 +89,12 @@
conf.set_quoted('BMC_MSL', get_option('bmc-msl'))
conf.set_quoted('REGEX_BMC_MSL', get_option('regex-bmc-msl'))
-if get_option('host-bios-upgrade').enabled()
+if get_option('host-bios-upgrade').allowed()
conf.set_quoted('BIOS_OBJPATH', get_option('bios-object-path'))
endif
-if get_option('bmc-static-dual-image').enabled()
- conf.set('BMC_STATIC_DUAL_IMAGE', get_option('bmc-static-dual-image').enabled())
+if get_option('bmc-static-dual-image').allowed()
+ conf.set('BMC_STATIC_DUAL_IMAGE', get_option('bmc-static-dual-image').allowed())
conf.set_quoted('ALT_ROFS_DIR', get_option('alt-rofs-dir'))
conf.set_quoted('ALT_RWFS', get_option('alt-rwfs-dir'))
else
@@ -199,11 +199,11 @@
]
endif
-if get_option('host-bios-upgrade').enabled()
+if get_option('host-bios-upgrade').allowed()
unit_files += 'obmc-flash-host-bios@.service.in'
endif
-if get_option('bmc-static-dual-image').enabled()
+if get_option('bmc-static-dual-image').allowed()
unit_files += [
'static/obmc-flash-bmc-alt@.service.in',
'static/obmc-flash-bmc-static-mount-alt.service.in',
@@ -211,7 +211,7 @@
]
endif
-if get_option('sync-bmc-files').enabled()
+if get_option('sync-bmc-files').allowed()
executable(
'phosphor-sync-software-manager',
'sync_manager.cpp',
@@ -231,7 +231,7 @@
)
endif
-if (get_option('verify-signature').enabled())
+if (get_option('verify-signature').allowed())
image_updater_sources += files(
'utils.cpp',
'image_verify.cpp',
@@ -314,10 +314,10 @@
)
endif
-if get_option('usb-code-update').enabled()
+if get_option('usb-code-update').allowed()
subdir('usb')
endif
-if get_option('side-switch-on-boot').enabled()
+if get_option('side-switch-on-boot').allowed()
subdir('side-switch')
endif