diff options
author | snermolaev <snermolaev@yandex-team.com> | 2023-08-10 09:08:12 +0300 |
---|---|---|
committer | snermolaev <snermolaev@yandex-team.com> | 2023-08-10 10:34:28 +0300 |
commit | de7011fdcbc2c97cac915ac397a21057e64267b0 (patch) | |
tree | 4cbf10d279c5caf741cb30646913c9add1e67015 /build | |
parent | 3d2b9ca36aa6d1be0b792ebd485cc880f813f266 (diff) | |
download | ydb-de7011fdcbc2c97cac915ac397a21057e64267b0.tar.gz |
remove use of MACRO_ALIAS
Diffstat (limited to 'build')
-rw-r--r-- | build/conf/fbs.conf | 12 | ||||
-rw-r--r-- | build/conf/java.conf | 12 | ||||
-rw-r--r-- | build/conf/proto.conf | 24 | ||||
-rw-r--r-- | build/ymake.core.conf | 33 |
4 files changed, 61 insertions, 20 deletions
diff --git a/build/conf/fbs.conf b/build/conf/fbs.conf index 6e71c26cb2..8a424d5556 100644 --- a/build/conf/fbs.conf +++ b/build/conf/fbs.conf @@ -1,5 +1,6 @@ # tag:fbs FLATC_FLAGS_VALUE= + ### @usage: FLATC_FLAGS(flags...) ### ### Add flags to flatc command line @@ -63,7 +64,7 @@ macro _GO_FLATC_CMD(SRC, PACKAGE_NAME) { ### acrchive will have .fbs.jsrc extension. Files with .fbs.jsrc extension will ### be added to results when --add-flatbuf-result flag is specified on the command ### line for 'ya make ...' -macro _JAVA_FLATC_CMD(SRC) { +macro _JAVA_FLATC_CMD(SRC, SRCFLAGS...) { .CMD=${cwd:ARCADIA_BUILD_ROOT} ${tool:"contrib/tools/flatc"} --java --gen-mutable ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR} ${input:SRC} && $YMAKE_PYTHON3 ${input:"build/scripts/tar_sources.py"} --input $BINDIR --output ${output;nopath;noext:SRC.fbs.jsrc} --exts .java ${kv;hide:"p FJ"} ${kv;hide:"pc light-green"} .PEERDIR=contrib/java/com/google/flatbuffers/flatbuffers-java/${JAVA_FLATBUFFERS_VERSION} } @@ -132,3 +133,12 @@ multimodule FBS_LIBRARY { OBJ_SUF=.py3 } } + +macro FBS_CMD(SRC, SRCFLAGS...) { + .CMD=$_FBS_CMDLINE + .SEM=$_FBS_CMDLINE +} + +_CPP_FLATC_CMDLINE=$_CPP_FLATC_CMD($SRC $SRCFLAGS) +_CPP_FLATC64_CMDLINE=$_CPP_FLATC64_CMD($SRC $SRCFLAGS) +_JAVA_FLATC_CMDLINE=$_JAVA_FLATC_CMD($SRC $SRCFLAGS) diff --git a/build/conf/java.conf b/build/conf/java.conf index 85c6e336cf..ff4d34ab2f 100644 --- a/build/conf/java.conf +++ b/build/conf/java.conf @@ -242,9 +242,9 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT { PEERDIR_TAGS=JAVA_PROTO JAVA_FBS JAVA_IDL PACKAGE_UNION HAS_MANAGEABLE_PEERS=yes DYNAMIC_LINK=yes - MACRO_ALIAS(PROTO_CMD _JAVA_PROTO_CMD) - MACRO_ALIAS(EVLOG_CMD _JAVA_EVLOG_CMD) - MACRO_ALIAS(FBS_CMD _JAVA_FLATC_CMD) + _PROTO_CMDLINE=$_JAVA_PROTO_CMDLINE + _EVLOG_CMDLINE=$_JAVA_EVLOG_CMDLINE + _FBS_CMDLINE=$_JAVA_FLATC_CMDLINE when ($PACKAGE_PREFIX) { PACKAGE_PREFIX_ARGS=--package-prefix=$PACKAGE_PREFIX @@ -361,9 +361,9 @@ module _JAR_BASE: _BARE_UNIT { HAS_MANAGEABLE_PEERS=yes DYNAMIC_LINK=yes - MACRO_ALIAS(PROTO_CMD _JAVA_PROTO_CMD) - MACRO_ALIAS(EVLOG_CMD _JAVA_EVLOG_CMD) - MACRO_ALIAS(FBS_CMD _JAVA_FLATC_CMD) + _PROTO_CMDLINE=$_JAVA_PROTO_CMDLINE + _EVLOG_CMDLINE=$_JAVA_EVLOG_CMDLINE + _FBS_CMDLINE=$_JAVA_FLATC_CMDLINE DISABLE(NEED_PLATFORM_PEERDIRS) NO_PLATFORM() diff --git a/build/conf/proto.conf b/build/conf/proto.conf index cf97fda7a1..83114e4c42 100644 --- a/build/conf/proto.conf +++ b/build/conf/proto.conf @@ -739,8 +739,8 @@ multimodule PROTO_LIBRARY { MODULE_SUFFIX=.self.protodesc SET(MODULE_TYPE LIBRARY) - MACRO_ALIAS(EVLOG_CMD _PROTO_DESC_CMD) - MACRO_ALIAS(PROTO_CMD _PROTO_DESC_CMD) + _EVLOG_CMDLINE=$_PROTO_DESC_CMDLINE + _PROTO_CMDLINE=$_PROTO_DESC_CMDLINE when ($_COMMON_GOOGLE_APIS != "None") { PEERDIR += contrib/libs/googleapis-common-protos @@ -772,3 +772,23 @@ module PROTO_DESCRIPTIONS: _BARE_UNIT { module PROTO_REGISTRY: PROTO_DESCRIPTIONS { SET(MODULE_TYPE PROTO_REGISTRY) } + +macro EVLOG_CMD(SRC) { + .CMD=$_EVLOG_CMDLINE + .SEM=$_EVLOG_CMDLINE +} + +macro PROTO_CMD(SRC) { + .CMD=$_PROTO_CMDLINE + .SEM=$_PROTO_CMDLINE +} + +_CPP_EVLOG_CMDLINE=$_CPP_EVLOG_CMD($SRC) +_CPP_PROTO_CMDLINE=$_CPP_PROTO_CMD($SRC) +_CPP_PROTO_EVLOG_CMDLINE=$_CPP_PROTO_EVLOG_CMD($SRC) +_CPP_VANILLA_PROTO_CMDLINE=$_CPP_VANILLA_PROTO_CMD($SRC) +_JAVA_EVLOG_CMDLINE=$_JAVA_EVLOG_CMD($SRC) +_JAVA_PROTO_CMDLINE=$_JAVA_PROTO_CMD($SRC) +_PROTO_DESC_CMDLINE=$_PROTO_DESC_CMD($SRC) +_PY_EVLOG_CMDLINE=$_PY_EVLOG_CMD($SRC) +_PY_PROTO_CMDLINE=$_PY_PROTO_CMD($SRC) diff --git a/build/ymake.core.conf b/build/ymake.core.conf index 807ec2b969..8b04ca2368 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -32,6 +32,7 @@ OBJ_SUF= CFLAGS= EXTRA_C_FLAGS= SFLAGS= +SRCFLAGS= FORCE_COVERAGE_ENABLED= FORCE_COVERAGE_DISABLED= @@ -490,24 +491,24 @@ module _BASE_UNIT: _BARE_UNIT { } when ($PY_PROTOS_FOR == "yes") { - MACRO_ALIAS(EVLOG_CMD _PY_EVLOG_CMD) - MACRO_ALIAS(PROTO_CMD _PY_PROTO_CMD) + _EVLOG_CMDLINE=$_PY_EVLOG_CMDLINE + _PROTO_CMDLINE=$_PY_PROTO_CMDLINE } otherwise { - MACRO_ALIAS(EVLOG_CMD _CPP_EVLOG_CMD) - MACRO_ALIAS(FBS_CMD _CPP_FLATC_CMD) + _EVLOG_CMDLINE=$_CPP_EVLOG_CMDLINE + _FBS_CMDLINE=$_CPP_FLATC_CMDLINE when ($BUILD_PROTO_AS_EVLOG == "yes") { - MACRO_ALIAS(PROTO_CMD _CPP_PROTO_EVLOG_CMD) + _PROTO_CMDLINE=$_CPP_PROTO_EVLOG_CMDLINE } otherwise { - MACRO_ALIAS(PROTO_CMD _CPP_PROTO_CMD) + _PROTO_CMDLINE=$_CPP_PROTO_CMDLINE } when ($USE_VANILLA_PROTOC == "yes") { PROTOC=${tool:"contrib/tools/protoc_std"} PROTOC_STYLEGUIDE_OUT= PROTOC_PLUGIN_STYLEGUIDE= PROTOBUF_PATH=${ARCADIA_ROOT}/contrib/libs/protobuf_std - MACRO_ALIAS(PROTO_CMD _CPP_VANILLA_PROTO_CMD) + _PROTO_CMDLINE=$_CPP_VANILLA_PROTO_CMDLINE } when ($PROTOC_TRANSITIVE_HEADERS == "no") { CPP_PROTO_PLUGINS=transitive_pb_h=false:${CPP_PROTO_PLUGINS} @@ -3237,10 +3238,15 @@ macro _SRC_py3src(SRC, SRCFLAGS...) { # tag:src-processing python-specific when ($PYTHON3 == "yes") { - MACRO_ALIAS(_SRC_PYSRC _SRC_py3src) + _SRC_PYSRC_CMDLINE=$_SRC_py3src($SRC $SRCFLAGS) } otherwise { - MACRO_ALIAS(_SRC_PYSRC _SRC_py2src) + _SRC_PYSRC_CMDLINE=$_SRC_py2src($SRC $SRCFLAGS) +} + +# tag:src-processing tag:python-specific +macro _SRC_PYSRC(SRC, SRCFLAGS...) { + .CMD=$_SRC_PYSRC_CMDLINE } # tag:src-processing @@ -4872,10 +4878,15 @@ macro _SRC_nasm(SRC, PREINCLUDES[], SRCFLAGS...) { # tag:src-processing when ($USE_NASM_ASSEMBLER == "yes") { - MACRO_ALIAS(_SRC_ASM _SRC_nasm) + _SRC_ASM_CMDLINE=$_SRC_nasm($SRC $SRCFLAGS) } otherwise { - MACRO_ALIAS(_SRC_ASM _SRC_yasm) + _SRC_ASM_CMDLINE=$_SRC_yasm($SRC $SRCFLAGS) +} + +# tag:src-processing +macro _SRC_ASM(SRC, SRCFLAGS...) { + .CMD=$_SRC_ASM_CMDLINE } ### @usage: ASM_PREINCLUDE(AsmFiles...) |