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/State/BMC/meson.build b/gen/xyz/openbmc_project/State/BMC/meson.build
index a802206..34dc906 100644
--- a/gen/xyz/openbmc_project/State/BMC/meson.build
+++ b/gen/xyz/openbmc_project/State/BMC/meson.build
@@ -1,8 +1,22 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/BMC'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/BMC__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/State/BMC.errors.yaml', '../../../../../yaml/xyz/openbmc_project/State/BMC.interface.yaml',  ],
-    output: [ 'error.cpp', 'error.hpp', 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/State/BMC.errors.yaml',
+        '../../../../../yaml/xyz/openbmc_project/State/BMC.interface.yaml',
+    ],
+    output: [
+        'error.cpp',
+        'error.hpp',
+        'common.hpp',
+        'server.hpp',
+        'server.cpp',
+        'aserver.hpp',
+        'client.hpp',
+    ],
     depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +25,16 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/BMC',
     ],
+    install: should_generate_cpp,
+    install_dir: [
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+        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/State/BMCRedundancy/meson.build b/gen/xyz/openbmc_project/State/BMCRedundancy/meson.build
index f99775d..0fdc456 100644
--- a/gen/xyz/openbmc_project/State/BMCRedundancy/meson.build
+++ b/gen/xyz/openbmc_project/State/BMCRedundancy/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/BMCRedundancy'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/BMCRedundancy__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/State/BMCRedundancy.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/State/BMCRedundancy.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/State/BMCRedundancy',
     ],
+    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/State/Boot/PostCode/meson.build b/gen/xyz/openbmc_project/State/Boot/PostCode/meson.build
index c08f87f..3b65883 100644
--- a/gen/xyz/openbmc_project/State/Boot/PostCode/meson.build
+++ b/gen/xyz/openbmc_project/State/Boot/PostCode/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Boot/PostCode'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Boot/PostCode__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/State/Boot/PostCode.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/State/Boot/PostCode.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/State/Boot/PostCode',
     ],
+    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/State/Boot/Progress/meson.build b/gen/xyz/openbmc_project/State/Boot/Progress/meson.build
index 704acc5..944c02b 100644
--- a/gen/xyz/openbmc_project/State/Boot/Progress/meson.build
+++ b/gen/xyz/openbmc_project/State/Boot/Progress/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Boot/Progress'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Boot/Progress__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/State/Boot/Progress.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/State/Boot/Progress.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/State/Boot/Progress',
     ],
+    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/State/Boot/Raw/meson.build b/gen/xyz/openbmc_project/State/Boot/Raw/meson.build
index 99c96bc..56d2f5e 100644
--- a/gen/xyz/openbmc_project/State/Boot/Raw/meson.build
+++ b/gen/xyz/openbmc_project/State/Boot/Raw/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Boot/Raw'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Boot/Raw__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/State/Boot/Raw.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/State/Boot/Raw.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/State/Boot/Raw',
     ],
+    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/State/Boot/meson.build b/gen/xyz/openbmc_project/State/Boot/meson.build
index c825821..1e2b82b 100644
--- a/gen/xyz/openbmc_project/State/Boot/meson.build
+++ b/gen/xyz/openbmc_project/State/Boot/meson.build
@@ -1,6 +1,11 @@
 # Generated file; do not modify.
 subdir('PostCode')
-generated_others += custom_target(
+subdir('Progress')
+subdir('Raw')
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Boot'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Boot/PostCode__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/State/Boot/PostCode.interface.yaml',  ],
     output: [ 'PostCode.md' ],
@@ -12,10 +17,12 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Boot/PostCode',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Progress')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Boot/Progress__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/State/Boot/Progress.interface.yaml',  ],
     output: [ 'Progress.md' ],
@@ -27,10 +34,12 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Boot/Progress',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Raw')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Boot/Raw__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/State/Boot/Raw.interface.yaml',  ],
     output: [ 'Raw.md' ],
@@ -42,5 +51,8 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Boot/Raw',
     ],
+    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/State/Cable/meson.build b/gen/xyz/openbmc_project/State/Cable/meson.build
index fb697db..f0552b7 100644
--- a/gen/xyz/openbmc_project/State/Cable/meson.build
+++ b/gen/xyz/openbmc_project/State/Cable/meson.build
@@ -1,8 +1,16 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Cable'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Cable__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/State/Cable.events.yaml',  ],
-    output: [ 'event.cpp', 'event.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/State/Cable.events.yaml',
+    ],
+    output: [
+        'event.cpp',
+        'event.hpp',
+    ],
     depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +19,11 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Cable',
     ],
+    install: should_generate_cpp,
+    install_dir: [
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+    ],
+    build_by_default: should_generate_cpp,
 )
 
diff --git a/gen/xyz/openbmc_project/State/Chassis/meson.build b/gen/xyz/openbmc_project/State/Chassis/meson.build
index 69b9141..aedbf0c 100644
--- a/gen/xyz/openbmc_project/State/Chassis/meson.build
+++ b/gen/xyz/openbmc_project/State/Chassis/meson.build
@@ -1,8 +1,22 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Chassis'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Chassis__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/State/Chassis.errors.yaml', '../../../../../yaml/xyz/openbmc_project/State/Chassis.interface.yaml',  ],
-    output: [ 'error.cpp', 'error.hpp', 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/State/Chassis.errors.yaml',
+        '../../../../../yaml/xyz/openbmc_project/State/Chassis.interface.yaml',
+    ],
+    output: [
+        'error.cpp',
+        'error.hpp',
+        'common.hpp',
+        'server.hpp',
+        'server.cpp',
+        'aserver.hpp',
+        'client.hpp',
+    ],
     depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +25,16 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Chassis',
     ],
+    install: should_generate_cpp,
+    install_dir: [
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+        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/State/Decorator/Availability/meson.build b/gen/xyz/openbmc_project/State/Decorator/Availability/meson.build
index e015db9..134fd93 100644
--- a/gen/xyz/openbmc_project/State/Decorator/Availability/meson.build
+++ b/gen/xyz/openbmc_project/State/Decorator/Availability/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Decorator/Availability'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Decorator/Availability__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/State/Decorator/Availability.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/State/Decorator/Availability.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/State/Decorator/Availability',
     ],
+    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/State/Decorator/OperationalStatus/meson.build b/gen/xyz/openbmc_project/State/Decorator/OperationalStatus/meson.build
index 3a777f6..a8fc9de 100644
--- a/gen/xyz/openbmc_project/State/Decorator/OperationalStatus/meson.build
+++ b/gen/xyz/openbmc_project/State/Decorator/OperationalStatus/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Decorator/OperationalStatus'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Decorator/OperationalStatus__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/State/Decorator/OperationalStatus.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/State/Decorator/OperationalStatus.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/State/Decorator/OperationalStatus',
     ],
+    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/State/Decorator/PowerState/meson.build b/gen/xyz/openbmc_project/State/Decorator/PowerState/meson.build
index d0510a9..b78e648 100644
--- a/gen/xyz/openbmc_project/State/Decorator/PowerState/meson.build
+++ b/gen/xyz/openbmc_project/State/Decorator/PowerState/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Decorator/PowerState'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Decorator/PowerState__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/State/Decorator/PowerState.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/State/Decorator/PowerState.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/State/Decorator/PowerState',
     ],
+    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/State/Decorator/PowerSystemInputs/meson.build b/gen/xyz/openbmc_project/State/Decorator/PowerSystemInputs/meson.build
index efc1508..4a9b283 100644
--- a/gen/xyz/openbmc_project/State/Decorator/PowerSystemInputs/meson.build
+++ b/gen/xyz/openbmc_project/State/Decorator/PowerSystemInputs/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Decorator/PowerSystemInputs'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Decorator/PowerSystemInputs__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/State/Decorator/PowerSystemInputs.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/State/Decorator/PowerSystemInputs.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/State/Decorator/PowerSystemInputs',
     ],
+    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/State/Decorator/meson.build b/gen/xyz/openbmc_project/State/Decorator/meson.build
index 10603d7..cbe0541 100644
--- a/gen/xyz/openbmc_project/State/Decorator/meson.build
+++ b/gen/xyz/openbmc_project/State/Decorator/meson.build
@@ -1,6 +1,12 @@
 # Generated file; do not modify.
 subdir('Availability')
-generated_others += custom_target(
+subdir('OperationalStatus')
+subdir('PowerState')
+subdir('PowerSystemInputs')
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Decorator'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Decorator/Availability__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/State/Decorator/Availability.interface.yaml',  ],
     output: [ 'Availability.md' ],
@@ -12,10 +18,12 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Decorator/Availability',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('OperationalStatus')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Decorator/OperationalStatus__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/State/Decorator/OperationalStatus.interface.yaml',  ],
     output: [ 'OperationalStatus.md' ],
@@ -27,10 +35,12 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Decorator/OperationalStatus',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('PowerState')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Decorator/PowerState__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/State/Decorator/PowerState.interface.yaml',  ],
     output: [ 'PowerState.md' ],
@@ -42,10 +52,12 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Decorator/PowerState',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('PowerSystemInputs')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Decorator/PowerSystemInputs__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/State/Decorator/PowerSystemInputs.interface.yaml',  ],
     output: [ 'PowerSystemInputs.md' ],
@@ -57,5 +69,8 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Decorator/PowerSystemInputs',
     ],
+    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/State/Drive/meson.build b/gen/xyz/openbmc_project/State/Drive/meson.build
index 1050819..f0c59a0 100644
--- a/gen/xyz/openbmc_project/State/Drive/meson.build
+++ b/gen/xyz/openbmc_project/State/Drive/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Drive'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Drive__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/State/Drive.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/State/Drive.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/State/Drive',
     ],
+    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/State/Host/meson.build b/gen/xyz/openbmc_project/State/Host/meson.build
index bd3cde0..ed6a6b3 100644
--- a/gen/xyz/openbmc_project/State/Host/meson.build
+++ b/gen/xyz/openbmc_project/State/Host/meson.build
@@ -1,8 +1,22 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Host'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Host__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/State/Host.errors.yaml', '../../../../../yaml/xyz/openbmc_project/State/Host.interface.yaml',  ],
-    output: [ 'error.cpp', 'error.hpp', 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/State/Host.errors.yaml',
+        '../../../../../yaml/xyz/openbmc_project/State/Host.interface.yaml',
+    ],
+    output: [
+        'error.cpp',
+        'error.hpp',
+        'common.hpp',
+        'server.hpp',
+        'server.cpp',
+        'aserver.hpp',
+        'client.hpp',
+    ],
     depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +25,16 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Host',
     ],
+    install: should_generate_cpp,
+    install_dir: [
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+        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/State/Leak/Detector/meson.build b/gen/xyz/openbmc_project/State/Leak/Detector/meson.build
index 1eccd0c..852e91d 100644
--- a/gen/xyz/openbmc_project/State/Leak/Detector/meson.build
+++ b/gen/xyz/openbmc_project/State/Leak/Detector/meson.build
@@ -1,8 +1,22 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Leak/Detector'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Leak/Detector__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/State/Leak/Detector.events.yaml', '../../../../../../yaml/xyz/openbmc_project/State/Leak/Detector.interface.yaml',  ],
-    output: [ 'event.cpp', 'event.hpp', 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/State/Leak/Detector.events.yaml',
+        '../../../../../../yaml/xyz/openbmc_project/State/Leak/Detector.interface.yaml',
+    ],
+    output: [
+        'event.cpp',
+        'event.hpp',
+        'common.hpp',
+        'server.hpp',
+        'server.cpp',
+        'aserver.hpp',
+        'client.hpp',
+    ],
     depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +25,16 @@
         '--directory', meson.current_source_dir() / '../../../../../../yaml',
         'xyz/openbmc_project/State/Leak/Detector',
     ],
+    install: should_generate_cpp,
+    install_dir: [
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+        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/State/Leak/meson.build b/gen/xyz/openbmc_project/State/Leak/meson.build
index ff45579..b9faeb8 100644
--- a/gen/xyz/openbmc_project/State/Leak/meson.build
+++ b/gen/xyz/openbmc_project/State/Leak/meson.build
@@ -1,6 +1,9 @@
 # Generated file; do not modify.
 subdir('Detector')
-generated_others += custom_target(
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Leak'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Leak/Detector__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/State/Leak/Detector.events.yaml', '../../../../../yaml/xyz/openbmc_project/State/Leak/Detector.interface.yaml',  ],
     output: [ 'Detector.md' ],
@@ -12,5 +15,25 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Leak/Detector',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
+)
+
+generated_registry += custom_target(
+    'xyz/openbmc_project/State/Leak/Detector__registry'.underscorify(),
+    input: [ '../../../../../yaml/xyz/openbmc_project/State/Leak/Detector.events.yaml',  ],
+    output: [ 'Detector.json' ],
+    depend_files: sdbusplusplus_depfiles,
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'registry',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../../yaml',
+        'xyz/openbmc_project/State/Leak/Detector',
+    ],
+    install: should_generate_registry,
+    install_dir: [inst_registry_dir / sdbusplus_current_path],
+    build_by_default: should_generate_registry,
 )
 
diff --git a/gen/xyz/openbmc_project/State/OperatingSystem/Status/meson.build b/gen/xyz/openbmc_project/State/OperatingSystem/Status/meson.build
index e40a7d7..1a08371 100644
--- a/gen/xyz/openbmc_project/State/OperatingSystem/Status/meson.build
+++ b/gen/xyz/openbmc_project/State/OperatingSystem/Status/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/OperatingSystem/Status'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/OperatingSystem/Status__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/State/OperatingSystem/Status.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/State/OperatingSystem/Status.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/State/OperatingSystem/Status',
     ],
+    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/State/OperatingSystem/meson.build b/gen/xyz/openbmc_project/State/OperatingSystem/meson.build
index f7bb788..6281f48 100644
--- a/gen/xyz/openbmc_project/State/OperatingSystem/meson.build
+++ b/gen/xyz/openbmc_project/State/OperatingSystem/meson.build
@@ -1,6 +1,9 @@
 # Generated file; do not modify.
 subdir('Status')
-generated_others += custom_target(
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/OperatingSystem'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/OperatingSystem/Status__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/State/OperatingSystem/Status.interface.yaml',  ],
     output: [ 'Status.md' ],
@@ -12,5 +15,8 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/OperatingSystem/Status',
     ],
+    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/State/PowerOnHours/meson.build b/gen/xyz/openbmc_project/State/PowerOnHours/meson.build
index a0f8444..25ee07c 100644
--- a/gen/xyz/openbmc_project/State/PowerOnHours/meson.build
+++ b/gen/xyz/openbmc_project/State/PowerOnHours/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/PowerOnHours'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/PowerOnHours__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/State/PowerOnHours.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/State/PowerOnHours.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/State/PowerOnHours',
     ],
+    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/State/ScheduledHostTransition/meson.build b/gen/xyz/openbmc_project/State/ScheduledHostTransition/meson.build
index 9e25e33..931318e 100644
--- a/gen/xyz/openbmc_project/State/ScheduledHostTransition/meson.build
+++ b/gen/xyz/openbmc_project/State/ScheduledHostTransition/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/ScheduledHostTransition'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/ScheduledHostTransition__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/State/ScheduledHostTransition.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/State/ScheduledHostTransition.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/State/ScheduledHostTransition',
     ],
+    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/State/Shutdown/Inventory/meson.build b/gen/xyz/openbmc_project/State/Shutdown/Inventory/meson.build
index 65dfedb..9010530 100644
--- a/gen/xyz/openbmc_project/State/Shutdown/Inventory/meson.build
+++ b/gen/xyz/openbmc_project/State/Shutdown/Inventory/meson.build
@@ -1,8 +1,16 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Shutdown/Inventory'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Shutdown/Inventory__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/State/Shutdown/Inventory.errors.yaml',  ],
-    output: [ 'error.cpp', 'error.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/State/Shutdown/Inventory.errors.yaml',
+    ],
+    output: [
+        'error.cpp',
+        'error.hpp',
+    ],
     depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +19,11 @@
         '--directory', meson.current_source_dir() / '../../../../../../yaml',
         'xyz/openbmc_project/State/Shutdown/Inventory',
     ],
+    install: should_generate_cpp,
+    install_dir: [
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+    ],
+    build_by_default: should_generate_cpp,
 )
 
diff --git a/gen/xyz/openbmc_project/State/Shutdown/Power/meson.build b/gen/xyz/openbmc_project/State/Shutdown/Power/meson.build
index d0a6dfe..5812a7a 100644
--- a/gen/xyz/openbmc_project/State/Shutdown/Power/meson.build
+++ b/gen/xyz/openbmc_project/State/Shutdown/Power/meson.build
@@ -1,8 +1,16 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Shutdown/Power'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Shutdown/Power__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/State/Shutdown/Power.errors.yaml',  ],
-    output: [ 'error.cpp', 'error.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/State/Shutdown/Power.errors.yaml',
+    ],
+    output: [
+        'error.cpp',
+        'error.hpp',
+    ],
     depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +19,11 @@
         '--directory', meson.current_source_dir() / '../../../../../../yaml',
         'xyz/openbmc_project/State/Shutdown/Power',
     ],
+    install: should_generate_cpp,
+    install_dir: [
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+    ],
+    build_by_default: should_generate_cpp,
 )
 
diff --git a/gen/xyz/openbmc_project/State/Shutdown/ThermalEvent/meson.build b/gen/xyz/openbmc_project/State/Shutdown/ThermalEvent/meson.build
index c7f0897..487cab0 100644
--- a/gen/xyz/openbmc_project/State/Shutdown/ThermalEvent/meson.build
+++ b/gen/xyz/openbmc_project/State/Shutdown/ThermalEvent/meson.build
@@ -1,8 +1,16 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Shutdown/ThermalEvent'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Shutdown/ThermalEvent__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/State/Shutdown/ThermalEvent.errors.yaml',  ],
-    output: [ 'error.cpp', 'error.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/State/Shutdown/ThermalEvent.errors.yaml',
+    ],
+    output: [
+        'error.cpp',
+        'error.hpp',
+    ],
     depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +19,11 @@
         '--directory', meson.current_source_dir() / '../../../../../../yaml',
         'xyz/openbmc_project/State/Shutdown/ThermalEvent',
     ],
+    install: should_generate_cpp,
+    install_dir: [
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+    ],
+    build_by_default: should_generate_cpp,
 )
 
diff --git a/gen/xyz/openbmc_project/State/Shutdown/meson.build b/gen/xyz/openbmc_project/State/Shutdown/meson.build
index 8c63dc3..64602cb 100644
--- a/gen/xyz/openbmc_project/State/Shutdown/meson.build
+++ b/gen/xyz/openbmc_project/State/Shutdown/meson.build
@@ -1,6 +1,11 @@
 # Generated file; do not modify.
 subdir('Inventory')
-generated_others += custom_target(
+subdir('Power')
+subdir('ThermalEvent')
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Shutdown'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Shutdown/Inventory__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/State/Shutdown/Inventory.errors.yaml',  ],
     output: [ 'Inventory.md' ],
@@ -12,10 +17,12 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Shutdown/Inventory',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Power')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Shutdown/Power__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/State/Shutdown/Power.errors.yaml',  ],
     output: [ 'Power.md' ],
@@ -27,10 +34,12 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Shutdown/Power',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('ThermalEvent')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Shutdown/ThermalEvent__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/State/Shutdown/ThermalEvent.errors.yaml',  ],
     output: [ 'ThermalEvent.md' ],
@@ -42,5 +51,8 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/Shutdown/ThermalEvent',
     ],
+    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/State/SystemdTarget/meson.build b/gen/xyz/openbmc_project/State/SystemdTarget/meson.build
index ad4018e..88fab84 100644
--- a/gen/xyz/openbmc_project/State/SystemdTarget/meson.build
+++ b/gen/xyz/openbmc_project/State/SystemdTarget/meson.build
@@ -1,8 +1,16 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/SystemdTarget'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/SystemdTarget__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/State/SystemdTarget.errors.yaml',  ],
-    output: [ 'error.cpp', 'error.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/State/SystemdTarget.errors.yaml',
+    ],
+    output: [
+        'error.cpp',
+        'error.hpp',
+    ],
     depend_files: sdbusplusplus_depfiles,
     command: [
         sdbuspp_gen_meson_prog, '--command', 'cpp',
@@ -11,5 +19,11 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/State/SystemdTarget',
     ],
+    install: should_generate_cpp,
+    install_dir: [
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+    ],
+    build_by_default: should_generate_cpp,
 )
 
diff --git a/gen/xyz/openbmc_project/State/Watchdog/meson.build b/gen/xyz/openbmc_project/State/Watchdog/meson.build
index 4259d12..cea522f 100644
--- a/gen/xyz/openbmc_project/State/Watchdog/meson.build
+++ b/gen/xyz/openbmc_project/State/Watchdog/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/State/Watchdog'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/State/Watchdog__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/State/Watchdog.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/State/Watchdog.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/State/Watchdog',
     ],
+    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/State/meson.build b/gen/xyz/openbmc_project/State/meson.build
index 3115b3c..247f9c4 100644
--- a/gen/xyz/openbmc_project/State/meson.build
+++ b/gen/xyz/openbmc_project/State/meson.build
@@ -1,6 +1,23 @@
 # Generated file; do not modify.
 subdir('BMC')
-generated_others += custom_target(
+subdir('BMCRedundancy')
+subdir('Boot')
+subdir('Cable')
+subdir('Chassis')
+subdir('Decorator')
+subdir('Drive')
+subdir('Host')
+subdir('Leak')
+subdir('OperatingSystem')
+subdir('PowerOnHours')
+subdir('ScheduledHostTransition')
+subdir('Shutdown')
+subdir('SystemdTarget')
+subdir('Watchdog')
+
+sdbusplus_current_path = 'xyz/openbmc_project/State'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/BMC__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/State/BMC.errors.yaml', '../../../../yaml/xyz/openbmc_project/State/BMC.interface.yaml',  ],
     output: [ 'BMC.md' ],
@@ -12,10 +29,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/State/BMC',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('BMCRedundancy')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/BMCRedundancy__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/State/BMCRedundancy.interface.yaml',  ],
     output: [ 'BMCRedundancy.md' ],
@@ -27,11 +46,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/State/BMCRedundancy',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Boot')
-subdir('Cable')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Cable__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/State/Cable.events.yaml',  ],
     output: [ 'Cable.md' ],
@@ -43,10 +63,29 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/State/Cable',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Chassis')
-generated_others += custom_target(
+generated_registry += custom_target(
+    'xyz/openbmc_project/State/Cable__registry'.underscorify(),
+    input: [ '../../../../yaml/xyz/openbmc_project/State/Cable.events.yaml',  ],
+    output: [ 'Cable.json' ],
+    depend_files: sdbusplusplus_depfiles,
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'registry',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../yaml',
+        'xyz/openbmc_project/State/Cable',
+    ],
+    install: should_generate_registry,
+    install_dir: [inst_registry_dir / sdbusplus_current_path],
+    build_by_default: should_generate_registry,
+)
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Chassis__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/State/Chassis.errors.yaml', '../../../../yaml/xyz/openbmc_project/State/Chassis.interface.yaml',  ],
     output: [ 'Chassis.md' ],
@@ -58,11 +97,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/State/Chassis',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Decorator')
-subdir('Drive')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Drive__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/State/Drive.interface.yaml',  ],
     output: [ 'Drive.md' ],
@@ -74,10 +114,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/State/Drive',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Host')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Host__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/State/Host.errors.yaml', '../../../../yaml/xyz/openbmc_project/State/Host.interface.yaml',  ],
     output: [ 'Host.md' ],
@@ -89,12 +131,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/State/Host',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Leak')
-subdir('OperatingSystem')
-subdir('PowerOnHours')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/PowerOnHours__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/State/PowerOnHours.interface.yaml',  ],
     output: [ 'PowerOnHours.md' ],
@@ -106,10 +148,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/State/PowerOnHours',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('ScheduledHostTransition')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/ScheduledHostTransition__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/State/ScheduledHostTransition.interface.yaml',  ],
     output: [ 'ScheduledHostTransition.md' ],
@@ -121,11 +165,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/State/ScheduledHostTransition',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Shutdown')
-subdir('SystemdTarget')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/SystemdTarget__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/State/SystemdTarget.errors.yaml',  ],
     output: [ 'SystemdTarget.md' ],
@@ -137,10 +182,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/State/SystemdTarget',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Watchdog')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/State/Watchdog__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/State/Watchdog.interface.yaml',  ],
     output: [ 'Watchdog.md' ],
@@ -152,5 +199,8 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/State/Watchdog',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )