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/Logging/meson.build b/gen/xyz/openbmc_project/Logging/meson.build
index 39baab1..69ff763 100644
--- a/gen/xyz/openbmc_project/Logging/meson.build
+++ b/gen/xyz/openbmc_project/Logging/meson.build
@@ -1,8 +1,24 @@
 # Generated file; do not modify.
+subdir('Create')
+subdir('Entry')
+subdir('ErrorBlocksTransition')
+subdir('Event')
+subdir('IPMI')
+subdir('SEL')
+subdir('Settings')
+subdir('Syslog')
+
+sdbusplus_current_path = 'xyz/openbmc_project/Logging'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/Logging__cpp'.underscorify(),
-    input: [ '../../../../yaml/xyz/openbmc_project/Logging.events.yaml',  ],
-    output: [ 'event.cpp', 'event.hpp',  ],
+    input: [
+        '../../../../yaml/xyz/openbmc_project/Logging.events.yaml',
+    ],
+    output: [
+        'event.cpp',
+        'event.hpp',
+    ],
     depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,10 +27,15 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Logging',
     ],
+    install: should_generate_cpp,
+    install_dir: [
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+    ],
+    build_by_default: should_generate_cpp,
 )
 
-subdir('Create')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/Logging/Create__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Logging/Create.interface.yaml',  ],
     output: [ 'Create.md' ],
@@ -26,10 +47,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Logging/Create',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Entry')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/Logging/Entry__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Logging/Entry.interface.yaml',  ],
     output: [ 'Entry.md' ],
@@ -41,10 +64,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Logging/Entry',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('ErrorBlocksTransition')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/Logging/ErrorBlocksTransition__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Logging/ErrorBlocksTransition.interface.yaml',  ],
     output: [ 'ErrorBlocksTransition.md' ],
@@ -56,10 +81,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Logging/ErrorBlocksTransition',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Event')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/Logging/Event__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Logging/Event.interface.yaml',  ],
     output: [ 'Event.md' ],
@@ -71,10 +98,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Logging/Event',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('IPMI')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/Logging/IPMI__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Logging/IPMI.interface.yaml',  ],
     output: [ 'IPMI.md' ],
@@ -86,10 +115,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Logging/IPMI',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('SEL')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/Logging/SEL__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Logging/SEL.errors.yaml',  ],
     output: [ 'SEL.md' ],
@@ -101,10 +132,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Logging/SEL',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Settings')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/Logging/Settings__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/Logging/Settings.interface.yaml',  ],
     output: [ 'Settings.md' ],
@@ -116,6 +149,8 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/Logging/Settings',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Syslog')