diff options
author | alexanderplat <alexanderplat@yandex-team.com> | 2023-08-28 20:24:31 +0300 |
---|---|---|
committer | alexanderplat <alexanderplat@yandex-team.com> | 2023-08-28 21:29:28 +0300 |
commit | 10b2c18f94e2a2f1634031c144f24f12adf00eac (patch) | |
tree | 0a8be7be3bc22c3ad29b02a23135dcf1e3057b32 /build | |
parent | e1752017ffd724fa07bb4cbdef7bddca4ffbac2c (diff) | |
download | ydb-10b2c18f94e2a2f1634031c144f24f12adf00eac.tar.gz |
Refactor COMPILE_NLG ya make macro
Diffstat (limited to 'build')
-rw-r--r-- | build/conf/project_specific/alice/nlg.conf | 25 | ||||
-rw-r--r-- | build/ymake.core.conf | 20 |
2 files changed, 28 insertions, 17 deletions
diff --git a/build/conf/project_specific/alice/nlg.conf b/build/conf/project_specific/alice/nlg.conf new file mode 100644 index 0000000000..a04b181c9e --- /dev/null +++ b/build/conf/project_specific/alice/nlg.conf @@ -0,0 +1,25 @@ +# tag:nlg +### @usage: COMPILE_NLG(NLG_CONFIG nlg_config.json, [TRANSLATIONS_JSON translations.json], Files...) +### +### Generate and compile .nlg templates (Jinja2-based). +### +### Alice-specific macro. +macro COMPILE_NLG(NLG_CONFIG="", TRANSLATIONS_JSON="", FILES...) { + when ($NLG_CONFIG) { + NLG_CONFIG_JSON_OPT=--nlg-config-json + } + otherwise { + NLG_CONFIG_JSON_OPT= + } + + when ($TRANSLATIONS_JSON) { + TRANSLATIONS_JSON_OPT=--translations-json + } + otherwise { + TRANSLATIONS_JSON_OPT= + } + + PEERDIR(alice/nlg/library/nlg_project_runtime) + RUN_PROGRAM(alice/nlg/tools/codegen compile-cpp --import-dir ${ARCADIA_ROOT} --out-dir ${ARCADIA_BUILD_ROOT} --include-prefix ${MODDIR} $NLG_CONFIG_JSON_OPT $NLG_CONFIG $TRANSLATIONS_JSON_OPT $TRANSLATIONS_JSON $FILES IN $NLG_CONFIG $TRANSLATIONS_JSON $FILES OUT_NOAUTO register.cpp localizable_phrases.pb.txt ${suf=.pb.txt:FILES} OUT nlg_renderer_factory.cpp nlg_renderer_factory.h translations.cpp translations.h ${suf=.cpp:FILES} ${suf=.h:FILES}) + SRCS(GLOBAL register.cpp) +} diff --git a/build/ymake.core.conf b/build/ymake.core.conf index 5ebb61670d..8396cb233e 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -4325,23 +4325,6 @@ macro BUILD_MNS(Files...) { _BUILD_MNS_FILES($Files) } -### @usage: COMPILE_NLG(nlg_config.json, [TRANSLATIONS_JSON translations.json], Src...) -### -### Generate and compile .nlg templates (Jinja2-based) and interface for megamind runtime in localized mode. -### -### Alice-specific macro -macro COMPILE_NLG(NLG_CONFIG_JSON, TRANSLATIONS_JSON="", Src...) { - when ($TRANSLATIONS_JSON) { - TRANSLATIONS_JSON_ARG=--translations-json - } - otherwise { - TRANSLATIONS_JSON_ARG= - } - PEERDIR(alice/nlg/library/nlg_project_runtime) - RUN_PROGRAM(alice/nlg/tools/codegen compile-cpp --import-dir ${ARCADIA_ROOT} --out-dir ${ARCADIA_BUILD_ROOT} --include-prefix ${MODDIR} --nlg-config-json ${NLG_CONFIG_JSON} ${TRANSLATIONS_JSON_ARG} ${TRANSLATIONS_JSON} ${Src} IN ${TRANSLATIONS_JSON} ${NLG_CONFIG_JSON} ${Src} OUT_NOAUTO nlg_renderer_factory.cpp nlg_renderer_factory.h register.cpp translations.cpp translations.h localizable_phrases.pb.txt ${suf=.cpp:Src} ${suf=.h:Src} ${suf=.pb.txt:Src}) - SRCS(GLOBAL register.cpp nlg_renderer_factory.cpp translations.cpp ${suf=.cpp:Src}) -} - ### @usage: NEED_CHECK() ### ### Commits to the project marked with this macro will be blocked by pre-commit check and then will be @@ -5088,6 +5071,9 @@ module _PROXY_LIBRARY: LIBRARY { NO_RUNTIME() } +# tag:alice-specific +@import "${CONF_ROOT}/conf/project_specific/alice/nlg.conf" + # tag:maps-specific @import "${CONF_ROOT}/conf/project_specific/maps/asrc.conf" @import "${CONF_ROOT}/conf/project_specific/maps/aar.conf" |