meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I1dbf4ae74d383552995432add3d2f548eb844ee5
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/app/meson.build b/app/meson.build
index 5e89b27..bc7c598 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -3,13 +3,12 @@
app_pre = declare_dependency(include_directories: [root_inc, app_inc])
app_lib = static_library(
- 'app',
- 'channel.cpp',
- 'watchdog.cpp',
- 'watchdog_service.cpp',
- implicit_include_directories: false,
- dependencies: app_pre)
+ 'app',
+ 'channel.cpp',
+ 'watchdog.cpp',
+ 'watchdog_service.cpp',
+ implicit_include_directories: false,
+ dependencies: app_pre,
+)
-app_dep = declare_dependency(
- link_with: app_lib,
- dependencies: app_pre)
+app_dep = declare_dependency(link_with: app_lib, dependencies: app_pre)
diff --git a/dbus-sdr/meson.build b/dbus-sdr/meson.build
index 2afb8a6..37b5669 100644
--- a/dbus-sdr/meson.build
+++ b/dbus-sdr/meson.build
@@ -1,41 +1,43 @@
sensorutils_lib = static_library(
- 'sensorutils',
- 'sensorutils.cpp',
- include_directories: root_inc,
- implicit_include_directories: false)
+ 'sensorutils',
+ 'sensorutils.cpp',
+ include_directories: root_inc,
+ implicit_include_directories: false,
+)
sensorutils_dep = declare_dependency(link_with: sensorutils_lib)
hybrid_src = []
if not get_option('hybrid-sensors').disabled()
- hybrid_src = [
- 'sensorhandler.cpp',
- 'sensordatahandler.cpp',
- 'ipmisensor.cpp',
- generated_src,
- ]
+ hybrid_src = [
+ 'sensorhandler.cpp',
+ 'sensordatahandler.cpp',
+ 'ipmisensor.cpp',
+ generated_src,
+ ]
endif
sensorsoem_src = []
if not get_option('sensors-oem').disabled()
- sensorsoem_src = ['dbus-sdr/sensorcommands_oem.cpp']
+ sensorsoem_src = ['dbus-sdr/sensorcommands_oem.cpp']
endif
dbus_sdr_pre = declare_dependency(
- include_directories: root_inc,
- dependencies: [
- crypto,
- nlohmann_json_dep,
- phosphor_logging_dep,
- ipmid_dep,
- sensorutils_dep,
- ])
+ include_directories: root_inc,
+ dependencies: [
+ crypto,
+ nlohmann_json_dep,
+ phosphor_logging_dep,
+ ipmid_dep,
+ sensorutils_dep,
+ ],
+)
dbus_sdr_src = [
- 'dbus-sdr/sdrutils.cpp',
- 'dbus-sdr/sensorcommands.cpp',
- 'dbus-sdr/storagecommands.cpp',
- hybrid_src,
- sensorsoem_src,
+ 'dbus-sdr/sdrutils.cpp',
+ 'dbus-sdr/sensorcommands.cpp',
+ 'dbus-sdr/storagecommands.cpp',
+ hybrid_src,
+ sensorsoem_src,
]
diff --git a/include/meson.build b/include/meson.build
index e449e78..65b8385 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -1,20 +1,23 @@
install_subdir(
- 'dbus-sdr',
- install_dir: get_option('includedir'),
- strip_directory: false,
- exclude_files: '*.cpp')
+ 'dbus-sdr',
+ install_dir: get_option('includedir'),
+ strip_directory: false,
+ exclude_files: '*.cpp',
+)
install_subdir(
- 'ipmid',
- install_dir: get_option('includedir'),
- strip_directory: false,
- exclude_files: '*.cpp')
+ 'ipmid',
+ install_dir: get_option('includedir'),
+ strip_directory: false,
+ exclude_files: '*.cpp',
+)
install_subdir(
- 'ipmid-host',
- install_dir: get_option('includedir'),
- strip_directory: false,
- exclude_files: '*.cpp')
+ 'ipmid-host',
+ install_dir: get_option('includedir'),
+ strip_directory: false,
+ exclude_files: '*.cpp',
+)
# install the ipmid-host and ipmid includes
install_subdir('ipmid-host', install_dir: get_option('includedir'))
diff --git a/libipmid/meson.build b/libipmid/meson.build
index 20dbfe1..f9953b0 100644
--- a/libipmid/meson.build
+++ b/libipmid/meson.build
@@ -1,41 +1,44 @@
ipmid_pre = [
- boost,
- libsystemd_dep,
- phosphor_dbus_interfaces_dep,
- phosphor_logging_dep,
- sdbusplus_dep,
+ boost,
+ libsystemd_dep,
+ phosphor_dbus_interfaces_dep,
+ phosphor_logging_dep,
+ sdbusplus_dep,
]
entity_map_json_lib = static_library(
- 'entity_map_json',
- 'entity_map_json.cpp',
- include_directories: root_inc,
- dependencies: [nlohmann_json_dep, sdbusplus_dep],
- implicit_include_directories: false)
+ 'entity_map_json',
+ 'entity_map_json.cpp',
+ include_directories: root_inc,
+ dependencies: [nlohmann_json_dep, sdbusplus_dep],
+ implicit_include_directories: false,
+)
-entity_map_json_dep = declare_dependency(
- link_whole: entity_map_json_lib)
+entity_map_json_dep = declare_dependency(link_whole: entity_map_json_lib)
libipmid = library(
- 'ipmid',
- 'sdbus-asio.cpp',
- 'signals.cpp',
- 'systemintf-sdbus.cpp',
- 'utils.cpp',
- dependencies: [ipmid_pre, entity_map_json_dep],
- version: meson.project_version(),
- include_directories: root_inc,
- install: true,
- install_dir: get_option('libdir'),
- override_options: ['b_lundef=false'])
+ 'ipmid',
+ 'sdbus-asio.cpp',
+ 'signals.cpp',
+ 'systemintf-sdbus.cpp',
+ 'utils.cpp',
+ dependencies: [ipmid_pre, entity_map_json_dep],
+ version: meson.project_version(),
+ include_directories: root_inc,
+ install: true,
+ install_dir: get_option('libdir'),
+ override_options: ['b_lundef=false'],
+)
ipmid_dep = declare_dependency(
- dependencies: ipmid_pre,
- include_directories: root_inc,
- link_with: libipmid)
+ dependencies: ipmid_pre,
+ include_directories: root_inc,
+ link_with: libipmid,
+)
import('pkgconfig').generate(
- libipmid,
- name: 'libipmid',
- version: meson.project_version(),
- description: 'ipmid')
+ libipmid,
+ name: 'libipmid',
+ version: meson.project_version(),
+ description: 'ipmid',
+)
diff --git a/meson.build b/meson.build
index e244f85..341c72f 100644
--- a/meson.build
+++ b/meson.build
@@ -1,14 +1,15 @@
project(
- 'phosphor-host-ipmid',
- 'cpp',
- version: '0.1',
- meson_version: '>=1.1.1',
- default_options: [
- 'werror=true',
- 'warning_level=3',
- 'cpp_std=c++23',
- 'b_lto=true',
- ])
+ 'phosphor-host-ipmid',
+ 'cpp',
+ version: '0.1',
+ meson_version: '>=1.1.1',
+ default_options: [
+ 'werror=true',
+ 'warning_level=3',
+ 'cpp_std=c++23',
+ 'b_lto=true',
+ ],
+)
# Setting up config data
conf_data = configuration_data()
@@ -17,15 +18,27 @@
conf_data.set_quoted('CALLOUT_FWD_ASSOCIATION', 'callout')
conf_data.set_quoted('BOARD_SENSOR', get_option('board-sensor'))
conf_data.set_quoted('SYSTEM_SENSOR', get_option('system-sensor'))
-conf_data.set('IPMI_SMS_ATN_ACK_TIMEOUT_SECS', get_option('ipmi-sms-atn-ack-timeout-secs'))
+conf_data.set(
+ 'IPMI_SMS_ATN_ACK_TIMEOUT_SECS',
+ get_option('ipmi-sms-atn-ack-timeout-secs'),
+)
# Soft Power off related.
if not get_option('softoff').disabled()
- conf_data.set_quoted('SOFTOFF_BUSNAME', get_option('softoff-busname'))
- conf_data.set_quoted('SOFTOFF_OBJPATH', get_option('softoff-objpath'))
- conf_data.set('IPMI_HOST_SHUTDOWN_COMPLETE_TIMEOUT_SECS', get_option('ipmi-host-shutdown-complete-timeout-secs'))
- conf_data.set_quoted('HOST_INBAND_REQUEST_DIR', get_option('host-inband-request-dir'))
- conf_data.set_quoted('HOST_INBAND_REQUEST_FILE', get_option('host-inband-request-file'))
+ conf_data.set_quoted('SOFTOFF_BUSNAME', get_option('softoff-busname'))
+ conf_data.set_quoted('SOFTOFF_OBJPATH', get_option('softoff-objpath'))
+ conf_data.set(
+ 'IPMI_HOST_SHUTDOWN_COMPLETE_TIMEOUT_SECS',
+ get_option('ipmi-host-shutdown-complete-timeout-secs'),
+ )
+ conf_data.set_quoted(
+ 'HOST_INBAND_REQUEST_DIR',
+ get_option('host-inband-request-dir'),
+ )
+ conf_data.set_quoted(
+ 'HOST_INBAND_REQUEST_FILE',
+ get_option('host-inband-request-file'),
+ )
endif
conf_data.set_quoted('CONTROL_HOST_BUSNAME', get_option('control-host-busname'))
@@ -36,13 +49,13 @@
conf_data.set_quoted('FW_VER_REGEX', get_option('fw-ver-regex'))
if get_option('shortname-remove-suffix').allowed()
- conf_data.set_quoted('SHORTNAME_REMOVE_SUFFIX', '1')
+ conf_data.set_quoted('SHORTNAME_REMOVE_SUFFIX', '1')
endif
if get_option('shortname-replace-words').allowed()
- conf_data.set_quoted('SHORTNAME_REPLACE_WORDS', '1')
+ conf_data.set_quoted('SHORTNAME_REPLACE_WORDS', '1')
endif
if get_option('open-power').allowed()
- conf_data.set_quoted('OPEN_POWER_SUPPORT', '1')
+ conf_data.set_quoted('OPEN_POWER_SUPPORT', '1')
endif
matches_map = get_option('matches-map')
@@ -53,9 +66,7 @@
conf_data.set('AUX_2_MATCH_INDEX', matches_map[4])
conf_data.set('AUX_3_MATCH_INDEX', matches_map[5])
-conf_h = configure_file(
- output: 'config.h',
- configuration: conf_data)
+conf_h = configure_file(output: 'config.h', configuration: conf_data)
root = meson.current_source_dir()
root_inc = include_directories('.', 'include')
@@ -63,85 +74,95 @@
# Project Arguments
cpp = meson.get_compiler('cpp')
add_project_arguments(
- cpp.get_supported_arguments([
- '-DBOOST_ERROR_CODE_HEADER_ONLY',
- '-DBOOST_SYSTEM_NO_DEPRECATED',
- '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING',
- '-DBOOST_ASIO_DISABLE_THREADS',
- '-DBOOST_ALL_NO_LIB',
- ]),
- language : 'cpp')
+ cpp.get_supported_arguments(
+ [
+ '-DBOOST_ERROR_CODE_HEADER_ONLY',
+ '-DBOOST_SYSTEM_NO_DEPRECATED',
+ '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING',
+ '-DBOOST_ASIO_DISABLE_THREADS',
+ '-DBOOST_ALL_NO_LIB',
+ ],
+ ),
+ language: 'cpp',
+)
if not get_option('get-dbus-active-software').disabled()
- add_project_arguments(
- cpp.get_supported_arguments([
- '-DGET_DBUS_ACTIVE_SOFTWARE',
- ]),
- language : 'cpp')
+ add_project_arguments(
+ cpp.get_supported_arguments(['-DGET_DBUS_ACTIVE_SOFTWARE']),
+ language: 'cpp',
+ )
endif
feature_map = {
- 'boot-flag-safe-mode-support': '-DENABLE_BOOT_FLAG_SAFE_MODE_SUPPORT',
- 'i2c-whitelist-check' : '-DENABLE_I2C_WHITELIST_CHECK',
- 'update-functional-on-fail' : '-DUPDATE_FUNCTIONAL_ON_FAIL',
- 'dynamic-sensors' : '-DFEATURE_DYNAMIC_SENSORS',
- 'dynamic-sensors-write' : '-DFEATURE_DYNAMIC_SENSORS_WRITE',
- 'entity-manager-decorators' : '-DUSING_ENTITY_MANAGER_DECORATORS',
- 'hybrid-sensors' : '-DFEATURE_HYBRID_SENSORS',
- 'sensors-cache' : '-DFEATURE_SENSORS_CACHE',
- 'dynamic-storages-only' : '-DFEATURE_DYNAMIC_STORAGES_ONLY',
+ 'boot-flag-safe-mode-support': '-DENABLE_BOOT_FLAG_SAFE_MODE_SUPPORT',
+ 'i2c-whitelist-check' : '-DENABLE_I2C_WHITELIST_CHECK',
+ 'update-functional-on-fail' : '-DUPDATE_FUNCTIONAL_ON_FAIL',
+ 'dynamic-sensors' : '-DFEATURE_DYNAMIC_SENSORS',
+ 'dynamic-sensors-write' : '-DFEATURE_DYNAMIC_SENSORS_WRITE',
+ 'entity-manager-decorators' : '-DUSING_ENTITY_MANAGER_DECORATORS',
+ 'hybrid-sensors' : '-DFEATURE_HYBRID_SENSORS',
+ 'sensors-cache' : '-DFEATURE_SENSORS_CACHE',
+ 'dynamic-storages-only' : '-DFEATURE_DYNAMIC_STORAGES_ONLY',
}
foreach option_key, option_value : feature_map
- if(get_option(option_key).allowed())
- summary(option_key,option_value, section : 'Enabled Features')
- add_project_arguments(option_value,language:'cpp')
- endif
+ if (get_option(option_key).allowed())
+ summary(option_key, option_value, section: 'Enabled Features')
+ add_project_arguments(option_value, language: 'cpp')
+ endif
endforeach
add_project_arguments(
- cpp.get_supported_arguments([
- '-Wno-psabi',
- '-Wno-missing-field-initializers',
- '-Wno-pedantic',
- '-Wno-non-virtual-dtor'
- ]),
- language: 'cpp')
+ cpp.get_supported_arguments(
+ [
+ '-Wno-psabi',
+ '-Wno-missing-field-initializers',
+ '-Wno-pedantic',
+ '-Wno-non-virtual-dtor',
+ ],
+ ),
+ language: 'cpp',
+)
# Dependencies
-boost = dependency(
- 'boost',
- modules: [
- 'coroutine',
- ],
- required : false,
-)
+boost = dependency('boost', modules: ['coroutine'], required: false)
if not boost.found()
- cmake = import('cmake')
- opt = cmake.subproject_options()
- opt.add_cmake_defines({
- 'BOOST_INCLUDE_LIBRARIES': 'asio;bimap;callable_traits;context;coroutine;interprocess;multiprecision;process',
- 'CMAKE_POSITION_INDEPENDENT_CODE': true
- })
- boost_cmake = cmake.subproject('boost', required: true, options: opt)
- boost_asio = boost_cmake.dependency('boost_asio').as_system()
- boost_bimap = boost_cmake.dependency('boost_bimap').as_system()
- boost_callable_traits = boost_cmake.dependency('boost_callable_traits').as_system()
- boost_context = boost_cmake.dependency('boost_context').as_system()
- boost_coroutine = boost_cmake.dependency('boost_coroutine').as_system()
- boost_interprocess = boost_cmake.dependency('boost_interprocess').as_system()
- boost_multiprecision = boost_cmake.dependency('boost_multiprecision').as_system()
- boost_process = boost_cmake.dependency('boost_process').as_system()
- boost = [boost_asio, boost_bimap, boost_callable_traits, boost_context, boost_coroutine, boost_interprocess, boost_multiprecision, boost_process]
+ cmake = import('cmake')
+ opt = cmake.subproject_options()
+ opt.add_cmake_defines(
+ {
+ 'BOOST_INCLUDE_LIBRARIES': 'asio;bimap;callable_traits;context;coroutine;interprocess;multiprecision;process',
+ 'CMAKE_POSITION_INDEPENDENT_CODE': true,
+ },
+ )
+ boost_cmake = cmake.subproject('boost', required: true, options: opt)
+ boost_asio = boost_cmake.dependency('boost_asio').as_system()
+ boost_bimap = boost_cmake.dependency('boost_bimap').as_system()
+ boost_callable_traits = boost_cmake.dependency('boost_callable_traits').as_system()
+ boost_context = boost_cmake.dependency('boost_context').as_system()
+ boost_coroutine = boost_cmake.dependency('boost_coroutine').as_system()
+ boost_interprocess = boost_cmake.dependency('boost_interprocess').as_system()
+ boost_multiprecision = boost_cmake.dependency('boost_multiprecision').as_system()
+ boost_process = boost_cmake.dependency('boost_process').as_system()
+ boost = [
+ boost_asio,
+ boost_bimap,
+ boost_callable_traits,
+ boost_context,
+ boost_coroutine,
+ boost_interprocess,
+ boost_multiprecision,
+ boost_process,
+ ]
endif
phosphor_logging_dep = dependency('phosphor-logging')
phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
sdeventplus_dep = dependency('sdeventplus')
libsystemd_dep = dependency('libsystemd')
-crypto = dependency('libcrypto', version : '>=1.0.2g')
+crypto = dependency('libcrypto', version: '>=1.0.2g')
pam = cpp.find_library('pam', required: true)
sdbusplus_dep = dependency('sdbusplus')
stdplus_dep = dependency('stdplus')
@@ -157,169 +178,180 @@
subdir('scripts')
if not get_option('softoff').disabled()
- subdir('xyz/openbmc_project/Ipmi/Internal/SoftPowerOff')
- subdir('softoff')
+ subdir('xyz/openbmc_project/Ipmi/Internal/SoftPowerOff')
+ subdir('softoff')
endif
# whitelist
if not get_option('ipmi-whitelist').disabled()
- generate_whitelist_script = files('generate_whitelist_create.sh')
+ generate_whitelist_script = files('generate_whitelist_create.sh')
- whitelist_conf = get_option('whitelist-conf')
- ipmiwhitelist = run_command( \
- 'bash', \
- generate_whitelist_script, \
- whitelist_conf)
+ whitelist_conf = get_option('whitelist-conf')
+ ipmiwhitelist = run_command( \
+ 'bash', \
+ generate_whitelist_script, \
+ whitelist_conf,
+ )
- whitelist_pre = declare_dependency(
- include_directories: root_inc,
- dependencies: [
- crypto,
- ipmid_dep,
- phosphor_dbus_interfaces_dep,
- phosphor_logging_dep,
- sdbusplus_dep,
- ],
- )
+ whitelist_pre = declare_dependency(
+ include_directories: root_inc,
+ dependencies: [
+ crypto,
+ ipmid_dep,
+ phosphor_dbus_interfaces_dep,
+ phosphor_logging_dep,
+ sdbusplus_dep,
+ ],
+ )
- whitelist_lib = library(
- 'whitelist',
- 'whitelist-filter.cpp',
- 'ipmiwhitelist.cpp',
- implicit_include_directories: false,
- dependencies: whitelist_pre,
- version: meson.project_version(),
- override_options: ['b_lundef=false'],
- install: true,
- install_dir: get_option('libdir') / 'ipmid-providers')
+ whitelist_lib = library(
+ 'whitelist',
+ 'whitelist-filter.cpp',
+ 'ipmiwhitelist.cpp',
+ implicit_include_directories: false,
+ dependencies: whitelist_pre,
+ version: meson.project_version(),
+ override_options: ['b_lundef=false'],
+ install: true,
+ install_dir: get_option('libdir') / 'ipmid-providers',
+ )
endif
# libsysintfcmds
sysintfcmds_pre = declare_dependency(
- include_directories: root_inc,
- dependencies: [
- channellayer_dep,
- crypto,
- nlohmann_json_dep,
- phosphor_dbus_interfaces_dep,
- phosphor_logging_dep,
- sdbusplus_dep,
- ipmid_dep,
- ])
+ include_directories: root_inc,
+ dependencies: [
+ channellayer_dep,
+ crypto,
+ nlohmann_json_dep,
+ phosphor_dbus_interfaces_dep,
+ phosphor_logging_dep,
+ sdbusplus_dep,
+ ipmid_dep,
+ ],
+)
sysintfcmds_lib = library(
- 'sysintfcmds',
- 'systemintfcmds.cpp',
- 'host-interface.cpp',
- implicit_include_directories: false,
- dependencies: sysintfcmds_pre,
- version: meson.project_version(),
- override_options: ['b_lundef=false'],
- install: true,
- install_dir: get_option('libdir') / 'ipmid-providers')
+ 'sysintfcmds',
+ 'systemintfcmds.cpp',
+ 'host-interface.cpp',
+ implicit_include_directories: false,
+ dependencies: sysintfcmds_pre,
+ version: meson.project_version(),
+ override_options: ['b_lundef=false'],
+ install: true,
+ install_dir: get_option('libdir') / 'ipmid-providers',
+)
# ipmid
ipmid_pre = [
- sdbusplus_dep,
- stdplus_dep,
- phosphor_logging_dep,
- phosphor_dbus_interfaces_dep,
- boost,
- crypto,
- ipmid_dep,
- channellayer_dep,
+ sdbusplus_dep,
+ stdplus_dep,
+ phosphor_logging_dep,
+ phosphor_dbus_interfaces_dep,
+ boost,
+ crypto,
+ ipmid_dep,
+ channellayer_dep,
]
transportoem_src = []
if not get_option('transport-oem').disabled()
- transportoem_src = ['transporthandler_oem.cpp']
+ transportoem_src = ['transporthandler_oem.cpp']
endif
storage_cmds_src = []
-if get_option('dynamic-sensors').disabled() and not get_option('dynamic-storages-only').disabled()
- storage_cmds_src = ['dbus-sdr/storagecommands.cpp', 'dbus-sdr/sdrutils.cpp']
+if get_option('dynamic-sensors').disabled() and not get_option(
+ 'dynamic-storages-only',
+).disabled()
+ storage_cmds_src = ['dbus-sdr/storagecommands.cpp', 'dbus-sdr/sdrutils.cpp']
endif
openpower_cmds_src = []
if get_option('open-power').allowed()
- openpower_cmds_src = [ 'storageaddsel.cpp' ]
+ openpower_cmds_src = ['storageaddsel.cpp']
endif
libipmi20_src = [
- 'app/channel.cpp',
- 'app/watchdog.cpp',
- 'app/watchdog_service.cpp',
- 'apphandler.cpp',
- 'sys_info_param.cpp',
- 'sensorhandler.cpp',
- 'storagehandler.cpp',
- 'chassishandler.cpp',
- 'dcmihandler.cpp',
- 'ipmisensor.cpp',
- 'transporthandler.cpp',
- 'globalhandler.cpp',
- 'groupext.cpp',
- 'selutility.cpp',
- 'ipmi_fru_info_area.cpp',
- 'read_fru_data.cpp',
- 'sensordatahandler.cpp',
- 'user_channel/channelcommands.cpp',
- generated_src,
- transportoem_src,
- storage_cmds_src,
- openpower_cmds_src,
- conf_h,
+ 'app/channel.cpp',
+ 'app/watchdog.cpp',
+ 'app/watchdog_service.cpp',
+ 'apphandler.cpp',
+ 'sys_info_param.cpp',
+ 'sensorhandler.cpp',
+ 'storagehandler.cpp',
+ 'chassishandler.cpp',
+ 'dcmihandler.cpp',
+ 'ipmisensor.cpp',
+ 'transporthandler.cpp',
+ 'globalhandler.cpp',
+ 'groupext.cpp',
+ 'selutility.cpp',
+ 'ipmi_fru_info_area.cpp',
+ 'read_fru_data.cpp',
+ 'sensordatahandler.cpp',
+ 'user_channel/channelcommands.cpp',
+ generated_src,
+ transportoem_src,
+ storage_cmds_src,
+ openpower_cmds_src,
+ conf_h,
]
ipmi20_lib = library(
- 'ipmi20',
- libipmi20_src,
- dependencies: [ipmid_pre, nlohmann_json_dep],
- include_directories: root_inc,
- install: true,
- install_dir: get_option('libdir') / 'ipmid-providers',
- version: meson.project_version(),
- override_options: ['b_lundef=false'])
+ 'ipmi20',
+ libipmi20_src,
+ dependencies: [ipmid_pre, nlohmann_json_dep],
+ include_directories: root_inc,
+ install: true,
+ install_dir: get_option('libdir') / 'ipmid-providers',
+ version: meson.project_version(),
+ override_options: ['b_lundef=false'],
+)
libipmi20_dep = declare_dependency(
- dependencies: ipmid_pre,
- include_directories: root_inc,
- link_with: ipmi20_lib)
+ dependencies: ipmid_pre,
+ include_directories: root_inc,
+ link_with: ipmi20_lib,
+)
# ipmid binary
executable(
- 'ipmid',
- 'ipmid-new.cpp',
- 'host-cmd-manager.cpp',
- 'settings.cpp',
- implicit_include_directories: false,
- dependencies: [libipmi20_dep],
- include_directories: root_inc,
- export_dynamic: true,
- install: true,
- install_dir: get_option('bindir'))
+ 'ipmid',
+ 'ipmid-new.cpp',
+ 'host-cmd-manager.cpp',
+ 'settings.cpp',
+ implicit_include_directories: false,
+ dependencies: [libipmi20_dep],
+ include_directories: root_inc,
+ export_dynamic: true,
+ install: true,
+ install_dir: get_option('bindir'),
+)
# Dynamic Sensor Stack
subdir('dbus-sdr')
if not get_option('dynamic-sensors').disabled() or not get_option('tests').disabled()
- library(
- 'dynamiccmds',
- dbus_sdr_src,
- implicit_include_directories: false,
- dependencies: dbus_sdr_pre,
- version: meson.project_version(),
- override_options: ['b_lundef=false'],
- install: true,
- install_dir: get_option('libdir') / 'ipmid-providers')
+ library(
+ 'dynamiccmds',
+ dbus_sdr_src,
+ implicit_include_directories: false,
+ dependencies: dbus_sdr_pre,
+ version: meson.project_version(),
+ override_options: ['b_lundef=false'],
+ install: true,
+ install_dir: get_option('libdir') / 'ipmid-providers',
+ )
endif
if not get_option('tests').disabled()
- subdir('test')
+ subdir('test')
endif
install_subdir(
- 'user_channel',
- install_dir: get_option('includedir'),
- strip_directory: false,
- exclude_files: '*.cpp')
+ 'user_channel',
+ install_dir: get_option('includedir'),
+ strip_directory: false,
+ exclude_files: '*.cpp',
+)
diff --git a/meson.options b/meson.options
index fff1651..6d75e73 100644
--- a/meson.options
+++ b/meson.options
@@ -1,82 +1,245 @@
option('tests', type: 'feature', description: 'Build tests')
-option('boot-flag-safe-mode-support', type: 'feature', description: 'Add option to enable/disable safe mode in boot flags')
-option('i2c-whitelist-check', type: 'feature', description: 'Add option to enable/disable i2c master write read command white list checking')
+option(
+ 'boot-flag-safe-mode-support',
+ type: 'feature',
+ description: 'Add option to enable/disable safe mode in boot flags',
+)
+option(
+ 'i2c-whitelist-check',
+ type: 'feature',
+ description: 'Add option to enable/disable i2c master write read command white list checking',
+)
# SoftPowerOff
option('softoff', type: 'feature', description: 'Builds soft power off')
-option('softoff-busname', type: 'string', value: 'xyz.openbmc_project.Ipmi.Internal.SoftPowerOff', description: 'The Dbus busname to own for SoftPowerOff')
-option('softoff-objpath', type: 'string', value: '/xyz/openbmc_project/ipmi/internal/soft_power_off', description: 'The SoftPowerOff Dbus root')
-option('ipmi-sms-atn-ack-timeout-secs', type: 'integer', value: 3, description: 'Timeout for host to ack and query SMS_ATN from BMC')
-option('ipmi-host-shutdown-complete-timeout-secs', type: 'integer', value: 2700, description: 'Wait time for host to shutdown')
+option(
+ 'softoff-busname',
+ type: 'string',
+ value: 'xyz.openbmc_project.Ipmi.Internal.SoftPowerOff',
+ description: 'The Dbus busname to own for SoftPowerOff',
+)
+option(
+ 'softoff-objpath',
+ type: 'string',
+ value: '/xyz/openbmc_project/ipmi/internal/soft_power_off',
+ description: 'The SoftPowerOff Dbus root',
+)
+option(
+ 'ipmi-sms-atn-ack-timeout-secs',
+ type: 'integer',
+ value: 3,
+ description: 'Timeout for host to ack and query SMS_ATN from BMC',
+)
+option(
+ 'ipmi-host-shutdown-complete-timeout-secs',
+ type: 'integer',
+ value: 2700,
+ description: 'Wait time for host to shutdown',
+)
# Indicates an in-band power off or reboot request from the host
# This file is used to ensure the soft off service does not run for host
# initiated shutdown or reboot requests
-option('host-inband-request-dir', type: 'string', value: '/run/openbmc/', description: 'Directory to store host initiated shutdown file')
-option('host-inband-request-file', type: 'string', value: 'host@%u-request', description: 'File to create if host has initiated shutdown or reboot')
+option(
+ 'host-inband-request-dir',
+ type: 'string',
+ value: '/run/openbmc/',
+ description: 'Directory to store host initiated shutdown file',
+)
+option(
+ 'host-inband-request-file',
+ type: 'string',
+ value: 'host@%u-request',
+ description: 'File to create if host has initiated shutdown or reboot',
+)
# Config Variables
-option('board-sensor', type: 'string', value: '/xyz/openbmc_project/inventory/system/chassis/motherboard', description: 'The inventory path to the motherboard fault sensor')
-option('system-sensor', type: 'string', value: '/xyz/openbmc_project/inventory/system', description: 'The inventory path to the system event sensor')
+option(
+ 'board-sensor',
+ type: 'string',
+ value: '/xyz/openbmc_project/inventory/system/chassis/motherboard',
+ description: 'The inventory path to the motherboard fault sensor',
+)
+option(
+ 'system-sensor',
+ type: 'string',
+ value: '/xyz/openbmc_project/inventory/system',
+ description: 'The inventory path to the system event sensor',
+)
# Control Host Interfaces
-option('control-host-busname', type: 'string', value: 'xyz.openbmc_project.Control.Host', description: 'The Control Host Dbus busname to own')
-option('control-host-obj-mgr', type: 'string', value: '/xyz/openbmc_project/control', description: 'The Control Host D-Bus Object Manager')
-option('host-name', type: 'string', value: 'host', description: 'The Control Host D-Bus Object Manager')
+option(
+ 'control-host-busname',
+ type: 'string',
+ value: 'xyz.openbmc_project.Control.Host',
+ description: 'The Control Host Dbus busname to own',
+)
+option(
+ 'control-host-obj-mgr',
+ type: 'string',
+ value: '/xyz/openbmc_project/control',
+ description: 'The Control Host D-Bus Object Manager',
+)
+option(
+ 'host-name',
+ type: 'string',
+ value: 'host',
+ description: 'The Control Host D-Bus Object Manager',
+)
# Power reading sensor configuration file
-option('power-reading-sensor', type: 'string', value: '/usr/share/ipmi-providers/power_reading.json', description: 'Power reading sensor configuration file')
-option('host-ipmi-lib-path', type: 'string', value: '/usr/lib/ipmid-providers/', description: 'The file path to search for libraries')
+option(
+ 'power-reading-sensor',
+ type: 'string',
+ value: '/usr/share/ipmi-providers/power_reading.json',
+ description: 'Power reading sensor configuration file',
+)
+option(
+ 'host-ipmi-lib-path',
+ type: 'string',
+ value: '/usr/lib/ipmid-providers/',
+ description: 'The file path to search for libraries',
+)
# When a sensor read fails, hwmon will update the OperationalState interface's Functional property.
# This will mark the sensor as not functional and we will skip reading from that sensor.
-option('update-functional-on-fail', type: 'feature', value: 'disabled', description: 'Check functional property to skip reading from faulty sensors')
+option(
+ 'update-functional-on-fail',
+ type: 'feature',
+ value: 'disabled',
+ description: 'Check functional property to skip reading from faulty sensors',
+)
# Features
# When libuserlayer is disabled, libuserlayer won't be included in the build.
-option('libuserlayer', type: 'feature', description: 'Option to exclue exclude libuserlayer')
+option(
+ 'libuserlayer',
+ type: 'feature',
+ description: 'Option to exclue exclude libuserlayer',
+)
# When transport-oem is enabled, the transporthandler_oem.cpp contents
# are compiled and added to the project. The transporthandler_oem.cpp file is
# copied from your own customization layer in the
# phosphor-ipmi-host_%.bbappend file. It is not necessary to create this file
# unless OEM Parameter extensions are required.
-option('transport-oem', type: 'feature', value: 'disabled', description: 'Enable transporthandler_oem contents')
+option(
+ 'transport-oem',
+ type: 'feature',
+ value: 'disabled',
+ description: 'Enable transporthandler_oem contents',
+)
# IPMI whitelist mechanism is not needed by everyone; offer a way to disable it
-option('ipmi-whitelist', type: 'feature', description: 'Enable/disable IPMI whitelist filtering')
-option('whitelist-conf', type: 'string', value: 'host-ipmid-whitelist.conf', description: 'Paths to IPMI whitelisted commands conf files')
+option(
+ 'ipmi-whitelist',
+ type: 'feature',
+ description: 'Enable/disable IPMI whitelist filtering',
+)
+option(
+ 'whitelist-conf',
+ type: 'string',
+ value: 'host-ipmid-whitelist.conf',
+ description: 'Paths to IPMI whitelisted commands conf files',
+)
# Entity Manager Decorators
-option('entity-manager-decorators', type: 'feature', value: 'enabled', description: 'The Entity Manager Decorators flag is enabled by default; offer a way to disable it')
+option(
+ 'entity-manager-decorators',
+ type: 'feature',
+ value: 'enabled',
+ description: 'The Entity Manager Decorators flag is enabled by default; offer a way to disable it',
+)
# Dynamic Sensor Stack
-option('dynamic-sensors', type: 'feature', value: 'disabled', description: 'Dynamic sensors stack is enabled by default; offer a way to disable it')
-option('dynamic-sensors-write', type: 'feature', value: 'disabled', description: 'Dynamic sensors stack is enabled by default; offer a way to disable it')
-option('hybrid-sensors', type: 'feature', value: 'disabled', description: 'Hybrid sensors stack is disabled by default; offer a way to enable it')
-option('sensors-oem', type: 'feature', value: 'disabled', description: 'OEM sensor SDR parsing is disabled by default; offer a way to enable it')
+option(
+ 'dynamic-sensors',
+ type: 'feature',
+ value: 'disabled',
+ description: 'Dynamic sensors stack is enabled by default; offer a way to disable it',
+)
+option(
+ 'dynamic-sensors-write',
+ type: 'feature',
+ value: 'disabled',
+ description: 'Dynamic sensors stack is enabled by default; offer a way to disable it',
+)
+option(
+ 'hybrid-sensors',
+ type: 'feature',
+ value: 'disabled',
+ description: 'Hybrid sensors stack is disabled by default; offer a way to enable it',
+)
+option(
+ 'sensors-oem',
+ type: 'feature',
+ value: 'disabled',
+ description: 'OEM sensor SDR parsing is disabled by default; offer a way to enable it',
+)
# Sensor Cache
-option('sensors-cache', type: 'feature', value: 'disabled', description: 'Sensor cache stack is disabled by default; offer a way to enable it')
+option(
+ 'sensors-cache',
+ type: 'feature',
+ value: 'disabled',
+ description: 'Sensor cache stack is disabled by default; offer a way to enable it',
+)
# Short Sensor Names for IPMI
-option('shortname-remove-suffix', type: 'feature', value: 'enabled', description: 'shortname-remove-suffix is enabled by default')
-option('shortname-replace-words', type: 'feature', value: 'disabled', description: 'shortname-replace-words is disabled by default')
+option(
+ 'shortname-remove-suffix',
+ type: 'feature',
+ value: 'enabled',
+ description: 'shortname-remove-suffix is enabled by default',
+)
+option(
+ 'shortname-replace-words',
+ type: 'feature',
+ value: 'disabled',
+ description: 'shortname-replace-words is disabled by default',
+)
# Generate configuration from Yaml
option('sensor-yaml-gen', type: 'string', value: 'sensor-example.yaml')
-option('invsensor-yaml-gen', type: 'string', value: 'inventory-sensor-example.yaml')
+option(
+ 'invsensor-yaml-gen',
+ type: 'string',
+ value: 'inventory-sensor-example.yaml',
+)
option('fru-yaml-gen', type: 'string', value: 'fru-read-example.yaml')
# Software Version
-option('get-dbus-active-software', type: 'feature', description: 'Use the getActiveSoftwareVersionInfo for the BMC version and dev_id.json as backup')
-option('fw-ver-regex', type : 'string', value : '(\\\\d+)\\\\.(\\\\d+)', description : 'Regular expressions for parsing firmware revision')
-option('matches-map', type : 'array', value : ['1', '2', '0', '0', '0', '0'], description : 'An array of integers')
+option(
+ 'get-dbus-active-software',
+ type: 'feature',
+ description: 'Use the getActiveSoftwareVersionInfo for the BMC version and dev_id.json as backup',
+)
+option(
+ 'fw-ver-regex',
+ type: 'string',
+ value: '(\\\\d+)\\\\.(\\\\d+)',
+ description: 'Regular expressions for parsing firmware revision',
+)
+option(
+ 'matches-map',
+ type: 'array',
+ value: ['1', '2', '0', '0', '0', '0'],
+ description: 'An array of integers',
+)
# libipmi20.so library
-option('dynamic-storages-only', type: 'feature', value: 'disabled', description: 'Request to compile storage commands in the libipmi20 library')
+option(
+ 'dynamic-storages-only',
+ type: 'feature',
+ value: 'disabled',
+ description: 'Request to compile storage commands in the libipmi20 library',
+)
# open-power specific functionality.
-option('open-power', type: 'feature', description: 'Support open-power specific functions')
+option(
+ 'open-power',
+ type: 'feature',
+ description: 'Support open-power specific functions',
+)
diff --git a/scripts/meson.build b/scripts/meson.build
index b739e6f..c5fcae5 100644
--- a/scripts/meson.build
+++ b/scripts/meson.build
@@ -1,40 +1,49 @@
# Generate Configuration Files from Yaml
python_exe = find_program('python3', 'python')
-sensor_gen = custom_target('sensor-gen',
+sensor_gen = custom_target(
+ 'sensor-gen',
output: 'sensor-gen.cpp',
- input: [ 'sensor_gen.py', get_option('sensor-yaml-gen')],
+ input: ['sensor_gen.py', get_option('sensor-yaml-gen')],
command: [
python_exe,
'@INPUT0@',
- '-i', '@INPUT1@',
- '-o', meson.current_build_dir(),
+ '-i',
+ '@INPUT1@',
+ '-o',
+ meson.current_build_dir(),
'generate-cpp',
],
)
generated_src += sensor_gen
-invsensor_gen = custom_target('invsensor-gen',
+invsensor_gen = custom_target(
+ 'invsensor-gen',
output: 'inventory-sensor-gen.cpp',
- input: [ 'inventory-sensor.py', get_option('invsensor-yaml-gen')],
+ input: ['inventory-sensor.py', get_option('invsensor-yaml-gen')],
command: [
python_exe,
'@INPUT0@',
- '-i', '@INPUT1@',
- '-o', meson.current_build_dir(),
+ '-i',
+ '@INPUT1@',
+ '-o',
+ meson.current_build_dir(),
'generate-cpp',
],
)
generated_src += invsensor_gen
-fru_gen = custom_target('fru-gen',
+fru_gen = custom_target(
+ 'fru-gen',
output: 'fru-read-gen.cpp',
- input: [ 'fru_gen.py', get_option('fru-yaml-gen') ],
+ input: ['fru_gen.py', get_option('fru-yaml-gen')],
command: [
python_exe,
'@INPUT0@',
- '-i', '@INPUT1@',
- '-o', meson.current_build_dir(),
+ '-i',
+ '@INPUT1@',
+ '-o',
+ meson.current_build_dir(),
'generate-cpp',
],
)
diff --git a/softoff/meson.build b/softoff/meson.build
index 1d52b8e..a723c51 100644
--- a/softoff/meson.build
+++ b/softoff/meson.build
@@ -1,31 +1,34 @@
softpower_pre = [
- boost,
- ipmid_dep,
- libsystemd_dep,
- phosphor_dbus_interfaces_dep,
- phosphor_logging_dep,
- sdbusplus_dep,
- sdeventplus_dep,
- softoff_dbus,
+ boost,
+ ipmid_dep,
+ libsystemd_dep,
+ phosphor_dbus_interfaces_dep,
+ phosphor_logging_dep,
+ sdbusplus_dep,
+ sdeventplus_dep,
+ softoff_dbus,
]
softpower_lib = static_library(
- 'softpower_lib',
- 'softoff.cpp',
- conf_h,
- dependencies: softpower_pre,
- include_directories: root_inc)
+ 'softpower_lib',
+ 'softoff.cpp',
+ conf_h,
+ dependencies: softpower_pre,
+ include_directories: root_inc,
+)
softpower_dep = declare_dependency(
- dependencies: softpower_pre,
- include_directories: root_inc,
- link_with: softpower_lib)
+ dependencies: softpower_pre,
+ include_directories: root_inc,
+ link_with: softpower_lib,
+)
executable(
- 'phosphor-softpoweroff',
- 'mainapp.cpp',
- implicit_include_directories: false,
- dependencies: softpower_dep,
- include_directories: root_inc,
- install: true,
- install_dir: get_option('bindir'))
+ 'phosphor-softpoweroff',
+ 'mainapp.cpp',
+ implicit_include_directories: false,
+ dependencies: softpower_dep,
+ include_directories: root_inc,
+ install: true,
+ install_dir: get_option('bindir'),
+)
diff --git a/test/meson.build b/test/meson.build
index 607e2a0..949a121 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,40 +1,44 @@
gtest = dependency('gtest', main: true, disabler: true, required: false)
gmock = dependency('gmock', disabler: true, required: false)
if not gtest.found() or not gmock.found()
- gtest_opts = import('cmake').subproject_options()
- gtest_opts.add_cmake_defines({'CMAKE_CXX_FLAGS': '-Wno-pedantic'})
- gtest_proj = import('cmake').subproject(
- 'googletest',
- options: gtest_opts,
- required: false)
- if gtest_proj.found()
- gtest = declare_dependency(
- dependencies: [
- dependency('threads'),
- gtest_proj.dependency('gtest'),
- gtest_proj.dependency('gtest_main'),
- ])
- gmock = gtest_proj.dependency('gmock')
- else
- assert(not get_option('tests').enabled(), 'Googletest is required')
- endif
+ gtest_opts = import('cmake').subproject_options()
+ gtest_opts.add_cmake_defines({'CMAKE_CXX_FLAGS': '-Wno-pedantic'})
+ gtest_proj = import('cmake').subproject(
+ 'googletest',
+ options: gtest_opts,
+ required: false,
+ )
+ if gtest_proj.found()
+ gtest = declare_dependency(
+ dependencies: [
+ dependency('threads'),
+ gtest_proj.dependency('gtest'),
+ gtest_proj.dependency('gtest_main'),
+ ],
+ )
+ gmock = gtest_proj.dependency('gmock')
+ else
+ assert(not get_option('tests').enabled(), 'Googletest is required')
+ endif
endif
-test('entitymap_json',
- executable(
+test(
'entitymap_json',
- 'entitymap_json_unittest.cpp',
- include_directories: root_inc,
- build_by_default: false,
- implicit_include_directories: false,
- dependencies: [
- entity_map_json_dep,
- gmock,
- gtest,
- nlohmann_json_dep,
- sdbusplus_dep,
- ]
- ))
+ executable(
+ 'entitymap_json',
+ 'entitymap_json_unittest.cpp',
+ include_directories: root_inc,
+ build_by_default: false,
+ implicit_include_directories: false,
+ dependencies: [
+ entity_map_json_dep,
+ gmock,
+ gtest,
+ nlohmann_json_dep,
+ sdbusplus_dep,
+ ],
+ ),
+)
# Build/add oemrouter_unittest to test suite
# Issue #3325
@@ -49,45 +53,51 @@
# ))
# Build/add message packing/unpacking unit tests
-test('message',
- executable(
+test(
'message',
- 'message/pack.cpp',
- 'message/payload.cpp',
- 'message/unpack.cpp',
- include_directories: root_inc,
- build_by_default: false,
- override_options: ['b_lundef=true'],
- implicit_include_directories: false,
- dependencies: [
- boost,
- crypto,
- gmock,
- gtest,
- libsystemd_dep,
- phosphor_logging_dep,
- sdbusplus_dep,
- ]
- ))
+ executable(
+ 'message',
+ 'message/pack.cpp',
+ 'message/payload.cpp',
+ 'message/unpack.cpp',
+ include_directories: root_inc,
+ build_by_default: false,
+ override_options: ['b_lundef=true'],
+ implicit_include_directories: false,
+ dependencies: [
+ boost,
+ crypto,
+ gmock,
+ gtest,
+ libsystemd_dep,
+ phosphor_logging_dep,
+ sdbusplus_dep,
+ ],
+ ),
+)
# Build/add closesession_unittest to test suite
-test('session/closesession',
- executable(
- 'session_closesession',
- 'session/closesession_unittest.cpp',
- include_directories: root_inc,
- build_by_default: false,
- implicit_include_directories: false,
- dependencies: [gtest, gmock]
- ))
+test(
+ 'session/closesession',
+ executable(
+ 'session_closesession',
+ 'session/closesession_unittest.cpp',
+ include_directories: root_inc,
+ build_by_default: false,
+ implicit_include_directories: false,
+ dependencies: [gtest, gmock],
+ ),
+)
# Build/add sensorcommands_unittest to test suite
-test('dbus-sdr/sensorcommands',
- executable(
- 'dbus-sdr_sensorcommands',
- 'dbus-sdr/sensorcommands_unittest.cpp',
- include_directories: root_inc,
- build_by_default: false,
- implicit_include_directories: false,
- dependencies: [sensorutils_dep, gtest, gmock]
- ))
+test(
+ 'dbus-sdr/sensorcommands',
+ executable(
+ 'dbus-sdr_sensorcommands',
+ 'dbus-sdr/sensorcommands_unittest.cpp',
+ include_directories: root_inc,
+ build_by_default: false,
+ implicit_include_directories: false,
+ dependencies: [sensorutils_dep, gtest, gmock],
+ ),
+)
diff --git a/user_channel/meson.build b/user_channel/meson.build
index a18ed06..b47b27c 100644
--- a/user_channel/meson.build
+++ b/user_channel/meson.build
@@ -1,99 +1,101 @@
user_channel_inc = include_directories('.')
channellayer_pre = declare_dependency(
- include_directories: [root_inc, user_channel_inc],
- dependencies: [
- crypto,
- ipmid_dep,
- libsystemd_dep,
- nlohmann_json_dep,
- phosphor_dbus_interfaces_dep,
- phosphor_logging_dep,
- ])
-
-channellayer_src = [
- 'channel_layer.cpp',
- 'channel_mgmt.cpp',
- 'cipher_mgmt.cpp',
-]
-
-channellayer_lib = library(
- 'channellayer',
- channellayer_src,
- implicit_include_directories: false,
- dependencies: channellayer_pre,
- version: meson.project_version(),
- install: true,
- install_dir: get_option('libdir'),
- override_options: ['b_lundef=false'])
-
-channellayer_dep = declare_dependency(
- link_with: channellayer_lib,
- dependencies: channellayer_pre)
-
-import('pkgconfig').generate(
- channellayer_lib,
- name: 'libchannellayer',
- version: meson.project_version(),
- description: 'libchannellayer')
-
-if not get_option('libuserlayer').disabled()
- userlayer_pre = declare_dependency(
include_directories: [root_inc, user_channel_inc],
dependencies: [
- channellayer_dep,
- crypto,
- ipmid_dep,
- libsystemd_dep,
- nlohmann_json_dep,
- pam,
- phosphor_dbus_interfaces_dep,
- phosphor_logging_dep,
- ])
+ crypto,
+ ipmid_dep,
+ libsystemd_dep,
+ nlohmann_json_dep,
+ phosphor_dbus_interfaces_dep,
+ phosphor_logging_dep,
+ ],
+)
- userlayer_src = [
- 'user_layer.cpp',
- 'user_mgmt.cpp',
- 'passwd_mgr.cpp',
- ]
+channellayer_src = ['channel_layer.cpp', 'channel_mgmt.cpp', 'cipher_mgmt.cpp']
- userlayer_lib = library(
- 'userlayer',
- userlayer_src,
+channellayer_lib = library(
+ 'channellayer',
+ channellayer_src,
implicit_include_directories: false,
- dependencies: userlayer_pre,
+ dependencies: channellayer_pre,
version: meson.project_version(),
install: true,
install_dir: get_option('libdir'),
- override_options: ['b_lundef=false'])
+ override_options: ['b_lundef=false'],
+)
- userlayer_dep = declare_dependency(
- link_with: userlayer_lib,
- dependencies: userlayer_pre)
+channellayer_dep = declare_dependency(
+ link_with: channellayer_lib,
+ dependencies: channellayer_pre,
+)
- usercmds_pre = declare_dependency(
- include_directories: [root_inc, user_channel_inc],
- dependencies: [
- phosphor_logging_dep,
- ipmid_dep,
- userlayer_dep,
- channellayer_dep,
- ])
-
- usercmds_lib = library(
- 'usercmds',
- 'usercommands.cpp',
- implicit_include_directories: false,
- dependencies: usercmds_pre,
- install: true,
- install_dir: get_option('libdir') / 'ipmid-providers',
+import('pkgconfig').generate(
+ channellayer_lib,
+ name: 'libchannellayer',
version: meson.project_version(),
- override_options: ['b_lundef=false'])
+ description: 'libchannellayer',
+)
- import('pkgconfig').generate(
- userlayer_lib,
- name: 'libuserlayer',
- version: meson.project_version(),
- description: 'libuserlayer')
+if not get_option('libuserlayer').disabled()
+ userlayer_pre = declare_dependency(
+ include_directories: [root_inc, user_channel_inc],
+ dependencies: [
+ channellayer_dep,
+ crypto,
+ ipmid_dep,
+ libsystemd_dep,
+ nlohmann_json_dep,
+ pam,
+ phosphor_dbus_interfaces_dep,
+ phosphor_logging_dep,
+ ],
+ )
+
+ userlayer_src = ['user_layer.cpp', 'user_mgmt.cpp', 'passwd_mgr.cpp']
+
+ userlayer_lib = library(
+ 'userlayer',
+ userlayer_src,
+ implicit_include_directories: false,
+ dependencies: userlayer_pre,
+ version: meson.project_version(),
+ install: true,
+ install_dir: get_option('libdir'),
+ override_options: ['b_lundef=false'],
+ )
+
+ userlayer_dep = declare_dependency(
+ link_with: userlayer_lib,
+ dependencies: userlayer_pre,
+ )
+
+ usercmds_pre = declare_dependency(
+ include_directories: [root_inc, user_channel_inc],
+ dependencies: [
+ phosphor_logging_dep,
+ ipmid_dep,
+ userlayer_dep,
+ channellayer_dep,
+ ],
+ )
+
+ usercmds_lib = library(
+ 'usercmds',
+ 'usercommands.cpp',
+ implicit_include_directories: false,
+ dependencies: usercmds_pre,
+ install: true,
+ install_dir: get_option('libdir') / 'ipmid-providers',
+ version: meson.project_version(),
+ override_options: ['b_lundef=false'],
+ )
+
+ import('pkgconfig').generate(
+ userlayer_lib,
+ name: 'libuserlayer',
+ version: meson.project_version(),
+ description: 'libuserlayer',
+ )
endif
diff --git a/xyz/openbmc_project/Ipmi/Internal/SoftPowerOff/meson.build b/xyz/openbmc_project/Ipmi/Internal/SoftPowerOff/meson.build
index 6168e73..56c2019 100644
--- a/xyz/openbmc_project/Ipmi/Internal/SoftPowerOff/meson.build
+++ b/xyz/openbmc_project/Ipmi/Internal/SoftPowerOff/meson.build
@@ -4,64 +4,66 @@
if_yaml_file = files('../SoftPowerOff.interface.yaml')
if_cpp = custom_target(
- 'server.cpp',
- output: 'server.cpp',
- input: if_yaml_file,
- capture: true,
- command: [sdbuspp_prog, '-r', root, 'interface', 'server-cpp', domain])
+ 'server.cpp',
+ output: 'server.cpp',
+ input: if_yaml_file,
+ capture: true,
+ command: [sdbuspp_prog, '-r', root, 'interface', 'server-cpp', domain],
+)
if_hpp = custom_target(
- 'server.hpp',
- output: 'server.hpp',
- input: if_yaml_file,
- capture: true,
- command: [sdbuspp_prog, '-r', root, 'interface', 'server-header', domain],
- install: true,
- install_dir: get_option('includedir') / 'xyz/openbmc_project/Ipmi/Internal/SoftPowerOff')
+ 'server.hpp',
+ output: 'server.hpp',
+ input: if_yaml_file,
+ capture: true,
+ command: [sdbuspp_prog, '-r', root, 'interface', 'server-header', domain],
+ install: true,
+ install_dir: get_option('includedir') / 'xyz/openbmc_project/Ipmi/Internal/SoftPowerOff',
+)
if_common_hpp = custom_target(
- 'common.hpp',
- output: 'common.hpp',
- input: if_yaml_file,
- capture: true,
- command: [sdbuspp_prog, '-r', root, 'interface', 'common-header', domain],
- install: true,
- install_dir: get_option('includedir') / 'xyz/openbmc_project/Ipmi/Internal/SoftPowerOff')
+ 'common.hpp',
+ output: 'common.hpp',
+ input: if_yaml_file,
+ capture: true,
+ command: [sdbuspp_prog, '-r', root, 'interface', 'common-header', domain],
+ install: true,
+ install_dir: get_option('includedir') / 'xyz/openbmc_project/Ipmi/Internal/SoftPowerOff',
+)
softoff_dbus_deps = [
- dependency('phosphor-dbus-interfaces'),
- dependency('sdbusplus'),
+ dependency('phosphor-dbus-interfaces'),
+ dependency('sdbusplus'),
]
softoff_dbus_lib = library(
- 'softoff-dbus',
- [
- if_cpp,
- if_hpp,
- if_common_hpp,
- ],
- implicit_include_directories: false,
- include_directories: root_inc,
- version: meson.project_version(),
- dependencies: softoff_dbus_deps,
- override_options: ['b_lundef=false'],
- install: true)
+ 'softoff-dbus',
+ [if_cpp, if_hpp, if_common_hpp],
+ implicit_include_directories: false,
+ include_directories: root_inc,
+ version: meson.project_version(),
+ dependencies: softoff_dbus_deps,
+ override_options: ['b_lundef=false'],
+ install: true,
+)
softoff_dbus = declare_dependency(
- dependencies: softoff_dbus_deps,
- sources: [if_hpp, if_common_hpp],
- link_with: softoff_dbus_lib)
+ dependencies: softoff_dbus_deps,
+ sources: [if_hpp, if_common_hpp],
+ link_with: softoff_dbus_lib,
+)
softoff_dbus_reqs = []
foreach dep : softoff_dbus_deps
- if dep.type_name() == 'pkgconfig'
- softoff_dbus_reqs += dep
- endif
+ if dep.type_name() == 'pkgconfig'
+ softoff_dbus_reqs += dep
+ endif
endforeach
import('pkgconfig').generate(
- name: 'softoff-dbus',
- description: 'SoftPowerOff DBus Bindings',
- version: meson.project_version(),
- libraries: softoff_dbus,
- requires: softoff_dbus_reqs)
+ name: 'softoff-dbus',
+ description: 'SoftPowerOff DBus Bindings',
+ version: meson.project_version(),
+ libraries: softoff_dbus,
+ requires: softoff_dbus_reqs,
+)