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: I79dde5151bb5971813506252b7e0cebaacb105c2
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/Logging/Internal/Manager/meson.build b/gen/xyz/openbmc_project/Logging/Internal/Manager/meson.build
index 595ce65..6f5a0ee 100644
--- a/gen/xyz/openbmc_project/Logging/Internal/Manager/meson.build
+++ b/gen/xyz/openbmc_project/Logging/Internal/Manager/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Logging/Internal/Manager'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/Logging/Internal/Manager__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/Logging/Internal/Manager.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/Logging/Internal/Manager.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/Logging/Internal/Manager',
     ],
+    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/Logging/Internal/meson.build b/gen/xyz/openbmc_project/Logging/Internal/meson.build
index 42146f4..99a090e 100644
--- a/gen/xyz/openbmc_project/Logging/Internal/meson.build
+++ b/gen/xyz/openbmc_project/Logging/Internal/meson.build
@@ -1,6 +1,9 @@
 # Generated file; do not modify.
 subdir('Manager')
-generated_others += custom_target(
+
+sdbusplus_current_path = 'xyz/openbmc_project/Logging/Internal'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/Logging/Internal/Manager__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/Logging/Internal/Manager.interface.yaml',  ],
     output: [ 'Manager.md' ],
@@ -12,5 +15,8 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/Logging/Internal/Manager',
     ],
+    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 c4263c1..562722c 100644
--- a/meson.build
+++ b/meson.build
@@ -70,10 +70,11 @@
 nlohmann_json_dep = dependency('nlohmann_json', include_type: 'system')
 
 # Generate sdbus++ files.
-generated_sources = []
-generated_others = []
+should_generate_cpp = true
+should_generate_markdown = false
+should_generate_registry = false
+yaml_selected_subdirs = [ 'xyz' ]
 subdir('gen')
-subdir('gen/xyz')
 
 # Generate callouts-gen.hpp.
 callouts_gen = custom_target('callouts-gen.hpp'.underscorify(),