build: support registry generation

sdbus++-gen-meson version 10 adds support for redfish registry
generation and greatly simplifies the install directives.

Regenerate the YAML meson files and modify the base meson.build
as necessary.  Also, format meson.build with `meson format`.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I77586fca7742d5468803913cb45276ca57271655
diff --git a/gen/xyz/openbmc_project/Smbios/MDR_V2/meson.build b/gen/xyz/openbmc_project/Smbios/MDR_V2/meson.build
index 18351b4..534e71a 100644
--- a/gen/xyz/openbmc_project/Smbios/MDR_V2/meson.build
+++ b/gen/xyz/openbmc_project/Smbios/MDR_V2/meson.build
@@ -1,8 +1,22 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Smbios/MDR_V2'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/Smbios/MDR_V2__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/Smbios/MDR_V2.errors.yaml', '../../../../../yaml/xyz/openbmc_project/Smbios/MDR_V2.interface.yaml',  ],
-    output: [ 'error.cpp', 'error.hpp', 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/Smbios/MDR_V2.errors.yaml',
+        '../../../../../yaml/xyz/openbmc_project/Smbios/MDR_V2.interface.yaml',
+    ],
+    output: [
+        'error.cpp',
+        'error.hpp',
+        'common.hpp',
+        'server.hpp',
+        'server.cpp',
+        'aserver.hpp',
+        'client.hpp',
+    ],
     depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +25,16 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/Smbios/MDR_V2',
     ],
+    install: should_generate_cpp,
+    install_dir: [
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+        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/Smbios/meson.build b/gen/xyz/openbmc_project/Smbios/meson.build
index 2dc0186..5f32c24 100644
--- a/gen/xyz/openbmc_project/Smbios/meson.build
+++ b/gen/xyz/openbmc_project/Smbios/meson.build
@@ -1,6 +1,9 @@
 # Generated file; do not modify.
 subdir('MDR_V2')
-generated_others += custom_target(
+
+sdbusplus_current_path = 'xyz/openbmc_project/Smbios'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/Smbios/MDR_V2__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Smbios/MDR_V2.errors.yaml', '../../../../yaml/xyz/openbmc_project/Smbios/MDR_V2.interface.yaml',  ],
     output: [ 'MDR_V2.md' ],
@@ -12,5 +15,8 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Smbios/MDR_V2',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )