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/Metric/Reset/meson.build b/gen/xyz/openbmc_project/Metric/Reset/meson.build
index 09fee53..ff6ad61 100644
--- a/gen/xyz/openbmc_project/Metric/Reset/meson.build
+++ b/gen/xyz/openbmc_project/Metric/Reset/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Metric/Reset'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/Metric/Reset__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/Metric/Reset.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/Metric/Reset.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/Metric/Reset',
     ],
+    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/Metric/Value/meson.build b/gen/xyz/openbmc_project/Metric/Value/meson.build
index 0bbd00d..aa67121 100644
--- a/gen/xyz/openbmc_project/Metric/Value/meson.build
+++ b/gen/xyz/openbmc_project/Metric/Value/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Metric/Value'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/Metric/Value__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/Metric/Value.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/Metric/Value.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/Metric/Value',
     ],
+    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/Metric/meson.build b/gen/xyz/openbmc_project/Metric/meson.build
index 69099b9..ecc7362 100644
--- a/gen/xyz/openbmc_project/Metric/meson.build
+++ b/gen/xyz/openbmc_project/Metric/meson.build
@@ -1,6 +1,10 @@
 # Generated file; do not modify.
 subdir('Reset')
-generated_others += custom_target(
+subdir('Value')
+
+sdbusplus_current_path = 'xyz/openbmc_project/Metric'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/Metric/Reset__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Metric/Reset.interface.yaml',  ],
     output: [ 'Reset.md' ],
@@ -12,10 +16,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Metric/Reset',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Value')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/Metric/Value__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Metric/Value.interface.yaml',  ],
     output: [ 'Value.md' ],
@@ -27,5 +33,8 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Metric/Value',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )