aboutsummaryrefslogtreecommitdiffstats
path: root/build/conf/project_specific/alice/nlg.conf
blob: a04b181c9e7b3a3ad304aa7e3f68f158a264ef4f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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)
}