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/Time/EpochTime/meson.build b/gen/xyz/openbmc_project/Time/EpochTime/meson.build
index b89777b..977ec67 100644
--- a/gen/xyz/openbmc_project/Time/EpochTime/meson.build
+++ b/gen/xyz/openbmc_project/Time/EpochTime/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Time/EpochTime'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/Time/EpochTime__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/Time/EpochTime.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/Time/EpochTime.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/Time/EpochTime',
     ],
+    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/Time/Synchronization/meson.build b/gen/xyz/openbmc_project/Time/Synchronization/meson.build
index c1608cf..40cb9d1 100644
--- a/gen/xyz/openbmc_project/Time/Synchronization/meson.build
+++ b/gen/xyz/openbmc_project/Time/Synchronization/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Time/Synchronization'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/Time/Synchronization__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/Time/Synchronization.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/Time/Synchronization.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/Time/Synchronization',
     ],
+    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/Time/meson.build b/gen/xyz/openbmc_project/Time/meson.build
index 3936983..d574cff 100644
--- a/gen/xyz/openbmc_project/Time/meson.build
+++ b/gen/xyz/openbmc_project/Time/meson.build
@@ -1,8 +1,18 @@
 # Generated file; do not modify.
+subdir('EpochTime')
+subdir('Synchronization')
+
+sdbusplus_current_path = 'xyz/openbmc_project/Time'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/Time__cpp'.underscorify(),
-    input: [ '../../../../yaml/xyz/openbmc_project/Time.errors.yaml',  ],
-    output: [ 'error.cpp', 'error.hpp',  ],
+    input: [
+        '../../../../yaml/xyz/openbmc_project/Time.errors.yaml',
+    ],
+    output: [
+        'error.cpp',
+        'error.hpp',
+    ],
     depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,10 +21,15 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Time',
     ],
+    install: should_generate_cpp,
+    install_dir: [
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+    ],
+    build_by_default: should_generate_cpp,
 )
 
-subdir('EpochTime')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/Time/EpochTime__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Time/EpochTime.interface.yaml',  ],
     output: [ 'EpochTime.md' ],
@@ -26,10 +41,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Time/EpochTime',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Synchronization')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/Time/Synchronization__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Time/Synchronization.interface.yaml',  ],
     output: [ 'Synchronization.md' ],
@@ -41,5 +58,8 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Time/Synchronization',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )