sdbusplus: update meson to v10 format
There was significant refactoring in sdbusplus generated meson files
in order to support generating Redfish Message Registries. Those
aren't interesting to this repository (and are disabled) but there
are minor top-level meson changes necessary in order to the latest
version of those.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I4c1d1b841d28760ccaa5cdf370cf536b48979748
diff --git a/gen/meson.build b/gen/meson.build
index 38522c5..ef27aee 100644
--- a/gen/meson.build
+++ b/gen/meson.build
@@ -5,11 +5,31 @@
check: true,
).stdout().strip().split('\n')[0]
-if sdbuspp_gen_meson_ver != 'sdbus++-gen-meson version 9'
+if sdbuspp_gen_meson_ver != 'sdbus++-gen-meson version 10'
warning('Generated meson files from wrong version of sdbus++-gen-meson.')
warning(
- 'Expected "sdbus++-gen-meson version 9", got:',
+ 'Expected "sdbus++-gen-meson version 10", got:',
sdbuspp_gen_meson_ver
)
endif
+inst_markdown_dir = get_option('datadir') / 'doc' / meson.project_name()
+inst_registry_dir = get_option('datadir') / 'redfish-registry' / meson.project_name()
+
+generated_sources = []
+generated_markdown = []
+generated_registry = []
+
+foreach d : yaml_selected_subdirs
+ subdir(d)
+endforeach
+
+generated_headers = []
+foreach s : generated_sources
+ foreach f : s.to_list()
+ if f.full_path().endswith('.hpp')
+ generated_headers += f
+ endif
+ endforeach
+endforeach
+
diff --git a/gen/xyz/openbmc_project/Network/IP/Create/meson.build b/gen/xyz/openbmc_project/Network/IP/Create/meson.build
index 705dc62..a1d4857 100644
--- a/gen/xyz/openbmc_project/Network/IP/Create/meson.build
+++ b/gen/xyz/openbmc_project/Network/IP/Create/meson.build
@@ -1,8 +1,19 @@
# Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Network/IP/Create'
+
generated_sources += custom_target(
'xyz/openbmc_project/Network/IP/Create__cpp'.underscorify(),
- input: [ '../../../../../../yaml/xyz/openbmc_project/Network/IP/Create.interface.yaml', ],
- output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp', ],
+ input: [
+ '../../../../../../yaml/xyz/openbmc_project/Network/IP/Create.interface.yaml',
+ ],
+ output: [
+ 'common.hpp',
+ 'server.hpp',
+ 'server.cpp',
+ 'aserver.hpp',
+ 'client.hpp',
+ ],
depend_files: sdbusplusplus_depfiles,
command: [
sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +22,14 @@
'--directory', meson.current_source_dir() / '../../../../../../yaml',
'xyz/openbmc_project/Network/IP/Create',
],
+ install: should_generate_cpp,
+ install_dir: [
+ get_option('includedir') / sdbusplus_current_path,
+ get_option('includedir') / sdbusplus_current_path,
+ false,
+ get_option('includedir') / sdbusplus_current_path,
+ get_option('includedir') / sdbusplus_current_path,
+ ],
+ build_by_default: should_generate_cpp,
)
diff --git a/gen/xyz/openbmc_project/Network/IP/meson.build b/gen/xyz/openbmc_project/Network/IP/meson.build
index 936df4b..7eaabe6 100644
--- a/gen/xyz/openbmc_project/Network/IP/meson.build
+++ b/gen/xyz/openbmc_project/Network/IP/meson.build
@@ -1,6 +1,9 @@
# Generated file; do not modify.
subdir('Create')
-generated_others += custom_target(
+
+sdbusplus_current_path = 'xyz/openbmc_project/Network/IP'
+
+generated_markdown += custom_target(
'xyz/openbmc_project/Network/IP/Create__markdown'.underscorify(),
input: [ '../../../../../yaml/xyz/openbmc_project/Network/IP/Create.interface.yaml', ],
output: [ 'Create.md' ],
@@ -12,5 +15,8 @@
'--directory', meson.current_source_dir() / '../../../../../yaml',
'xyz/openbmc_project/Network/IP/Create',
],
+ install: should_generate_markdown,
+ install_dir: [inst_markdown_dir / sdbusplus_current_path],
+ build_by_default: should_generate_markdown,
)
diff --git a/gen/xyz/openbmc_project/Network/Neighbor/CreateStatic/meson.build b/gen/xyz/openbmc_project/Network/Neighbor/CreateStatic/meson.build
index 217b726..2d86666 100644
--- a/gen/xyz/openbmc_project/Network/Neighbor/CreateStatic/meson.build
+++ b/gen/xyz/openbmc_project/Network/Neighbor/CreateStatic/meson.build
@@ -1,8 +1,19 @@
# Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Network/Neighbor/CreateStatic'
+
generated_sources += custom_target(
'xyz/openbmc_project/Network/Neighbor/CreateStatic__cpp'.underscorify(),
- input: [ '../../../../../../yaml/xyz/openbmc_project/Network/Neighbor/CreateStatic.interface.yaml', ],
- output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp', ],
+ input: [
+ '../../../../../../yaml/xyz/openbmc_project/Network/Neighbor/CreateStatic.interface.yaml',
+ ],
+ output: [
+ 'common.hpp',
+ 'server.hpp',
+ 'server.cpp',
+ 'aserver.hpp',
+ 'client.hpp',
+ ],
depend_files: sdbusplusplus_depfiles,
command: [
sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +22,14 @@
'--directory', meson.current_source_dir() / '../../../../../../yaml',
'xyz/openbmc_project/Network/Neighbor/CreateStatic',
],
+ install: should_generate_cpp,
+ install_dir: [
+ get_option('includedir') / sdbusplus_current_path,
+ get_option('includedir') / sdbusplus_current_path,
+ false,
+ get_option('includedir') / sdbusplus_current_path,
+ get_option('includedir') / sdbusplus_current_path,
+ ],
+ build_by_default: should_generate_cpp,
)
diff --git a/gen/xyz/openbmc_project/Network/Neighbor/meson.build b/gen/xyz/openbmc_project/Network/Neighbor/meson.build
index 7e45de5..be1d632 100644
--- a/gen/xyz/openbmc_project/Network/Neighbor/meson.build
+++ b/gen/xyz/openbmc_project/Network/Neighbor/meson.build
@@ -1,6 +1,9 @@
# Generated file; do not modify.
subdir('CreateStatic')
-generated_others += custom_target(
+
+sdbusplus_current_path = 'xyz/openbmc_project/Network/Neighbor'
+
+generated_markdown += custom_target(
'xyz/openbmc_project/Network/Neighbor/CreateStatic__markdown'.underscorify(),
input: [ '../../../../../yaml/xyz/openbmc_project/Network/Neighbor/CreateStatic.interface.yaml', ],
output: [ 'CreateStatic.md' ],
@@ -12,5 +15,8 @@
'--directory', meson.current_source_dir() / '../../../../../yaml',
'xyz/openbmc_project/Network/Neighbor/CreateStatic',
],
+ install: should_generate_markdown,
+ install_dir: [inst_markdown_dir / sdbusplus_current_path],
+ build_by_default: should_generate_markdown,
)
diff --git a/gen/xyz/openbmc_project/Network/VLAN/Create/meson.build b/gen/xyz/openbmc_project/Network/VLAN/Create/meson.build
index 5da566f..c5ccdc2 100644
--- a/gen/xyz/openbmc_project/Network/VLAN/Create/meson.build
+++ b/gen/xyz/openbmc_project/Network/VLAN/Create/meson.build
@@ -1,8 +1,19 @@
# Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Network/VLAN/Create'
+
generated_sources += custom_target(
'xyz/openbmc_project/Network/VLAN/Create__cpp'.underscorify(),
- input: [ '../../../../../../yaml/xyz/openbmc_project/Network/VLAN/Create.interface.yaml', ],
- output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp', ],
+ input: [
+ '../../../../../../yaml/xyz/openbmc_project/Network/VLAN/Create.interface.yaml',
+ ],
+ output: [
+ 'common.hpp',
+ 'server.hpp',
+ 'server.cpp',
+ 'aserver.hpp',
+ 'client.hpp',
+ ],
depend_files: sdbusplusplus_depfiles,
command: [
sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +22,14 @@
'--directory', meson.current_source_dir() / '../../../../../../yaml',
'xyz/openbmc_project/Network/VLAN/Create',
],
+ install: should_generate_cpp,
+ install_dir: [
+ get_option('includedir') / sdbusplus_current_path,
+ get_option('includedir') / sdbusplus_current_path,
+ false,
+ get_option('includedir') / sdbusplus_current_path,
+ get_option('includedir') / sdbusplus_current_path,
+ ],
+ build_by_default: should_generate_cpp,
)
diff --git a/gen/xyz/openbmc_project/Network/VLAN/meson.build b/gen/xyz/openbmc_project/Network/VLAN/meson.build
index c067c35..649870a 100644
--- a/gen/xyz/openbmc_project/Network/VLAN/meson.build
+++ b/gen/xyz/openbmc_project/Network/VLAN/meson.build
@@ -1,6 +1,9 @@
# Generated file; do not modify.
subdir('Create')
-generated_others += custom_target(
+
+sdbusplus_current_path = 'xyz/openbmc_project/Network/VLAN'
+
+generated_markdown += custom_target(
'xyz/openbmc_project/Network/VLAN/Create__markdown'.underscorify(),
input: [ '../../../../../yaml/xyz/openbmc_project/Network/VLAN/Create.interface.yaml', ],
output: [ 'Create.md' ],
@@ -12,5 +15,8 @@
'--directory', meson.current_source_dir() / '../../../../../yaml',
'xyz/openbmc_project/Network/VLAN/Create',
],
+ install: should_generate_markdown,
+ install_dir: [inst_markdown_dir / sdbusplus_current_path],
+ build_by_default: should_generate_markdown,
)
diff --git a/meson.build b/meson.build
index 90e267e..e655f2c 100644
--- a/meson.build
+++ b/meson.build
@@ -31,11 +31,11 @@
sdbusplusplus_depfiles = subproject('sdbusplus').get_variable('sdbusplusplus_depfiles')
endif
-generated_sources = []
-generated_others = []
-yaml_sources = []
+yaml_selected_subdirs = [ 'xyz' ]
+should_generate_cpp = true
+should_generate_markdown = false
+should_generate_registry = false
subdir('gen')
-subdir('gen/xyz')
networkd_dbus_includes = include_directories('gen')
phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')