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/PLDM/Event/meson.build b/gen/xyz/openbmc_project/PLDM/Event/meson.build
index b3f396e..78a53f8 100644
--- a/gen/xyz/openbmc_project/PLDM/Event/meson.build
+++ b/gen/xyz/openbmc_project/PLDM/Event/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/PLDM/Event'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/PLDM/Event__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/PLDM/Event.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/PLDM/Event.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/PLDM/Event',
     ],
+    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/PLDM/PDR/meson.build b/gen/xyz/openbmc_project/PLDM/PDR/meson.build
index 9dcb187..1a74816 100644
--- a/gen/xyz/openbmc_project/PLDM/PDR/meson.build
+++ b/gen/xyz/openbmc_project/PLDM/PDR/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/PLDM/PDR'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/PLDM/PDR__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/PLDM/PDR.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/PLDM/PDR.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/PLDM/PDR',
     ],
+    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/PLDM/Provider/Certs/Authority/CSR/meson.build b/gen/xyz/openbmc_project/PLDM/Provider/Certs/Authority/CSR/meson.build
index d3e5fc0..08569d1 100644
--- a/gen/xyz/openbmc_project/PLDM/Provider/Certs/Authority/CSR/meson.build
+++ b/gen/xyz/openbmc_project/PLDM/Provider/Certs/Authority/CSR/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/PLDM/Provider/Certs/Authority/CSR'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/PLDM/Provider/Certs/Authority/CSR__cpp'.underscorify(),
-    input: [ '../../../../../../../../yaml/xyz/openbmc_project/PLDM/Provider/Certs/Authority/CSR.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../../../yaml/xyz/openbmc_project/PLDM/Provider/Certs/Authority/CSR.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/PLDM/Provider/Certs/Authority/CSR',
     ],
+    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/PLDM/Provider/Certs/Authority/meson.build b/gen/xyz/openbmc_project/PLDM/Provider/Certs/Authority/meson.build
index 9747e8b..28d2c65 100644
--- a/gen/xyz/openbmc_project/PLDM/Provider/Certs/Authority/meson.build
+++ b/gen/xyz/openbmc_project/PLDM/Provider/Certs/Authority/meson.build
@@ -1,6 +1,9 @@
 # Generated file; do not modify.
 subdir('CSR')
-generated_others += custom_target(
+
+sdbusplus_current_path = 'xyz/openbmc_project/PLDM/Provider/Certs/Authority'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/PLDM/Provider/Certs/Authority/CSR__markdown'.underscorify(),
     input: [ '../../../../../../../yaml/xyz/openbmc_project/PLDM/Provider/Certs/Authority/CSR.interface.yaml',  ],
     output: [ 'CSR.md' ],
@@ -12,5 +15,8 @@
         '--directory', meson.current_source_dir() / '../../../../../../../yaml',
         'xyz/openbmc_project/PLDM/Provider/Certs/Authority/CSR',
     ],
+    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/PLDM/Requester/meson.build b/gen/xyz/openbmc_project/PLDM/Requester/meson.build
index 6d80921..ebec7d7 100644
--- a/gen/xyz/openbmc_project/PLDM/Requester/meson.build
+++ b/gen/xyz/openbmc_project/PLDM/Requester/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/PLDM/Requester'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/PLDM/Requester__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/PLDM/Requester.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/PLDM/Requester.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/PLDM/Requester',
     ],
+    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/PLDM/meson.build b/gen/xyz/openbmc_project/PLDM/meson.build
index b0140d5..7180dc5 100644
--- a/gen/xyz/openbmc_project/PLDM/meson.build
+++ b/gen/xyz/openbmc_project/PLDM/meson.build
@@ -1,6 +1,12 @@
 # Generated file; do not modify.
 subdir('Event')
-generated_others += custom_target(
+subdir('PDR')
+subdir('Provider')
+subdir('Requester')
+
+sdbusplus_current_path = 'xyz/openbmc_project/PLDM'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/PLDM/Event__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/PLDM/Event.interface.yaml',  ],
     output: [ 'Event.md' ],
@@ -12,10 +18,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/PLDM/Event',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('PDR')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/PLDM/PDR__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/PLDM/PDR.interface.yaml',  ],
     output: [ 'PDR.md' ],
@@ -27,11 +35,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/PLDM/PDR',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Provider')
-subdir('Requester')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/PLDM/Requester__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/PLDM/Requester.interface.yaml',  ],
     output: [ 'Requester.md' ],
@@ -43,5 +52,8 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/PLDM/Requester',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )