]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common: generate legacy_config_opts.h from .yaml.in files
authorKefu Chai <kchai@redhat.com>
Tue, 13 Apr 2021 05:43:57 +0000 (13:43 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 15 Apr 2021 04:37:43 +0000 (12:37 +0800)
commit5505fc0051a302fed46aa2ecaa8c8aa2a75b9e91
tree9139f678d4c9bcc4a4141cb98b28b41e78aae4d9
parent3c0aa2d70a2c39f18bff23b9b7e1e3d1eb8d3206
common: generate legacy_config_opts.h from .yaml.in files

* add a setting named "with_legacy" to .yaml.in files, so
  each option with a true "with_legacy" will have an entry
  in legacy_config_opts.h.
* preserve the comments from legacy_config_opts.h to .yaml.in,
  some of them are solely for developers, but some of them are
  good reading for users as well. we can use them for "desc"
  field in a follow-up change.
* move common/legacy_config_opts.h to common/options/legacy_config_opts.h
  as legacy_config_opts.h is "closer" to the options directory
  than other sources files under src/common.
* update y2c.py to generate separate .h files which are in turn
  included by legacy_config_opts.h
* add a target named "legacy-option-headers", and let
  some targets depend on it so that these headers generated by
  y2c.py can be generated before the .cc files including them
  are compiled.

Signed-off-by: Kefu Chai <kchai@redhat.com>
13 files changed:
src/CMakeLists.txt
src/auth/CMakeLists.txt
src/common/CMakeLists.txt
src/common/config.cc
src/common/config_values.h
src/common/legacy_config_opts.h [deleted file]
src/common/options/CMakeLists.txt
src/common/options/global.yaml.in
src/common/options/legacy_config_opts.h [new file with mode: 0644]
src/common/options/mds-client.yaml.in
src/common/options/mds.yaml.in
src/common/options/rgw.yaml.in
src/common/options/y2c.py