diff options
author | snermolaev <snermolaev@yandex-team.com> | 2023-09-12 10:30:44 +0300 |
---|---|---|
committer | snermolaev <snermolaev@yandex-team.com> | 2023-09-12 10:55:13 +0300 |
commit | e3fadb45a2e38221b7293c35bc2ccc11c5a98c9a (patch) | |
tree | a3862b01083e5a7fcbe80ad1366edf207d3976bd /build/ymake_conf.py | |
parent | 0237e07bda5b67a822b92224e9fbc09bfce0430b (diff) | |
download | ydb-e3fadb45a2e38221b7293c35bc2ccc11c5a98c9a.tar.gz |
flag to disable ymake conf customization DISABLE_YMAKE_CONF_CUSTOMIZATION
Diffstat (limited to 'build/ymake_conf.py')
-rwxr-xr-x | build/ymake_conf.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/build/ymake_conf.py b/build/ymake_conf.py index c4089df22c..8607b8365f 100755 --- a/build/ymake_conf.py +++ b/build/ymake_conf.py @@ -25,6 +25,14 @@ def init_logger(verbose): logging.basicConfig(level=logging.DEBUG if verbose else logging.INFO) +def find_conf(conf_file): + script_dir = os.path.dirname(__file__) + full_path = os.path.join(script_dir, conf_file) + if os.path.exists(full_path): + return full_path + return None + + class DebugString(object): def __init__(self, get_string_func): self.get_string_func = get_string_func @@ -778,17 +786,6 @@ class YMake(object): def print_settings(self): emit_with_ignore_comment('ARCADIA_ROOT', self.arcadia.root) - @staticmethod - def _find_conf(conf_file): - script_dir = os.path.dirname(__file__) - full_path = os.path.join(script_dir, conf_file) - if os.path.exists(full_path): - return full_path - return None - - def _find_core_conf(self): - return self._find_conf('ymake.core.conf') - class System(object): def __init__(self, platform): @@ -2536,6 +2533,11 @@ def main(): build = Build(arcadia, options.build_type, options.toolchain_params, force_ignore_local_files=not options.local_distbuild) build.print_build() + _INTERNAL_CONF = 'internal/conf/internal.conf' + internal_conf_full_path = find_conf(_INTERNAL_CONF) + if internal_conf_full_path and not is_positive('DISABLE_YMAKE_CONF_CUSTOMIZATION'): + print('@import "${{CONF_ROOT}}/{}"'.format(_INTERNAL_CONF)) + emit_with_ignore_comment('CONF_SCRIPT_DEPENDS', __file__) |