1bb410df7SRamesh Iyyar# SPDX-License-Identifier: Apache-2.0 2bb410df7SRamesh Iyyar 357de251cSPatrick Williamsproject( 457de251cSPatrick Williams 'phosphor-debug-collector', 5bb410df7SRamesh Iyyar 'cpp', 6deed959eSPatrick Williams meson_version: '>=1.1.1', 7bb410df7SRamesh Iyyar default_options: [ 8deed959eSPatrick Williams 'cpp_std=c++23', 9bb410df7SRamesh Iyyar 'warning_level=3', 1001c66460SPriyangaRamasamy 'werror=true', 1157de251cSPatrick Williams 'buildtype=debugoptimized', 12bb410df7SRamesh Iyyar ], 13bb410df7SRamesh Iyyar version: '1.0', 1457de251cSPatrick Williams license: 'Apache-2.0', 15bb410df7SRamesh Iyyar) 16bb410df7SRamesh Iyyar 17abbe1593SPatrick Williamscpp = meson.get_compiler('cpp') 18abbe1593SPatrick Williams 199f557368SDhruvaraj Subhashchandran# list of unit files, the path as input and service name 209f557368SDhruvaraj Subhashchandran# as output 219f557368SDhruvaraj Subhashchandran# eg: unit_file += {'input:'<path>, 'output':<service name>} 229f557368SDhruvaraj Subhashchandranunit_files = [] 239f557368SDhruvaraj Subhashchandran 24bb410df7SRamesh Iyyar# Checking dependency external library 25bb410df7SRamesh Iyyar 26bb410df7SRamesh Iyyarlibsystemd = dependency('libsystemd', version: '>=221') 2773e0bab2SGeorge Liu 2802634e55SPatrick Williamssdbusplus_dep = dependency('sdbusplus') 2973e0bab2SGeorge Liusdbusplusplus_prog = find_program('sdbus++') 3073e0bab2SGeorge Liusdbuspp_gen_meson_prog = find_program('sdbus++-gen-meson') 313ed02c32SMarri Devender Raosdeventplus_dep = dependency('sdeventplus') 3202634e55SPatrick Williams 3302634e55SPatrick Williamsphosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces') 3402634e55SPatrick Williamsphosphor_logging_dep = dependency('phosphor-logging') 35bb410df7SRamesh Iyyar 3650646c2dSDhruvaraj Subhashchandran# nlohmann-json dependency 3750646c2dSDhruvaraj Subhashchandrannlohmann_json_dep = dependency('nlohmann_json', include_type: 'system') 3850646c2dSDhruvaraj Subhashchandran 39abbe1593SPatrick Williams# Get Cereal dependency. 40abbe1593SPatrick Williamscereal_dep = dependency('cereal', required: false) 41abbe1593SPatrick Williamshas_cereal = cpp.has_header_symbol( 42abbe1593SPatrick Williams 'cereal/cereal.hpp', 43abbe1593SPatrick Williams 'cereal::specialize', 44abbe1593SPatrick Williams dependencies: cereal_dep, 4557de251cSPatrick Williams required: false, 4657de251cSPatrick Williams) 47abbe1593SPatrick Williamsif not has_cereal 48abbe1593SPatrick Williams cereal_opts = import('cmake').subproject_options() 4957de251cSPatrick Williams cereal_opts.add_cmake_defines( 5057de251cSPatrick Williams {'BUILD_TESTS': 'OFF', 'SKIP_PERFORMANCE_COMPARISON': 'ON'}, 5157de251cSPatrick Williams ) 52abbe1593SPatrick Williams cereal_proj = import('cmake').subproject( 53abbe1593SPatrick Williams 'cereal', 54abbe1593SPatrick Williams options: cereal_opts, 5557de251cSPatrick Williams required: false, 5657de251cSPatrick Williams ) 57abbe1593SPatrick Williams assert(cereal_proj.found(), 'cereal is required') 58abbe1593SPatrick Williams cereal_dep = cereal_proj.dependency('cereal') 59abbe1593SPatrick Williamsendif 60abbe1593SPatrick Williams 6101c66460SPriyangaRamasamy# Disable FORTIFY_SOURCE when compiling with no optimization 6201c66460SPriyangaRamasamyif (get_option('optimization') == '0') 6301c66460SPriyangaRamasamy add_project_arguments('-U_FORTIFY_SOURCE', language: ['cpp', 'c']) 6401c66460SPriyangaRamasamy message('Disabling FORTIFY_SOURCE as optimization is set to 0') 6501c66460SPriyangaRamasamyendif 6601c66460SPriyangaRamasamy 67bb410df7SRamesh Iyyar# Configuration header file(config.h) generation 68bb410df7SRamesh Iyyar 69bb410df7SRamesh Iyyarconf_data = configuration_data() 70bb410df7SRamesh Iyyar 7157de251cSPatrick Williamsconf_data.set_quoted( 7257de251cSPatrick Williams 'DUMP_BUSNAME', 7357de251cSPatrick Williams get_option('DUMP_BUSNAME'), 7457de251cSPatrick Williams description: 'The Dbus busname to own', 75bb410df7SRamesh Iyyar) 7657de251cSPatrick Williamsconf_data.set_quoted( 7757de251cSPatrick Williams 'DUMP_OBJPATH', 7857de251cSPatrick Williams get_option('DUMP_OBJPATH'), 7957de251cSPatrick Williams description: 'The Dump manager Dbus root', 80bb410df7SRamesh Iyyar) 8157de251cSPatrick Williamsconf_data.set_quoted( 8257de251cSPatrick Williams 'BMC_DUMP_OBJPATH', 8357de251cSPatrick Williams get_option('BMC_DUMP_OBJPATH'), 8457de251cSPatrick Williams description: 'The BMC Dump manager Dbus path', 85fef66a95SDhruvaraj Subhashchandran) 8657de251cSPatrick Williamsconf_data.set_quoted( 8757de251cSPatrick Williams 'CORE_FILE_DIR', 8857de251cSPatrick Williams get_option('CORE_FILE_DIR'), 8957de251cSPatrick Williams description: 'Directory where core dumps are placed', 90bb410df7SRamesh Iyyar) 9157de251cSPatrick Williamsconf_data.set_quoted( 9257de251cSPatrick Williams 'BMC_DUMP_OBJ_ENTRY', 9357de251cSPatrick Williams get_option('BMC_DUMP_OBJ_ENTRY'), 9457de251cSPatrick Williams description: 'The BMC dump entry DBus object path', 95bb410df7SRamesh Iyyar) 9657de251cSPatrick Williamsconf_data.set_quoted( 9757de251cSPatrick Williams 'BMC_DUMP_PATH', 9857de251cSPatrick Williams get_option('BMC_DUMP_PATH'), 9957de251cSPatrick Williams description: 'Directory where bmc dumps are placed', 100bb410df7SRamesh Iyyar) 10157de251cSPatrick Williamsconf_data.set_quoted( 10257de251cSPatrick Williams 'SYSTEMD_PSTORE_PATH', 10357de251cSPatrick Williams get_option('SYSTEMD_PSTORE_PATH'), 10457de251cSPatrick Williams description: 'Path to the systemd pstore directory', 105bb410df7SRamesh Iyyar) 10657de251cSPatrick Williamsconf_data.set( 10757de251cSPatrick Williams 'BMC_DUMP_MAX_SIZE', 10857de251cSPatrick Williams get_option('BMC_DUMP_MAX_SIZE'), 10957de251cSPatrick Williams description: 'Maximum size of one bmc dump in kilo bytes', 110bb410df7SRamesh Iyyar) 11157de251cSPatrick Williamsconf_data.set( 11257de251cSPatrick Williams 'BMC_DUMP_MIN_SPACE_REQD', 11357de251cSPatrick Williams get_option('BMC_DUMP_MIN_SPACE_REQD'), 11457de251cSPatrick Williams description: 'Minimum space required for one bmc dump in kilo bytes', 115bb410df7SRamesh Iyyar) 11657de251cSPatrick Williamsconf_data.set( 11757de251cSPatrick Williams 'BMC_DUMP_TOTAL_SIZE', 11857de251cSPatrick Williams get_option('BMC_DUMP_TOTAL_SIZE'), 11957de251cSPatrick Williams description: 'Total size of the dump in kilo bytes', 120bb410df7SRamesh Iyyar) 12157de251cSPatrick Williamsconf_data.set_quoted( 12257de251cSPatrick Williams 'OBJ_LOGGING', 12357de251cSPatrick Williams '/xyz/openbmc_project/logging', 12457de251cSPatrick Williams description: 'The log manager DBus object path', 125bb410df7SRamesh Iyyar) 12657de251cSPatrick Williamsconf_data.set_quoted( 12757de251cSPatrick Williams 'ELOG_ID_PERSIST_PATH', 12857de251cSPatrick Williams get_option('ELOG_ID_PERSIST_PATH'), 12957de251cSPatrick Williams description: 'Path of file for storing elog id\'s, which have associated dumps', 130bb410df7SRamesh Iyyar) 13157de251cSPatrick Williamsconf_data.set( 13257de251cSPatrick Williams 'CLASS_VERSION', 13357de251cSPatrick Williams get_option('CLASS_VERSION'), 13457de251cSPatrick Williams description: 'Class version to register with Cereal', 135bb410df7SRamesh Iyyar) 13657de251cSPatrick Williamsconf_data.set( 13757de251cSPatrick Williams 'ERROR_MAP_YAML', 13857de251cSPatrick Williams get_option('ERROR_MAP_YAML'), 13957de251cSPatrick Williams description: 'YAML filepath containing error object paths', 140919f71c6SClaire Weinan) 14157de251cSPatrick Williamsconf_data.set( 14257de251cSPatrick Williams 'JFFS_CORE_FILE_WORKAROUND', 14357de251cSPatrick Williams get_option('jffs-workaround').allowed(), 14457de251cSPatrick Williams description: 'Turn on jffs workaround for core file', 145919f71c6SClaire Weinan) 14657de251cSPatrick Williamsconf_data.set_quoted( 14757de251cSPatrick Williams 'FAULTLOG_DUMP_OBJ_ENTRY', 14857de251cSPatrick Williams get_option('FAULTLOG_DUMP_OBJ_ENTRY'), 14957de251cSPatrick Williams description: 'The Fault Log dump entry DBus object path', 150919f71c6SClaire Weinan) 15157de251cSPatrick Williamsconf_data.set_quoted( 15257de251cSPatrick Williams 'FAULTLOG_DUMP_OBJPATH', 15357de251cSPatrick Williams get_option('FAULTLOG_DUMP_OBJPATH'), 15457de251cSPatrick Williams description: 'The Fault Log Dump manager Dbus path', 15557de251cSPatrick Williams) 15657de251cSPatrick Williamsconf_data.set_quoted( 15757de251cSPatrick Williams 'FAULTLOG_DUMP_PATH', 15857de251cSPatrick Williams get_option('FAULTLOG_DUMP_PATH'), 15957de251cSPatrick Williams description: 'Directory where fault logs are placed', 16057de251cSPatrick Williams) 16157de251cSPatrick Williamsconf_data.set( 16257de251cSPatrick Williams 'BMC_DUMP_ROTATE_CONFIG', 16357de251cSPatrick Williams get_option('dump_rotate_config').allowed(), 16457de251cSPatrick Williams description: 'Turn on rotate config for bmc dump', 165fc69f35cSXie Ning) 166bb410df7SRamesh Iyyar 167*2c63448fSPatrick Williamsconf_data.set_quoted( 168*2c63448fSPatrick Williams 'SYSTEM_DUMP_OBJPATH', 169*2c63448fSPatrick Williams get_option('SYSTEM_DUMP_OBJPATH'), 170*2c63448fSPatrick Williams description: 'The system dump manager D-Bus path', 171*2c63448fSPatrick Williams) 172*2c63448fSPatrick Williamsconf_data.set_quoted( 173*2c63448fSPatrick Williams 'SYSTEM_DUMP_OBJ_ENTRY', 174*2c63448fSPatrick Williams get_option('SYSTEM_DUMP_OBJ_ENTRY'), 175*2c63448fSPatrick Williams description: 'The system dump entry D-Bus object path', 176*2c63448fSPatrick Williams) 177*2c63448fSPatrick Williams 178*2c63448fSPatrick Williamsconf_data.set_quoted( 179*2c63448fSPatrick Williams 'RESOURCE_DUMP_OBJPATH', 180*2c63448fSPatrick Williams get_option('RESOURCE_DUMP_OBJPATH'), 181*2c63448fSPatrick Williams description: 'The resource dump manager D-Bus path', 182*2c63448fSPatrick Williams) 183*2c63448fSPatrick Williamsconf_data.set_quoted( 184*2c63448fSPatrick Williams 'RESOURCE_DUMP_OBJ_ENTRY', 185*2c63448fSPatrick Williams get_option('RESOURCE_DUMP_OBJ_ENTRY'), 186*2c63448fSPatrick Williams description: 'The resource dump entry D-Bus object path', 187*2c63448fSPatrick Williams) 188*2c63448fSPatrick Williams 18903414ffaSLakshmi Yadlapatiif cpp.has_header('poll.h') 19003414ffaSLakshmi Yadlapati add_project_arguments('-DPLDM_HAS_POLL=1', language: 'cpp') 19103414ffaSLakshmi Yadlapatiendif 19203414ffaSLakshmi Yadlapati 19357de251cSPatrick Williamsconfigure_file(configuration: conf_data, output: 'config.h') 194bb410df7SRamesh Iyyar 195c1f5ed6fSDhruvaraj Subhashchandrandump_types_yaml_files = [] 196c1f5ed6fSDhruvaraj Subhashchandran 197c1f5ed6fSDhruvaraj Subhashchandran# Dump types YAML file 19857de251cSPatrick Williamsdump_types_yaml_files += { 19957de251cSPatrick Williams 'input': 'example_dump_types.yaml', 20057de251cSPatrick Williams 'output': 'dump_types.yaml', 20157de251cSPatrick Williams} 202c1f5ed6fSDhruvaraj Subhashchandran 203c1f5ed6fSDhruvaraj Subhashchandran# Copy and combine YAML files 204c1f5ed6fSDhruvaraj Subhashchandranconcatenate_command = 'cat ' 205c1f5ed6fSDhruvaraj Subhashchandrancombined_yaml_file = 'combined_dump_types.yaml' 206c1f5ed6fSDhruvaraj Subhashchandran 207c1f5ed6fSDhruvaraj Subhashchandranforeach yaml_file : dump_types_yaml_files 20857de251cSPatrick Williams configure_file( 20957de251cSPatrick Williams input: yaml_file.get('input'), 210c1f5ed6fSDhruvaraj Subhashchandran output: yaml_file.get('output'), 21157de251cSPatrick Williams copy: true, 21257de251cSPatrick Williams ) 21357de251cSPatrick Williams concatenate_command += meson.project_build_root() + '/' + yaml_file.get( 21457de251cSPatrick Williams 'output', 21557de251cSPatrick Williams ) + ' ' 216c1f5ed6fSDhruvaraj Subhashchandranendforeach 217c1f5ed6fSDhruvaraj Subhashchandran 218df01f8abSKonstantin Aladyshevconcatenate_command += '> ' + meson.project_build_root() + '/' + combined_yaml_file 219c1f5ed6fSDhruvaraj Subhashchandranrun_command('sh', '-c', concatenate_command) 220c1f5ed6fSDhruvaraj Subhashchandran 221bb410df7SRamesh Iyyarpython = find_program('python3') 222c1f5ed6fSDhruvaraj Subhashchandranmap_gen_file_loc = meson.project_source_root() 223c1f5ed6fSDhruvaraj Subhashchandranmap_gen_file_loc += '/map_gen.py' 224c1f5ed6fSDhruvaraj Subhashchandran 225c1f5ed6fSDhruvaraj Subhashchandrandump_types_hpp = custom_target( 226c1f5ed6fSDhruvaraj Subhashchandran 'dump_types.hpp', 227c1f5ed6fSDhruvaraj Subhashchandran command: [ 228c1f5ed6fSDhruvaraj Subhashchandran python, 229c1f5ed6fSDhruvaraj Subhashchandran map_gen_file_loc, 230c1f5ed6fSDhruvaraj Subhashchandran '-i', 231df01f8abSKonstantin Aladyshev meson.project_build_root() + '/' + combined_yaml_file, 232aa0937f9SDhruvaraj Subhashchandran '-j', 233aa0937f9SDhruvaraj Subhashchandran get_option('ERROR_MAP_YAML'), 234c1f5ed6fSDhruvaraj Subhashchandran '-t', 2352f3794fbSPatrick Williams 'dump_types.hpp.mako', 236c1f5ed6fSDhruvaraj Subhashchandran '-o', 23757de251cSPatrick Williams 'dump_types.hpp', 238c1f5ed6fSDhruvaraj Subhashchandran ], 23957de251cSPatrick Williams depend_files: [ 24057de251cSPatrick Williams 'dump_types.hpp.mako', 241c1f5ed6fSDhruvaraj Subhashchandran 'map_gen.py', 242df01f8abSKonstantin Aladyshev meson.project_build_root() + '/' + combined_yaml_file, 24357de251cSPatrick Williams get_option('ERROR_MAP_YAML'), 244c1f5ed6fSDhruvaraj Subhashchandran ], 24557de251cSPatrick Williams output: 'dump_types.hpp', 246c1f5ed6fSDhruvaraj Subhashchandran) 247c1f5ed6fSDhruvaraj Subhashchandran 248c1f5ed6fSDhruvaraj Subhashchandrandump_types_cpp = custom_target( 249c1f5ed6fSDhruvaraj Subhashchandran 'dump_types.cpp', 250c1f5ed6fSDhruvaraj Subhashchandran command: [ 251c1f5ed6fSDhruvaraj Subhashchandran python, 252c1f5ed6fSDhruvaraj Subhashchandran map_gen_file_loc, 253c1f5ed6fSDhruvaraj Subhashchandran '-i', 254df01f8abSKonstantin Aladyshev meson.project_build_root() + '/' + combined_yaml_file, 255aa0937f9SDhruvaraj Subhashchandran '-j', 256aa0937f9SDhruvaraj Subhashchandran get_option('ERROR_MAP_YAML'), 257c1f5ed6fSDhruvaraj Subhashchandran '-t', 2582f3794fbSPatrick Williams 'dump_types.cpp.mako', 259c1f5ed6fSDhruvaraj Subhashchandran '-o', 26057de251cSPatrick Williams 'dump_types.cpp', 261c1f5ed6fSDhruvaraj Subhashchandran ], 26257de251cSPatrick Williams depend_files: [ 26357de251cSPatrick Williams 'dump_types.cpp.mako', 264c1f5ed6fSDhruvaraj Subhashchandran 'map_gen.py', 265df01f8abSKonstantin Aladyshev meson.project_build_root() + '/' + combined_yaml_file, 26657de251cSPatrick Williams get_option('ERROR_MAP_YAML'), 267bb410df7SRamesh Iyyar ], 26857de251cSPatrick Williams output: 'dump_types.cpp', 269bb410df7SRamesh Iyyar) 270bb410df7SRamesh Iyyar 271bb410df7SRamesh Iyyarphosphor_dump_manager_sources = [ 272bb410df7SRamesh Iyyar 'dump_entry.cpp', 273bb410df7SRamesh Iyyar 'dump_manager.cpp', 274fef66a95SDhruvaraj Subhashchandran 'dump_manager_bmc.cpp', 275bb410df7SRamesh Iyyar 'dump_manager_main.cpp', 276bb410df7SRamesh Iyyar 'dump_serialize.cpp', 277bb410df7SRamesh Iyyar 'elog_watch.cpp', 278c1f5ed6fSDhruvaraj Subhashchandran dump_types_hpp, 279c1f5ed6fSDhruvaraj Subhashchandran dump_types_cpp, 280bb410df7SRamesh Iyyar 'watch.cpp', 281bb410df7SRamesh Iyyar 'bmc_dump_entry.cpp', 282bb410df7SRamesh Iyyar 'dump_utils.cpp', 283919f71c6SClaire Weinan 'dump_offload.cpp', 284919f71c6SClaire Weinan 'dump_manager_faultlog.cpp', 28557de251cSPatrick Williams 'faultlog_dump_entry.cpp', 286bb410df7SRamesh Iyyar] 287bb410df7SRamesh Iyyar 288bb410df7SRamesh Iyyarphosphor_dump_manager_dependency = [ 28973e0bab2SGeorge Liu phosphor_dbus_interfaces_dep, 29073e0bab2SGeorge Liu sdbusplus_dep, 2913ed02c32SMarri Devender Rao sdeventplus_dep, 29273e0bab2SGeorge Liu phosphor_logging_dep, 293abbe1593SPatrick Williams cereal_dep, 29450646c2dSDhruvaraj Subhashchandran nlohmann_json_dep, 295bb410df7SRamesh Iyyar] 296bb410df7SRamesh Iyyar 297bb410df7SRamesh Iyyarphosphor_dump_manager_install = true 298bb410df7SRamesh Iyyar 2993af5c32bSRamesh Iyyarphosphor_dump_manager_incdir = [] 3003af5c32bSRamesh Iyyar 301131994beSRamesh Iyyar# To get host transport based interface to take respective host 302131994beSRamesh Iyyar# dump actions. It will contain required sources and dependency 303131994beSRamesh Iyyar# list for phosphor_dump_manager. 304131994beSRamesh Iyyarsubdir('host-transport-extensions') 305bb410df7SRamesh Iyyar 3068b9b4690SDhruvaraj Subhashchandran#pick any architecture specific dumps 3078b9b4690SDhruvaraj Subhashchandransubdir('dump-extensions') 3088b9b4690SDhruvaraj Subhashchandran 309bb410df7SRamesh Iyyarphosphor_dump_monitor_sources = [ 310c1f5ed6fSDhruvaraj Subhashchandran dump_types_hpp, 311bb410df7SRamesh Iyyar 'core_manager.cpp', 312bb410df7SRamesh Iyyar 'core_manager_main.cpp', 31357de251cSPatrick Williams 'watch.cpp', 314bb410df7SRamesh Iyyar] 315bb410df7SRamesh Iyyar 316bb410df7SRamesh Iyyarphosphor_dump_monitor_dependency = [ 31773e0bab2SGeorge Liu phosphor_dbus_interfaces_dep, 31807222713SPatrick Williams phosphor_logging_dep, 31907222713SPatrick Williams sdeventplus_dep, 320bb410df7SRamesh Iyyar] 321bb410df7SRamesh Iyyar 322bb410df7SRamesh Iyyarphosphor_dump_monitor_install = true 323bb410df7SRamesh Iyyar 3243af5c32bSRamesh Iyyarphosphor_dump_monitor_incdir = [] 3253af5c32bSRamesh Iyyar 326ff92ffe2SGeorge Liuphosphor_ramoops_monitor_sources = [ 327c1f5ed6fSDhruvaraj Subhashchandran dump_types_hpp, 328ff92ffe2SGeorge Liu 'ramoops_manager.cpp', 329ff92ffe2SGeorge Liu 'ramoops_manager_main.cpp', 33057de251cSPatrick Williams 'watch.cpp', 331ff92ffe2SGeorge Liu] 332ff92ffe2SGeorge Liu 333ff92ffe2SGeorge Liuphosphor_ramoops_monitor_dependency = [ 334858fbb2eSGeorge Liu phosphor_dbus_interfaces_dep, 33507222713SPatrick Williams phosphor_logging_dep, 33607222713SPatrick Williams sdeventplus_dep, 337ff92ffe2SGeorge Liu] 338ff92ffe2SGeorge Liu 339ff92ffe2SGeorge Liuphosphor_ramoops_monitor_install = true 340ff92ffe2SGeorge Liu 341ff92ffe2SGeorge Liuphosphor_ramoops_monitor_incdir = [] 342ff92ffe2SGeorge Liu 34357de251cSPatrick Williamsexecutables = [ 34457de251cSPatrick Williams [ 34557de251cSPatrick Williams 'phosphor-dump-manager', 346bb410df7SRamesh Iyyar phosphor_dump_manager_sources, 347bb410df7SRamesh Iyyar phosphor_dump_manager_dependency, 3483af5c32bSRamesh Iyyar phosphor_dump_manager_install, 34957de251cSPatrick Williams phosphor_dump_manager_incdir, 350bb410df7SRamesh Iyyar ], 35157de251cSPatrick Williams [ 35257de251cSPatrick Williams 'phosphor-dump-monitor', 353bb410df7SRamesh Iyyar phosphor_dump_monitor_sources, 354bb410df7SRamesh Iyyar phosphor_dump_monitor_dependency, 3553af5c32bSRamesh Iyyar phosphor_dump_monitor_install, 35657de251cSPatrick Williams phosphor_dump_monitor_incdir, 357ff92ffe2SGeorge Liu ], 35857de251cSPatrick Williams [ 35957de251cSPatrick Williams 'phosphor-ramoops-monitor', 360ff92ffe2SGeorge Liu phosphor_ramoops_monitor_sources, 361ff92ffe2SGeorge Liu phosphor_ramoops_monitor_dependency, 362ff92ffe2SGeorge Liu phosphor_ramoops_monitor_install, 36357de251cSPatrick Williams phosphor_ramoops_monitor_incdir, 36457de251cSPatrick Williams ], 365bb410df7SRamesh Iyyar] 366bb410df7SRamesh Iyyar 367bb410df7SRamesh Iyyarforeach executable : executables 368bb410df7SRamesh Iyyar binary = executable( 369bb410df7SRamesh Iyyar executable[0], 370bb410df7SRamesh Iyyar executable[1], 371bb410df7SRamesh Iyyar dependencies: executable[2], 3723af5c32bSRamesh Iyyar install: executable[3], 37357de251cSPatrick Williams include_directories: executable[4], 374bb410df7SRamesh Iyyar ) 375bb410df7SRamesh Iyyarendforeach 37650427253SChirag Sharma 3779f557368SDhruvaraj Subhashchandranunit_subs = configuration_data() 3789f557368SDhruvaraj Subhashchandranunit_subs.set('bindir', join_paths(get_option('prefix'), get_option('bindir'))) 3796c84a8c5SPatrick Williamssystemd_system_unit_dir = dependency('systemd').get_variable( 3809f557368SDhruvaraj Subhashchandran 'systemdsystemunitdir', 38157de251cSPatrick Williams pkgconfig_define: ['prefix', get_option('prefix')], 38257de251cSPatrick Williams) 3839f557368SDhruvaraj Subhashchandranforeach u : unit_files 3849f557368SDhruvaraj Subhashchandran configure_file( 3859f557368SDhruvaraj Subhashchandran configuration: unit_subs, 3869f557368SDhruvaraj Subhashchandran input: u.get('input'), 3879f557368SDhruvaraj Subhashchandran install: true, 3889f557368SDhruvaraj Subhashchandran install_dir: systemd_system_unit_dir, 38957de251cSPatrick Williams output: u.get('output'), 3909f557368SDhruvaraj Subhashchandran ) 3919f557368SDhruvaraj Subhashchandranendforeach 3929f557368SDhruvaraj Subhashchandran 3937cd0528aSPatrick Williamsif get_option('tests').allowed() 39450427253SChirag Sharma subdir('test') 39550427253SChirag Sharmaendif 396