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/User/AccountPolicy/meson.build b/gen/xyz/openbmc_project/User/AccountPolicy/meson.build
index ec2ca11..b08320c 100644
--- a/gen/xyz/openbmc_project/User/AccountPolicy/meson.build
+++ b/gen/xyz/openbmc_project/User/AccountPolicy/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/User/AccountPolicy'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/User/AccountPolicy__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/User/AccountPolicy.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/User/AccountPolicy.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/User/AccountPolicy',
     ],
+    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/User/Attributes/meson.build b/gen/xyz/openbmc_project/User/Attributes/meson.build
index de43e71..080d965 100644
--- a/gen/xyz/openbmc_project/User/Attributes/meson.build
+++ b/gen/xyz/openbmc_project/User/Attributes/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/User/Attributes'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/User/Attributes__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/User/Attributes.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/User/Attributes.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/User/Attributes',
     ],
+    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/User/Common/meson.build b/gen/xyz/openbmc_project/User/Common/meson.build
index 703f40b..432e246 100644
--- a/gen/xyz/openbmc_project/User/Common/meson.build
+++ b/gen/xyz/openbmc_project/User/Common/meson.build
@@ -1,8 +1,16 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/User/Common'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/User/Common__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/User/Common.errors.yaml',  ],
-    output: [ 'error.cpp', 'error.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/User/Common.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/User/Common',
     ],
+    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/User/Ldap/Config/meson.build b/gen/xyz/openbmc_project/User/Ldap/Config/meson.build
index 602e577..123c0e0 100644
--- a/gen/xyz/openbmc_project/User/Ldap/Config/meson.build
+++ b/gen/xyz/openbmc_project/User/Ldap/Config/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/User/Ldap/Config'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/User/Ldap/Config__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/User/Ldap/Config.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/User/Ldap/Config.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/User/Ldap/Config',
     ],
+    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/User/Ldap/Create/meson.build b/gen/xyz/openbmc_project/User/Ldap/Create/meson.build
index 0d7594d..8abffc6 100644
--- a/gen/xyz/openbmc_project/User/Ldap/Create/meson.build
+++ b/gen/xyz/openbmc_project/User/Ldap/Create/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/User/Ldap/Create'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/User/Ldap/Create__cpp'.underscorify(),
-    input: [ '../../../../../../yaml/xyz/openbmc_project/User/Ldap/Create.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/User/Ldap/Create.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/User/Ldap/Create',
     ],
+    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/User/Ldap/meson.build b/gen/xyz/openbmc_project/User/Ldap/meson.build
index b45ac4f..749c80f 100644
--- a/gen/xyz/openbmc_project/User/Ldap/meson.build
+++ b/gen/xyz/openbmc_project/User/Ldap/meson.build
@@ -1,6 +1,10 @@
 # Generated file; do not modify.
 subdir('Config')
-generated_others += custom_target(
+subdir('Create')
+
+sdbusplus_current_path = 'xyz/openbmc_project/User/Ldap'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/User/Ldap/Config__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/User/Ldap/Config.interface.yaml',  ],
     output: [ 'Config.md' ],
@@ -12,10 +16,12 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/User/Ldap/Config',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Create')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/User/Ldap/Create__markdown'.underscorify(),
     input: [ '../../../../../yaml/xyz/openbmc_project/User/Ldap/Create.interface.yaml',  ],
     output: [ 'Create.md' ],
@@ -27,5 +33,8 @@
         '--directory', meson.current_source_dir() / '../../../../../yaml',
         'xyz/openbmc_project/User/Ldap/Create',
     ],
+    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/User/Manager/meson.build b/gen/xyz/openbmc_project/User/Manager/meson.build
index 01b05bc..75e1069 100644
--- a/gen/xyz/openbmc_project/User/Manager/meson.build
+++ b/gen/xyz/openbmc_project/User/Manager/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/User/Manager'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/User/Manager__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/User/Manager.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/User/Manager.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/User/Manager',
     ],
+    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/User/MultiFactorAuthConfiguration/meson.build b/gen/xyz/openbmc_project/User/MultiFactorAuthConfiguration/meson.build
index e4e66c9..88bae9e 100644
--- a/gen/xyz/openbmc_project/User/MultiFactorAuthConfiguration/meson.build
+++ b/gen/xyz/openbmc_project/User/MultiFactorAuthConfiguration/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/User/MultiFactorAuthConfiguration'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/User/MultiFactorAuthConfiguration__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/User/MultiFactorAuthConfiguration.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/User/MultiFactorAuthConfiguration.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/User/MultiFactorAuthConfiguration',
     ],
+    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/User/PrivilegeMapper/meson.build b/gen/xyz/openbmc_project/User/PrivilegeMapper/meson.build
index 14d17ca..a6d4832 100644
--- a/gen/xyz/openbmc_project/User/PrivilegeMapper/meson.build
+++ b/gen/xyz/openbmc_project/User/PrivilegeMapper/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/User/PrivilegeMapper'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/User/PrivilegeMapper__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/User/PrivilegeMapper.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/User/PrivilegeMapper.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/User/PrivilegeMapper',
     ],
+    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/User/PrivilegeMapperEntry/meson.build b/gen/xyz/openbmc_project/User/PrivilegeMapperEntry/meson.build
index aaa9fd0..3126fbe 100644
--- a/gen/xyz/openbmc_project/User/PrivilegeMapperEntry/meson.build
+++ b/gen/xyz/openbmc_project/User/PrivilegeMapperEntry/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/User/PrivilegeMapperEntry'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/User/PrivilegeMapperEntry__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/User/PrivilegeMapperEntry.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/User/PrivilegeMapperEntry.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/User/PrivilegeMapperEntry',
     ],
+    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/User/TOTPAuthenticator/meson.build b/gen/xyz/openbmc_project/User/TOTPAuthenticator/meson.build
index 1d8e229..31cd1f3 100644
--- a/gen/xyz/openbmc_project/User/TOTPAuthenticator/meson.build
+++ b/gen/xyz/openbmc_project/User/TOTPAuthenticator/meson.build
@@ -1,8 +1,19 @@
 # Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/User/TOTPAuthenticator'
+
 generated_sources += custom_target(
     'xyz/openbmc_project/User/TOTPAuthenticator__cpp'.underscorify(),
-    input: [ '../../../../../yaml/xyz/openbmc_project/User/TOTPAuthenticator.interface.yaml',  ],
-    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'aserver.hpp', 'client.hpp',  ],
+    input: [
+        '../../../../../yaml/xyz/openbmc_project/User/TOTPAuthenticator.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/User/TOTPAuthenticator',
     ],
+    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/User/meson.build b/gen/xyz/openbmc_project/User/meson.build
index 378518f..3b290d6 100644
--- a/gen/xyz/openbmc_project/User/meson.build
+++ b/gen/xyz/openbmc_project/User/meson.build
@@ -1,6 +1,17 @@
 # Generated file; do not modify.
 subdir('AccountPolicy')
-generated_others += custom_target(
+subdir('Attributes')
+subdir('Common')
+subdir('Ldap')
+subdir('Manager')
+subdir('MultiFactorAuthConfiguration')
+subdir('PrivilegeMapper')
+subdir('PrivilegeMapperEntry')
+subdir('TOTPAuthenticator')
+
+sdbusplus_current_path = 'xyz/openbmc_project/User'
+
+generated_markdown += custom_target(
     'xyz/openbmc_project/User/AccountPolicy__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/User/AccountPolicy.interface.yaml',  ],
     output: [ 'AccountPolicy.md' ],
@@ -12,10 +23,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/User/AccountPolicy',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Attributes')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/User/Attributes__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/User/Attributes.interface.yaml',  ],
     output: [ 'Attributes.md' ],
@@ -27,10 +40,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/User/Attributes',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Common')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/User/Common__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/User/Common.errors.yaml',  ],
     output: [ 'Common.md' ],
@@ -42,11 +57,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/User/Common',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('Ldap')
-subdir('Manager')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/User/Manager__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/User/Manager.interface.yaml',  ],
     output: [ 'Manager.md' ],
@@ -58,10 +74,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/User/Manager',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('MultiFactorAuthConfiguration')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/User/MultiFactorAuthConfiguration__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/User/MultiFactorAuthConfiguration.interface.yaml',  ],
     output: [ 'MultiFactorAuthConfiguration.md' ],
@@ -73,10 +91,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/User/MultiFactorAuthConfiguration',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('PrivilegeMapper')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/User/PrivilegeMapper__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/User/PrivilegeMapper.interface.yaml',  ],
     output: [ 'PrivilegeMapper.md' ],
@@ -88,10 +108,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/User/PrivilegeMapper',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('PrivilegeMapperEntry')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/User/PrivilegeMapperEntry__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/User/PrivilegeMapperEntry.interface.yaml',  ],
     output: [ 'PrivilegeMapperEntry.md' ],
@@ -103,10 +125,12 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/User/PrivilegeMapperEntry',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )
 
-subdir('TOTPAuthenticator')
-generated_others += custom_target(
+generated_markdown += custom_target(
     'xyz/openbmc_project/User/TOTPAuthenticator__markdown'.underscorify(),
     input: [ '../../../../yaml/xyz/openbmc_project/User/TOTPAuthenticator.interface.yaml',  ],
     output: [ 'TOTPAuthenticator.md' ],
@@ -118,5 +142,8 @@
         '--directory', meson.current_source_dir() / '../../../../yaml',
         'xyz/openbmc_project/User/TOTPAuthenticator',
     ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
 )