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/Attestation/ComponentIntegrity/meson.build b/gen/xyz/openbmc_project/Attestation/ComponentIntegrity/meson.build
index 6d2696a..23a2fbc 100644
--- a/gen/xyz/openbmc_project/Attestation/ComponentIntegrity/meson.build
+++ b/gen/xyz/openbmc_project/Attestation/ComponentIntegrity/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Attestation/ComponentIntegrity'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/Attestation/ComponentIntegrity__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/Attestation/ComponentIntegrity.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/Attestation/ComponentIntegrity.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/Attestation/ComponentIntegrity',
     ],
+    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/Attestation/IdentityAuthentication/meson.build b/gen/xyz/openbmc_project/Attestation/IdentityAuthentication/meson.build
index 60d1f7c..4e0d4b9 100644
--- a/gen/xyz/openbmc_project/Attestation/IdentityAuthentication/meson.build
+++ b/gen/xyz/openbmc_project/Attestation/IdentityAuthentication/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Attestation/IdentityAuthentication'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/Attestation/IdentityAuthentication__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/Attestation/IdentityAuthentication.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/Attestation/IdentityAuthentication.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/Attestation/IdentityAuthentication',
     ],
+    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/Attestation/MeasurementSet/meson.build b/gen/xyz/openbmc_project/Attestation/MeasurementSet/meson.build
index 532a14e..d37852b 100644
--- a/gen/xyz/openbmc_project/Attestation/MeasurementSet/meson.build
+++ b/gen/xyz/openbmc_project/Attestation/MeasurementSet/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Attestation/MeasurementSet'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/Attestation/MeasurementSet__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/Attestation/MeasurementSet.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/Attestation/MeasurementSet.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/Attestation/MeasurementSet',
     ],
+    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/Attestation/meson.build b/gen/xyz/openbmc_project/Attestation/meson.build
index 86e0952..ad4b061 100644
--- a/gen/xyz/openbmc_project/Attestation/meson.build
+++ b/gen/xyz/openbmc_project/Attestation/meson.build
@@ -1,6 +1,11 @@
 # Generated file; do not modify.
 subdir('ComponentIntegrity')
-generated_others += custom_target(
+subdir('IdentityAuthentication')
+subdir('MeasurementSet')
+
+sdbusplus_current_path = 'xyz/openbmc_project/Attestation'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/Attestation/ComponentIntegrity__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Attestation/ComponentIntegrity.interface.yaml',  ],
     output: [ 'ComponentIntegrity.md' ],
@@ -12,10 +17,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Attestation/ComponentIntegrity',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('IdentityAuthentication')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/Attestation/IdentityAuthentication__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Attestation/IdentityAuthentication.interface.yaml',  ],
     output: [ 'IdentityAuthentication.md' ],
@@ -27,10 +34,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Attestation/IdentityAuthentication',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('MeasurementSet')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/Attestation/MeasurementSet__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Attestation/MeasurementSet.interface.yaml',  ],
     output: [ 'MeasurementSet.md' ],
@@ -42,5 +51,8 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Attestation/MeasurementSet',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )