aboutsummaryrefslogtreecommitdiffstats
path: root/build/ymake.core.conf
diff options
context:
space:
mode:
authorspreis <spreis@yandex-team.ru>2022-02-10 16:47:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:13 +0300
commitbcd1126cbd5d445cd0665d295198aa39c6ab8cbe (patch)
treed41d29a041d5733ef148335290dbb817b197d4cd /build/ymake.core.conf
parent986cb5d624f352524bfa0c42c9a7695235cdaa41 (diff)
downloadydb-bcd1126cbd5d445cd0665d295198aa39c6ab8cbe.tar.gz
Restoring authorship annotation for <spreis@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/ymake.core.conf')
-rw-r--r--build/ymake.core.conf4168
1 files changed, 2084 insertions, 2084 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 081833998b..7bce15bf67 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -1,16 +1,16 @@
-# !!! DISCLAIMER! PLEASE DON'T IGNORE !!!
-# The FAKEID value is huge hammer. It affects UIDs of all nodes in build graph including, but not limnited to
-# any resource fetch (think java contrib), build on any language (C++, Python, Java, Go), any code generation.
-# Any build after this change will pay the price:
-# - Local builds and Sandbox builds will reload all resources from Sandbox and cached data from YT (if ready).
-# - Distributed (YT) cache warmup will take signigicant time to catch up and will need to recache everithing.
-# - Autocheck will rebuild and recache everything.
-# Use this with extreme care and only change if it is utlimately needed. Consider more specific XXX_FAKEIDs below instead.
+# !!! DISCLAIMER! PLEASE DON'T IGNORE !!!
+# The FAKEID value is huge hammer. It affects UIDs of all nodes in build graph including, but not limnited to
+# any resource fetch (think java contrib), build on any language (C++, Python, Java, Go), any code generation.
+# Any build after this change will pay the price:
+# - Local builds and Sandbox builds will reload all resources from Sandbox and cached data from YT (if ready).
+# - Distributed (YT) cache warmup will take signigicant time to catch up and will need to recache everithing.
+# - Autocheck will rebuild and recache everything.
+# Use this with extreme care and only change if it is utlimately needed. Consider more specific XXX_FAKEIDs below instead.
FAKEID=3141592653
SANDBOX_FAKEID=${FAKEID}.7600000
CPP_FAKEID=9107927
-GO_FAKEID=9056219
+GO_FAKEID=9056219
ANDROID_FAKEID=8821472
CLANG_TIDY_FAKEID=8625699
@@ -20,18 +20,18 @@ BINDIR=bin:/
SRCDIR=
YMAKE=ymake
ECHO=echo
-INCLUDE_EXTS=.h .hh .hpp .rli .cuh .inc .i
+INCLUDE_EXTS=.h .hh .hpp .rli .cuh .inc .i
CPP_EXT=.cpp
-OBJ_SUF=
+OBJ_SUF=
CFLAGS=
EXTRA_C_FLAGS=
SFLAGS=
-
+
AUTOCHECK_BALANCING_OPTIONS=
-SO_OTPUTS=no
+SO_OTPUTS=no
@import "${CONF_ROOT}/conf/settings.conf"
-@import "${CONF_ROOT}/conf/opensource.conf"
+@import "${CONF_ROOT}/conf/opensource.conf"
@import "${CONF_ROOT}/conf/rules.conf"
@import "${CONF_ROOT}/conf/sysincl.conf"
@import "${CONF_ROOT}/conf/license.conf"
@@ -53,12 +53,12 @@ when ($USE_YMAKE_RESOURCE == "yes") {
__COMMA__=${comma:""}
ARCADIA_TEST_ROOT=../arcadia_tests_data/
-DEFAULT_REQUIREMENTS=network:restricted cpu:1 ram:32
-CC_REQUIREMENTS=$DEFAULT_REQUIREMENTS
-LIB_REQUIREMENTS=$DEFAULT_REQUIREMENTS
-LD_REQUIREMENTS=$DEFAULT_REQUIREMENTS
-JAVA_REQUIREMENTS=$DEFAULT_REQUIREMENTS
-PY_REQUIREMENTS=$DEFAULT_REQUIREMENTS
+DEFAULT_REQUIREMENTS=network:restricted cpu:1 ram:32
+CC_REQUIREMENTS=$DEFAULT_REQUIREMENTS
+LIB_REQUIREMENTS=$DEFAULT_REQUIREMENTS
+LD_REQUIREMENTS=$DEFAULT_REQUIREMENTS
+JAVA_REQUIREMENTS=$DEFAULT_REQUIREMENTS
+PY_REQUIREMENTS=$DEFAULT_REQUIREMENTS
BISON_DATA_DIR=contrib/tools/bison/bison/data
CPP_BISON_SKELS=${BISON_DATA_DIR}/glr.cc ${BISON_DATA_DIR}/lalr1.cc ${BISON_DATA_DIR}/yacc.c ${BISON_DATA_DIR}/stack.hh ${BISON_DATA_DIR}/variant.hh ${BISON_DATA_DIR}/c++.m4 ${BISON_DATA_DIR}/c++-skel.m4
@@ -67,8 +67,8 @@ when ($OPENSOURCE == "yes") {
USE_PREBUILT_TOOLS=no
}
-FAIL_PY2=no
-
+FAIL_PY2=no
+
_PREBUILT_TOOLS_ROOT=build/prebuilt
_TOOL_PROTOC_GEN_GO=vendor/github.com/golang/protobuf/protoc-gen-go
_TOOL_RESCOMPILER=tools/rescompiler
@@ -111,7 +111,7 @@ otherwise {
}
# tag:codenav
-when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") {
+when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") {
PY_PROGRAM_LINK_EXE=$LINK_EXE ${kv;hide:"pyndex $TARGET"}
YNDEXER_ARGS=$YMAKE_PYTHON ${input:"build/scripts/yndexer.py"} $CPPYNDEXER_RESOURCE_GLOBAL/yndexer 1500 $(SOURCE_ROOT) $ARCADIA_BUILD_ROOT ${input:SRC}
YNDEXER_OUTPUT=${output;noauto;suf=${OBJ_CROSS_SUF}.ydx.pb2:SRC}
@@ -148,10 +148,10 @@ when ($NO_MAPREDUCE == "yes") {
C_DEFINES+=-DNO_MAPREDUCE
}
-when ($OS_ANDROID == "yes") {
- PIE=yes
-}
-
+when ($OS_ANDROID == "yes") {
+ PIE=yes
+}
+
# TODO: extract to conf/maps/maps.conf
when ($MAPSMOBI_BUILD_TARGET == "yes" && $OS_LINUX != "yes") {
USE_STL_SYSTEM=yes
@@ -290,9 +290,9 @@ ARCH_TOOL=${tool:"tools/archiver"}
PROTOC=${tool:"contrib/tools/protoc"}
PROTOC_STYLEGUIDE_OUT=--cpp_styleguide_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE
PROTOC_PLUGIN_STYLEGUIDE=--plugin=protoc-gen-cpp_styleguide=${tool:"contrib/tools/protoc/plugins/cpp_styleguide"}
-PROTOBUF_PATH=${ARCADIA_ROOT}/contrib/libs/protobuf/src
-USE_VANILLA_PROTOC=no
-
+PROTOBUF_PATH=${ARCADIA_ROOT}/contrib/libs/protobuf/src
+USE_VANILLA_PROTOC=no
+
# tag:tool-specific
FML_TOOL=${tool:"tools/relev_fml_codegen"}
FML_UNUSED_TOOL=${tool:"tools/relev_fml_unused"}
@@ -303,8 +303,8 @@ ENUM_PARSER_TOOL=${tool:"tools/enum_parser/enum_parser"}
CYTHON_SCRIPT=${input:"${ARCADIA_ROOT}/contrib/tools/cython/cython.py"}
RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
CYTHON_OUTPUT_INCLUDES=\
-${output_include;hide:"contrib/libs/python/Include/compile.h"} \
-${output_include;hide:"contrib/libs/python/Include/frameobject.h"} \
+${output_include;hide:"contrib/libs/python/Include/compile.h"} \
+${output_include;hide:"contrib/libs/python/Include/frameobject.h"} \
${output_include;hide:"contrib/libs/python/Include/longintrepr.h"} \
${output_include;hide:"contrib/libs/python/Include/pyconfig.h"} \
${output_include;hide:"contrib/libs/python/Include/Python.h"} \
@@ -435,12 +435,12 @@ when ($SANITIZER_TYPE) {
}
# tag:internal
-### @usage: CHECK_CONFIG_H(<conf_header>) # internal
+### @usage: CHECK_CONFIG_H(<conf_header>) # internal
###
### This internal macro adds checking code for configuration header in external (contrib) library.
-### The check is needed to avoid conflicts on certain types and functions available in arcadia.
-###
-### @see https://a.yandex-team.ru/arc/trunk/arcadia/build/scripts/check_config_h.py for exact details
+### The check is needed to avoid conflicts on certain types and functions available in arcadia.
+###
+### @see https://a.yandex-team.ru/arc/trunk/arcadia/build/scripts/check_config_h.py for exact details
macro CHECK_CONFIG_H(Conf) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/check_config_h.py"} ${input;rootrel:Conf} ${output;nopath;noext:Conf.config.cpp} ${kv;hide:"p CH"} ${kv;hide:"pc yellow"}
OUTPUT_INCLUDES=$Conf
@@ -481,27 +481,27 @@ macro CHECK_DEPENDENT_DIRS(TYPE, ALL?"UNUSED":"", PEERDIRS?"PEERDIRS":"ALL", RES
}
# tag:proto
-PY_PROTOS_FOR=no
-BUILD_PROTO_AS_EVLOG=no
-
-# tag:proto
+PY_PROTOS_FOR=no
+BUILD_PROTO_AS_EVLOG=no
+
+# tag:proto
PROTO_NAMESPACE=
# tag:proto tag:python-specific
GEN_PY_PROTOS=$YMAKE_PYTHON ${input:"build/scripts/gen_py_protos.py"}
# tag:proto tag:cpp-specific
-PROTO_HEADER_EXTS=.pb.h
-CPP_PROTO_CMDLINE=
+PROTO_HEADER_EXTS=.pb.h
+CPP_PROTO_CMDLINE=
CPP_PROTO_OPTS=
-CPP_PROTO_OUTS=
+CPP_PROTO_OUTS=
CPP_PROTO_SUFFIXES=.pb.h .pb.cc
CPP_PROTO_PLUGINS=
# tag:proto tag:cpp-specific
-CPP_EV_OPTS=--plugin=protoc-gen-event2cpp=${tool:"tools/event2cpp"} --event2cpp_out=$ARCADIA_BUILD_ROOT -I=$ARCADIA_ROOT/library/cpp/eventlog
-CPP_EV_OUTS=
-
+CPP_EV_OPTS=--plugin=protoc-gen-event2cpp=${tool:"tools/event2cpp"} --event2cpp_out=$ARCADIA_BUILD_ROOT -I=$ARCADIA_ROOT/library/cpp/eventlog
+CPP_EV_OUTS=
+
# tag:proto tag:python-specific
PY_PROTO_OPTS=
PY_PROTO_OUTS=
@@ -514,39 +514,39 @@ PY_EVLOG_SUFFIXES=_ev_pb2.py
JAVA_PROTO_ARGS=
# tag:proto tag:python-specific
-OPTIMIZE_PY_PROTOS_FLAG=no
-
+OPTIMIZE_PY_PROTOS_FLAG=no
+
# tag:built-in
-### @usage: RESOURCE([FORCE_TEXT ][Src Key]* [- Key=Value]*) # built-in
-### Add data (resources, random files, strings) to the program)
+### @usage: RESOURCE([FORCE_TEXT ][Src Key]* [- Key=Value]*) # built-in
+### Add data (resources, random files, strings) to the program)
### The common usage is to place Src file into binary. The Key is used to access it using library/cpp/resource or library/python/resource.
-### Alternative syntax with '- Key=Value' allows placing Value string as resource data into binary and make it accessible by Key.
-###
-### This is a simpler but less flexible option than ARCHIVE(), because in the case of ARCHIVE(), you have to use the data explicitly,
-### and in the case of RESOURCE(), the data will fall through SRCS() or SRCS(GLOBAL) to binary linking.
-###
-### Use the FORCE_TEXT parameter to explicitly mark all Src files as text files: they will not be parsed unless used elsewhere.
-###
-### @example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a2ispolzujjtekomanduresource
-###
-### @example:
-###
-### LIBRARY()
-### OWNER(user1)
-###
-### RESOURCE(
-### path/to/file1 /key/in/program/1
-### path/to/file2 /key2
-### )
-### END()
-###
-macro RESOURCE(Args...) {
- PEERDIR(library/cpp/resource)
-}
-
+### Alternative syntax with '- Key=Value' allows placing Value string as resource data into binary and make it accessible by Key.
+###
+### This is a simpler but less flexible option than ARCHIVE(), because in the case of ARCHIVE(), you have to use the data explicitly,
+### and in the case of RESOURCE(), the data will fall through SRCS() or SRCS(GLOBAL) to binary linking.
+###
+### Use the FORCE_TEXT parameter to explicitly mark all Src files as text files: they will not be parsed unless used elsewhere.
+###
+### @example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a2ispolzujjtekomanduresource
+###
+### @example:
+###
+### LIBRARY()
+### OWNER(user1)
+###
+### RESOURCE(
+### path/to/file1 /key/in/program/1
+### path/to/file2 /key2
+### )
+### END()
+###
+macro RESOURCE(Args...) {
+ PEERDIR(library/cpp/resource)
+}
+
# tag:internal
### @usage: _ORDER_ADDINCL([BUILD ...] [SOURCE ...] Args...) # internal
-###
+###
### Order and filter ADDINCLs (Args - is intentionally omitted in ADDINCL macro)
macro _ORDER_ADDINCL(BUILD[], SOURCE[], ARGS...) {
ADDINCL($BUILD $SOURCE)
@@ -555,62 +555,62 @@ macro _ORDER_ADDINCL(BUILD[], SOURCE[], ARGS...) {
# tag:proto
### @usage: PROTO_ADDINCL([GLOBAL] [WITH_GEN] Path)
###
-### This macro introduces proper ADDINCLs for .proto-files found in sources and
-### .cpp/.h generated files, supplying them to appropriate commands and allowing
-### proper dependency resolution at configure-time.
-###
-### Note: you normally shouldn't use this macro. ADDINCLs should be sent to user
-### from dependency via PROTO_NAMESPACE macro
+### This macro introduces proper ADDINCLs for .proto-files found in sources and
+### .cpp/.h generated files, supplying them to appropriate commands and allowing
+### proper dependency resolution at configure-time.
+###
+### Note: you normally shouldn't use this macro. ADDINCLs should be sent to user
+### from dependency via PROTO_NAMESPACE macro
macro PROTO_ADDINCL(GLOBAL?"GLOBAL":"", Path, WITH_GEN?"BUILD":"") {
_ORDER_ADDINCL($WITH_GEN $GLOBAL FOR proto ${ARCADIA_BUILD_ROOT}/$Path SOURCE $GLOBAL FOR proto ${ARCADIA_ROOT}/$Path)
- ADDINCL($GLOBAL ${ARCADIA_BUILD_ROOT}/$Path)
-}
-
+ ADDINCL($GLOBAL ${ARCADIA_BUILD_ROOT}/$Path)
+}
+
# tag:proto
### @usage: PROTO_NAMESPACE([GLOBAL] [WITH_GEN] Namespace)
-###
-### Defines protobuf namespace (import/export path prefix) which should be used for imports and
-### which defines output path for .proto generation.
-###
-### For proper importing and configure-time depenedency management it sets ADDINCLs
-### for both .cpp headers includes and .proto imports. If .proto expected to be used outsed of the
-### processing module use GLOBAL to send proper ADDINCLs to all (transitive) users. PEERDIR to
-### PROTO_LIBRARY with PROTO_NAMESPACE(GLOBAL ) is enough at user side to correctly use the library.
+###
+### Defines protobuf namespace (import/export path prefix) which should be used for imports and
+### which defines output path for .proto generation.
+###
+### For proper importing and configure-time depenedency management it sets ADDINCLs
+### for both .cpp headers includes and .proto imports. If .proto expected to be used outsed of the
+### processing module use GLOBAL to send proper ADDINCLs to all (transitive) users. PEERDIR to
+### PROTO_LIBRARY with PROTO_NAMESPACE(GLOBAL ) is enough at user side to correctly use the library.
### If generated .proto files are going to be used for building a module than use of WITH_GEN
### parameter will add appropriate dir from the build root for .proto files search.
macro PROTO_NAMESPACE(GLOBAL?"GLOBAL":"", WITH_GEN?"WITH_GEN":"", Namespace) {
- SET(PROTO_NAMESPACE $Namespace)
+ SET(PROTO_NAMESPACE $Namespace)
PROTO_ADDINCL($GLOBAL $WITH_GEN $Namespace)
-}
-
+}
+
# tag:proto tag:internal tag:python-specific
-### @usage: OPTIMIZE_PY_PROTOS() # internal
-###
-### Enable Python proto optimization by embedding corresponding C++ code into binary.
-### Python protobuf runtime will use C++ implementation instead of Python one if former is available.
+### @usage: OPTIMIZE_PY_PROTOS() # internal
+###
+### Enable Python proto optimization by embedding corresponding C++ code into binary.
+### Python protobuf runtime will use C++ implementation instead of Python one if former is available.
### This is default mode for most PROTO_LIBRARY's and PY2_LIBRARY's, some system ones being exceptions.
-macro OPTIMIZE_PY_PROTOS() {
- SET(OPTIMIZE_PY_PROTOS_FLAG yes)
-}
-
+macro OPTIMIZE_PY_PROTOS() {
+ SET(OPTIMIZE_PY_PROTOS_FLAG yes)
+}
+
# tag:proto tag:python-specific
### @usage: NO_OPTIMIZE_PY_PROTOS()
-###
-### Disable Python proto optimization using embedding corresponding C++ code into binary.
-### Python protobuf runtime will use C++ implementation instead of Python one if former is available.
-### This is default mode only for some system libraries.
+###
+### Disable Python proto optimization using embedding corresponding C++ code into binary.
+### Python protobuf runtime will use C++ implementation instead of Python one if former is available.
+### This is default mode only for some system libraries.
macro NO_OPTIMIZE_PY_PROTOS() {
SET(OPTIMIZE_PY_PROTOS_FLAG no)
}
# tag:proto tag:python-specific
-macro _PROTO_PLUGIN_ARGS_BASE(Name, Tool, OutParm...) {
- .CMD=--plugin=protoc-gen-${Name}=\${tool:"$Tool"} --${Name}_out=$OutParm$ARCADIA_BUILD_ROOT/\$PROTO_NAMESPACE
+macro _PROTO_PLUGIN_ARGS_BASE(Name, Tool, OutParm...) {
+ .CMD=--plugin=protoc-gen-${Name}=\${tool:"$Tool"} --${Name}_out=$OutParm$ARCADIA_BUILD_ROOT/\$PROTO_NAMESPACE
.SEM=ignored
}
# tag:proto tag:python-specific
-macro _ADD_PY_PROTO_OUT(Suf) {
+macro _ADD_PY_PROTO_OUT(Suf) {
SET_APPEND(PY_PROTO_OUTS \${output;hide;noauto;norel;nopath;noext;suf=$Suf:File})
SET_APPEND(PY_PROTO_OUTS_INTERNAL \${output;hide;noauto;norel;nopath;noext;suf=__int__$Suf:File} \${hide;kv:"ext_out_name_for_\${nopath;noext;suf=__int__$Suf:File} \${nopath;noext;suf=$Suf:File}"})
# XXX fix variable expansion in plugins
@@ -618,100 +618,100 @@ macro _ADD_PY_PROTO_OUT(Suf) {
}
# tag:proto tag:python-specific
-### @usage: PY_PROTO_PLUGIN(Name Ext Tool DEPS <Dependencies>)
-###
-### Define protoc plugin for python with given Name that emits extra output with provided Extension
-### using Tool. Extra dependencies are passed via DEPS
-macro PY_PROTO_PLUGIN(NAME, EXT, TOOL, DEPS[]) {
- SET_APPEND(PY_PROTO_OPTS $_PROTO_PLUGIN_ARGS_BASE($NAME $TOOL))
- _ADD_PY_PROTO_OUT($EXT)
- # XXX fix variable expansion in plugins
- SET(PY_PROTO_DEPS $PY_PROTO_DEPS $DEPS)
-}
-
+### @usage: PY_PROTO_PLUGIN(Name Ext Tool DEPS <Dependencies>)
+###
+### Define protoc plugin for python with given Name that emits extra output with provided Extension
+### using Tool. Extra dependencies are passed via DEPS
+macro PY_PROTO_PLUGIN(NAME, EXT, TOOL, DEPS[]) {
+ SET_APPEND(PY_PROTO_OPTS $_PROTO_PLUGIN_ARGS_BASE($NAME $TOOL))
+ _ADD_PY_PROTO_OUT($EXT)
+ # XXX fix variable expansion in plugins
+ SET(PY_PROTO_DEPS $PY_PROTO_DEPS $DEPS)
+}
+
# tag:proto tag:python-specific
-### @usage: PY_PROTO_PLUGIN2(Name Ext1 Ext2 Tool DEPS <Dependencies>)
-###
-### Define protoc plugin for python with given Name that emits 2 extra outputs with provided Extensions
-### using Tool. Extra dependencies are passed via DEPS
-macro PY_PROTO_PLUGIN2(NAME, EXT1, EXT2, TOOL, DEPS[]) {
- PY_PROTO_PLUGIN($NAME $EXT1 $TOOL DEPS $DEPS)
+### @usage: PY_PROTO_PLUGIN2(Name Ext1 Ext2 Tool DEPS <Dependencies>)
+###
+### Define protoc plugin for python with given Name that emits 2 extra outputs with provided Extensions
+### using Tool. Extra dependencies are passed via DEPS
+macro PY_PROTO_PLUGIN2(NAME, EXT1, EXT2, TOOL, DEPS[]) {
+ PY_PROTO_PLUGIN($NAME $EXT1 $TOOL DEPS $DEPS)
_ADD_PY_PROTO_OUT($EXT2)
-}
-
+}
+
# tag:proto tag:java-specific
-macro _JAVA_PROTO_PLUGIN_ARGS_BASE(Name, Tool, OutParm...) {
- .CMD=--plugin=protoc-gen-${Name}=\${tool:"$Tool"} --${Name}_out=$ARCADIA_BUILD_ROOT/java_out
-}
-
+macro _JAVA_PROTO_PLUGIN_ARGS_BASE(Name, Tool, OutParm...) {
+ .CMD=--plugin=protoc-gen-${Name}=\${tool:"$Tool"} --${Name}_out=$ARCADIA_BUILD_ROOT/java_out
+}
+
# tag:proto tag:java-specific
-### @usage: JAVA_PROTO_PLUGIN(Name Tool DEPS <Dependencies>)
-###
-### Define protoc plugin for Java with given Name that emits extra outputs
-### using Tool. Extra dependencies are passed via DEPS
-macro JAVA_PROTO_PLUGIN(NAME, TOOL, DEPS[]) {
- SET_APPEND(JAVA_PROTO_ARGS $_JAVA_PROTO_PLUGIN_ARGS_BASE($NAME $TOOL))
- # XXX fix variable expansion in plugins
- SET(JAVA_PROTOBUF_PEERS $JAVA_PROTOBUF_PEERS $DEPS)
-}
-
+### @usage: JAVA_PROTO_PLUGIN(Name Tool DEPS <Dependencies>)
+###
+### Define protoc plugin for Java with given Name that emits extra outputs
+### using Tool. Extra dependencies are passed via DEPS
+macro JAVA_PROTO_PLUGIN(NAME, TOOL, DEPS[]) {
+ SET_APPEND(JAVA_PROTO_ARGS $_JAVA_PROTO_PLUGIN_ARGS_BASE($NAME $TOOL))
+ # XXX fix variable expansion in plugins
+ SET(JAVA_PROTOBUF_PEERS $JAVA_PROTOBUF_PEERS $DEPS)
+}
+
# tag:proto tag:cpp-specific
macro _ADD_CPP_PROTO_OUT(Suf) {
SET_APPEND(CPP_PROTO_OUTS \${output;hide;norel;nopath;noext;suf=$Suf:File})
-
- # XXX fix variable expansion in plugins
- SET(CPP_PROTO_SUFFIXES $CPP_PROTO_SUFFIXES $Suf)
-}
-
+
+ # XXX fix variable expansion in plugins
+ SET(CPP_PROTO_SUFFIXES $CPP_PROTO_SUFFIXES $Suf)
+}
+
# tag:proto tag:cpp-specific
-HAS_CPP_PROTOBUF_PEERS=no
-CPP_PROTOBUF_PEERS=
-
+HAS_CPP_PROTOBUF_PEERS=no
+CPP_PROTOBUF_PEERS=
+
# tag:proto tag:cpp-specific
-### @usage: CPP_PROTO_PLUGIN0(Name Tool DEPS <Dependencies>)
-###
-### Define protoc plugin for C++ with given Name that emits code into regular outputs
-### using Tool. Extra dependencies are passed via DEPS.
-macro CPP_PROTO_PLUGIN0(NAME, TOOL, DEPS[]) {
+### @usage: CPP_PROTO_PLUGIN0(Name Tool DEPS <Dependencies>)
+###
+### Define protoc plugin for C++ with given Name that emits code into regular outputs
+### using Tool. Extra dependencies are passed via DEPS.
+macro CPP_PROTO_PLUGIN0(NAME, TOOL, DEPS[]) {
.SEM=target_proto_plugin $NAME ${tool;rootrel:TOOL} ${output;hide;suf=.fake.o:NAME}
- SET_APPEND(CPP_PROTO_OPTS $_PROTO_PLUGIN_ARGS_BASE($NAME $TOOL))
-
- # XXX fix variable expansion in plugins
- ENABLE(HAS_CPP_PROTOBUF_PEERS)
+ SET_APPEND(CPP_PROTO_OPTS $_PROTO_PLUGIN_ARGS_BASE($NAME $TOOL))
+
+ # XXX fix variable expansion in plugins
+ ENABLE(HAS_CPP_PROTOBUF_PEERS)
SET(CPP_PROTOBUF_PEERS $CPP_PROTOBUF_PEERS $DEPS)
-}
-
+}
+
# tag:proto tag:cpp-specific
-### @usage: CPP_PROTO_PLUGIN(Name Tool Suf DEPS <Dependencies>)
-###
-### Define protoc plugin for C++ with given Name that emits code into 1 extra output
-### using Tool. Extra dependencies are passed via DEPS.
-macro CPP_PROTO_PLUGIN(NAME, TOOL, SUF, DEPS[]) {
- CPP_PROTO_PLUGIN0($NAME $TOOL DEPS $DEPS)
-
- _ADD_CPP_PROTO_OUT($SUF)
-}
-
+### @usage: CPP_PROTO_PLUGIN(Name Tool Suf DEPS <Dependencies>)
+###
+### Define protoc plugin for C++ with given Name that emits code into 1 extra output
+### using Tool. Extra dependencies are passed via DEPS.
+macro CPP_PROTO_PLUGIN(NAME, TOOL, SUF, DEPS[]) {
+ CPP_PROTO_PLUGIN0($NAME $TOOL DEPS $DEPS)
+
+ _ADD_CPP_PROTO_OUT($SUF)
+}
+
# tag:proto tag:cpp-specific
-### @usage: CPP_PROTO_PLUGIN2(Name Tool Suf1 Suf2 DEPS <Dependencies>)
-###
-### Define protoc plugin for C++ with given Name that emits code into 2 extra outputs
-### using Tool. Extra dependencies are passed via DEPS.
-macro CPP_PROTO_PLUGIN2(NAME, TOOL, SUF1, SUF2, DEPS[]) {
- CPP_PROTO_PLUGIN($NAME $TOOL $SUF1 DEPS $DEPS)
-
- _ADD_CPP_PROTO_OUT($SUF2)
-}
-
+### @usage: CPP_PROTO_PLUGIN2(Name Tool Suf1 Suf2 DEPS <Dependencies>)
+###
+### Define protoc plugin for C++ with given Name that emits code into 2 extra outputs
+### using Tool. Extra dependencies are passed via DEPS.
+macro CPP_PROTO_PLUGIN2(NAME, TOOL, SUF1, SUF2, DEPS[]) {
+ CPP_PROTO_PLUGIN($NAME $TOOL $SUF1 DEPS $DEPS)
+
+ _ADD_CPP_PROTO_OUT($SUF2)
+}
+
# tag:proto
-### @usage: USE_SKIFF() #wip, do not use
-###
-### Use mapreduce/yt/skiff_proto/plugin for C++
-macro USE_SKIFF() {
- # Move extra includes to INDUCED_DEPS macro in mapreduce/yt/skiff_proto/plugin/ya.make
- CPP_PROTO_PLUGIN0(skiff mapreduce/yt/skiff_proto/plugin DEPS mapreduce/yt/skiff_proto/lib)
-}
-
+### @usage: USE_SKIFF() #wip, do not use
+###
+### Use mapreduce/yt/skiff_proto/plugin for C++
+macro USE_SKIFF() {
+ # Move extra includes to INDUCED_DEPS macro in mapreduce/yt/skiff_proto/plugin/ya.make
+ CPP_PROTO_PLUGIN0(skiff mapreduce/yt/skiff_proto/plugin DEPS mapreduce/yt/skiff_proto/lib)
+}
+
# tag:go-specific
_GO_COMMON_GOOGLE_APIS = \
vendor/google.golang.org/genproto/googleapis/api/annotations \
@@ -753,9 +753,9 @@ _COMMON_GOOGLE_APIS=None
# tag:go-specific
### @usage: USE_COMMON_GOOGLE_APIS([apis...])
###
-### Use common-google-apis library set. Pass optional apis list to be used or use them all.
-### This macro is properly handled for all languages including Go, where apis come in
-## pregenerated form. In other languages apis are generated from sources in Arcadia.
+### Use common-google-apis library set. Pass optional apis list to be used or use them all.
+### This macro is properly handled for all languages including Go, where apis come in
+## pregenerated form. In other languages apis are generated from sources in Arcadia.
macro USE_COMMON_GOOGLE_APIS(APIS...) {
SET(_COMMON_GOOGLE_APIS ${pre=vendor/google.golang.org/genproto/googleapis/:APIS})
}
@@ -805,7 +805,7 @@ macro GO_PROTO_PLUGIN(NAME, EXT, TOOL, DEPS[]) {
# tag:go-specific tag:proto
macro _GO_PROTOC_PLUGIN_ARGS_BASE_IMPL(Name, Tool, PLUGINS...) {
- .CMD=--plugin=protoc-gen-${Name}=${tool:Tool} --${Name}_out=${join=|:PLUGINS}:${ARCADIA_BUILD_ROOT}/$PROTO_NAMESPACE
+ .CMD=--plugin=protoc-gen-${Name}=${tool:Tool} --${Name}_out=${join=|:PLUGINS}:${ARCADIA_BUILD_ROOT}/$PROTO_NAMESPACE
}
# tag:go-specific tag:proto
@@ -819,13 +819,13 @@ macro _GO_PROTOC_PLUGIN_ARGS_BASE(Name, Tool, MAP[], PLUGINS[]) {
}
# tag:go-specific tag:proto
-GO_PROTO_CMDLINE=${cwd;rootdir;input:File} $YMAKE_PYTHON ${input:"build/scripts/go_proto_wrapper.py"} $GO_ARCADIA_PROJECT_PREFIX $GO_CONTRIB_PROJECT_PREFIX ./$PROTO_NAMESPACE $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH ${input;rootrel:File}
+GO_PROTO_CMDLINE=${cwd;rootdir;input:File} $YMAKE_PYTHON ${input:"build/scripts/go_proto_wrapper.py"} $GO_ARCADIA_PROJECT_PREFIX $GO_CONTRIB_PROJECT_PREFIX ./$PROTO_NAMESPACE $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH ${input;rootrel:File}
# tag:go-specific tag:proto
-macro _GO_PROTO_CMD_IMPL(File, OPTS[], OUTS[]) {
+macro _GO_PROTO_CMD_IMPL(File, OPTS[], OUTS[]) {
.CMD=$GO_PROTO_CMDLINE $OPTS $OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
.PEERDIR=${GO_PROTOBUF_IMPORTS} ${GO_PROTOBUF_WELLKNOWN_TYPES}
- .ADDINCL=FOR proto contrib/libs/protobuf/src
+ .ADDINCL=FOR proto contrib/libs/protobuf/src
}
# tag:go-specific tag:proto
@@ -834,18 +834,18 @@ macro _GO_PROTO_CMD(File) {
}
# tag:proto
-### @usage: YP_PROTO_YSON(Files... OUT_OPTS Opts...)
-###
-### Genereate .yson.go from .proto using yp/go/yson/internal/proto-yson-gen/cmd/proto-yson-gen
-macro YP_PROTO_YSON(OUT_OPTS[], Files...) {
+### @usage: YP_PROTO_YSON(Files... OUT_OPTS Opts...)
+###
+### Genereate .yson.go from .proto using yp/go/yson/internal/proto-yson-gen/cmd/proto-yson-gen
+macro YP_PROTO_YSON(OUT_OPTS[], Files...) {
.CMD=${cwd:BINDIR} $PROTOC --plugin=protoc-gen-custom=${tool:"yp/go/yson/internal/proto-yson-gen/cmd/proto-yson-gen"} -I=${ARCADIA_ROOT}/${PROTO_NAMESPACE} ${pre=-I=:_PROTO__INCLUDE} -I=${ARCADIA_ROOT} --custom_out="$OUT_OPTS paths=base_name:." --custom_opt="goroot=${GO_TOOLS_ROOT}" ${input:Files} ${output;hide;noauto;nopath;noext;suf=.yson.go:Files}
- .ADDINCL=FOR proto ${ARCADIA_ROOT}/${MODDIR} FOR proto ${ARCADIA_ROOT}/${GO_TEST_IMPORT_PATH} FOR proto yt ${ARCADIA_BUILD_ROOT}/yt FOR proto contrib/libs/protobuf/src
- .PEERDIR=$GOSTD/strings $GOSTD/fmt $GOSTD/errors $GOSTD/encoding/json library/go/core/xerrors yt/go/yson yt/go/yterrors yp/go/yson/ytypes contrib/libs/protobuf
-
-}
-
+ .ADDINCL=FOR proto ${ARCADIA_ROOT}/${MODDIR} FOR proto ${ARCADIA_ROOT}/${GO_TEST_IMPORT_PATH} FOR proto yt ${ARCADIA_BUILD_ROOT}/yt FOR proto contrib/libs/protobuf/src
+ .PEERDIR=$GOSTD/strings $GOSTD/fmt $GOSTD/errors $GOSTD/encoding/json library/go/core/xerrors yt/go/yson yt/go/yterrors yp/go/yson/ytypes contrib/libs/protobuf
+
+}
+
# tag:proto
-macro _CPP_PROTO_CMD(File) {
+macro _CPP_PROTO_CMD(File) {
.CMD=$CPP_PROTO_CMDLINE $CPP_PROTO_OPTS $CPP_PROTO_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
.SEM=target_proto_mesages PRIVATE ${input:File} ${output;hide;suf=.pb.o:File} ${output;main;hide;norel;nopath;noext:File.pb.h} ${hide;tool:"contrib/tools/protoc/bin"} && set_global_flags COMMON_PROTOC_FLAGS -I=$ARCADIA_ROOT -I=$ARCADIA_BUILD_ROOT && modules_required protobuf.cmake
.PEERDIR=contrib/libs/protobuf
@@ -858,52 +858,52 @@ macro _CPP_VANILLA_PROTO_CMD(File) {
}
# tag:proto
-macro _CPP_EVLOG_CMD(File) {
- .CMD=$CPP_PROTO_CMDLINE $CPP_EV_OPTS $CPP_EV_OUTS ${kv;hide:"p EV"} ${kv;hide:"pc yellow"}
+macro _CPP_EVLOG_CMD(File) {
+ .CMD=$CPP_PROTO_CMDLINE $CPP_EV_OPTS $CPP_EV_OUTS ${kv;hide:"p EV"} ${kv;hide:"pc yellow"}
.PEERDIR=library/cpp/eventlog contrib/libs/protobuf
-}
-
+}
+
# tag:proto
-macro _CPP_PROTO_EVLOG_CMD(File) {
- # process .proto as .ev
- .CMD=$CPP_PROTO_CMDLINE $CPP_EV_OPTS $CPP_PROTO_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+macro _CPP_PROTO_EVLOG_CMD(File) {
+ # process .proto as .ev
+ .CMD=$CPP_PROTO_CMDLINE $CPP_EV_OPTS $CPP_PROTO_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
.PEERDIR=library/cpp/eventlog contrib/libs/protobuf
}
# tag:proto
-macro _CPP_CFGPROTO_CMD(File) {
- # keep extension in output just as in EV: this is hard-codeded behaviour of protoc for non-.proto extensions
- .CMD=$CPP_PROTO_CMDLINE --plugin=protoc-gen-config=${tool:"library/cpp/proto_config/plugin"} --config_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $CPP_EV_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+macro _CPP_CFGPROTO_CMD(File) {
+ # keep extension in output just as in EV: this is hard-codeded behaviour of protoc for non-.proto extensions
+ .CMD=$CPP_PROTO_CMDLINE --plugin=protoc-gen-config=${tool:"library/cpp/proto_config/plugin"} --config_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $CPP_EV_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
.PEERDIR=library/cpp/proto_config/codegen library/cpp/proto_config/protos contrib/libs/protobuf
-}
-
+}
+
# tag:proto
-PY_PROTO_MYPY_ENABLED=yes
+PY_PROTO_MYPY_ENABLED=yes
PY_PROTO_MYPY_PLUGIN_BASE=--plugin=protoc-gen-mypy=${tool:"contrib/python/mypy-protobuf/bin/protoc-gen-mypy"} --mypy_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE
-
+
# tag:proto tag:python-specific
-PY_PROTO_MYPY_SUFFIX=
-PY_PROTO_MYPY_PLUGIN=
-PY_PROTO_MYPY_PLUGIN_INTERNAL=
-
+PY_PROTO_MYPY_SUFFIX=
+PY_PROTO_MYPY_PLUGIN=
+PY_PROTO_MYPY_PLUGIN_INTERNAL=
+
# tag:proto tag:python-specific
-macro NO_MYPY() {
- DISABLE(PY_PROTO_MYPY_ENABLED)
-}
-
+macro NO_MYPY() {
+ DISABLE(PY_PROTO_MYPY_ENABLED)
+}
+
# tag:proto tag:python-specific
-macro _PY_PROTO_CMD_BASE(File, Suf, Args...) {
- .CMD=$PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --python_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${input;rootrel:File} ${output;hide;noauto;norel;nopath;noext;suf=$Suf:File} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} $Args
+macro _PY_PROTO_CMD_BASE(File, Suf, Args...) {
+ .CMD=$PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --python_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${input;rootrel:File} ${output;hide;noauto;norel;nopath;noext;suf=$Suf:File} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} $Args
}
# tag:proto tag:python-specific
-macro _PY_PROTO_CMD(File) {
- .CMD=${cwd;rootdir;input:File} $_PY_PROTO_CMD_BASE($File _pb2.py $PY_PROTO_OPTS $PY_PROTO_OUTS $PY_PROTO_MYPY_PLUGIN)
+macro _PY_PROTO_CMD(File) {
+ .CMD=${cwd;rootdir;input:File} $_PY_PROTO_CMD_BASE($File _pb2.py $PY_PROTO_OPTS $PY_PROTO_OUTS $PY_PROTO_MYPY_PLUGIN)
}
# tag:proto tag:python-specific
-macro _PY_PROTO_CMD_INTERNAL(File) {
- .CMD=${cwd;rootdir;input:File} $GEN_PY_PROTOS --suffixes $PY_PROTO_SUFFIXES $PY_PROTO_MYPY_SUFFIX -- $_PY_PROTO_CMD_BASE($File __int___pb2.py $PY_PROTO_OPTS $PY_PROTO_OUTS_INTERNAL ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___pb2.py:File} ${nopath;noext;suf=_pb2.py:File}"} $PY_PROTO_MYPY_PLUGIN_INTERNAL)
+macro _PY_PROTO_CMD_INTERNAL(File) {
+ .CMD=${cwd;rootdir;input:File} $GEN_PY_PROTOS --suffixes $PY_PROTO_SUFFIXES $PY_PROTO_MYPY_SUFFIX -- $_PY_PROTO_CMD_BASE($File __int___pb2.py $PY_PROTO_OPTS $PY_PROTO_OUTS_INTERNAL ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___pb2.py:File} ${nopath;noext;suf=_pb2.py:File}"} $PY_PROTO_MYPY_PLUGIN_INTERNAL)
}
# tag:proto tag:java-specific
@@ -933,25 +933,25 @@ otherwise {
}
# tag:proto tag:java-specific
-macro _JAVA_PROTO_CMD(File) {
- .CMD=${cwd;rootdir;input:File} $YMAKE_PYTHON ${input:"build/scripts/tared_protoc.py"} --tar-output ${output;norel;nopath;noext;suf=.jsrc:File} --protoc-out-dir $ARCADIA_BUILD_ROOT/java_out $PROTOC -I=./$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_ROOT $_JAVA_PROTO_OUT_ARG$ARCADIA_BUILD_ROOT/java_out ${input;rootrel:File} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} $JAVA_PROTO_ARGS
+macro _JAVA_PROTO_CMD(File) {
+ .CMD=${cwd;rootdir;input:File} $YMAKE_PYTHON ${input:"build/scripts/tared_protoc.py"} --tar-output ${output;norel;nopath;noext;suf=.jsrc:File} --protoc-out-dir $ARCADIA_BUILD_ROOT/java_out $PROTOC -I=./$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_ROOT $_JAVA_PROTO_OUT_ARG$ARCADIA_BUILD_ROOT/java_out ${input;rootrel:File} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} $JAVA_PROTO_ARGS
}
-
+
# tag:proto tag:perl-specific tag:deprecated
-### @usage: XS_PROTO(InputProto Dir Outputs...) # deprecated
-###
-### Generate Perl code from protobuf.
-### In order to use this macro one should predict all outputs protoc will emit from input_proto file and enlist those as outputs.
+### @usage: XS_PROTO(InputProto Dir Outputs...) # deprecated
+###
+### Generate Perl code from protobuf.
+### In order to use this macro one should predict all outputs protoc will emit from input_proto file and enlist those as outputs.
macro XS_PROTO(File, Dir, Outputs...) {
- .CMD=$PROTOC -I=${ARCADIA_ROOT}/${Dir} ${pre=-I=:_PROTO__INCLUDE} -I=${ARCADIA_ROOT} -I=${PROTOBUF_PATH} --perlxs_out=${BINDIR} ${input:File} ${hide;output:Outputs} ${output_include;hide;nopath;noext;suf=.pb.h:File}
+ .CMD=$PROTOC -I=${ARCADIA_ROOT}/${Dir} ${pre=-I=:_PROTO__INCLUDE} -I=${ARCADIA_ROOT} -I=${PROTOBUF_PATH} --perlxs_out=${BINDIR} ${input:File} ${hide;output:Outputs} ${output_include;hide;nopath;noext;suf=.pb.h:File}
PEERDIR(${Dir})
ADDINCL(${ARCADIA_BUILD_ROOT}/${Dir})
}
# tag:proto tag:fbs
-### @usage: PROTO2FBS(InputProto)
-###
+### @usage: PROTO2FBS(InputProto)
+###
### Produce flatbuf schema out of protobuf description.
macro PROTO2FBS(File) {
.CMD=${cwd:BINDIR} ${tool:"contrib/tools/flatc"} -I . -I ${ARCADIA_ROOT} --proto ${input:File} ${output;hide;nopath;noext:File.fbs} ${kv;hide:"p FBS"} ${kv;hide:"pc yellow"}
@@ -963,23 +963,23 @@ when ($PY_PROTOS_FOR == "yes") {
}
# tag:python-specific
-macro _PY_EVLOG_CMD_BASE(File, Suf, Args...) {
- .CMD=$_PY_PROTO_CMD_BASE($File $Suf $Args)
+macro _PY_EVLOG_CMD_BASE(File, Suf, Args...) {
+ .CMD=$_PY_PROTO_CMD_BASE($File $Suf $Args)
.PEERDIR=library/cpp/eventlog/proto
}
# tag:python-specific tag:proto
-macro _PY_EVLOG_CMD(File) {
- .CMD=${cwd;rootdir;input:File} $_PY_EVLOG_CMD_BASE($File _ev_pb2.py)
+macro _PY_EVLOG_CMD(File) {
+ .CMD=${cwd;rootdir;input:File} $_PY_EVLOG_CMD_BASE($File _ev_pb2.py)
}
# tag:python-specific tag:proto
-macro _PY_EVLOG_CMD_INTERNAL(File) {
- .CMD=${cwd;rootdir;input:File} $GEN_PY_PROTOS --suffixes $PY_EVLOG_SUFFIXES -- $_PY_EVLOG_CMD_BASE($File __int___ev_pb2.py ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___ev_pb2.py:File} ${nopath;noext;suf=_ev_pb2.py:File}"})
+macro _PY_EVLOG_CMD_INTERNAL(File) {
+ .CMD=${cwd;rootdir;input:File} $GEN_PY_PROTOS --suffixes $PY_EVLOG_SUFFIXES -- $_PY_EVLOG_CMD_BASE($File __int___ev_pb2.py ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___ev_pb2.py:File} ${nopath;noext;suf=_ev_pb2.py:File}"})
}
# tag:java-specific tag:proto
-macro _JAVA_EVLOG_CMD(File) {
+macro _JAVA_EVLOG_CMD(File) {
.CMD=$COPY_CMD ${input:File} ${output;nopath;noext;norel;suf=_ev.proto:File} ${kv;hide:"p EV"} ${kv;hide:"pc yellow"}
.PEERDIR=library/cpp/eventlog/proto
}
@@ -1014,19 +1014,19 @@ when ($ALLOCATOR == "LF") {
SANITIZER_CFLAGS=
# tag:proto tag:grpc
-### @usage: GRPC()
-###
-### Emit GRPC code for all .proto files in a PROTO_LIBRARY.
-### This works for all available PROTO_LIBRARY versions (C++, Python 2.x, Pyton 3.x, Java and Go).
+### @usage: GRPC()
+###
+### Emit GRPC code for all .proto files in a PROTO_LIBRARY.
+### This works for all available PROTO_LIBRARY versions (C++, Python 2.x, Pyton 3.x, Java and Go).
macro GRPC() {
- # C++
- CPP_PROTO_PLUGIN2(grpc_cpp contrib/tools/protoc/plugins/grpc_cpp .grpc.pb.cc .grpc.pb.h DEPS contrib/libs/grpc)
+ # C++
+ CPP_PROTO_PLUGIN2(grpc_cpp contrib/tools/protoc/plugins/grpc_cpp .grpc.pb.cc .grpc.pb.h DEPS contrib/libs/grpc)
# Python
- PY_PROTO_PLUGIN(grpc_py _pb2_grpc.py contrib/tools/protoc/plugins/grpc_python DEPS contrib/libs/grpc/python contrib/libs/grpc)
+ PY_PROTO_PLUGIN(grpc_py _pb2_grpc.py contrib/tools/protoc/plugins/grpc_python DEPS contrib/libs/grpc/python contrib/libs/grpc)
# Java
- JAVA_PROTO_PLUGIN(grpc_java contrib/tools/protoc/plugins/grpc_java DEPS $JAVA_GRPC_STUB $JAVA_GRPC_PROTOBUF)
+ JAVA_PROTO_PLUGIN(grpc_java contrib/tools/protoc/plugins/grpc_java DEPS $JAVA_GRPC_STUB $JAVA_GRPC_PROTOBUF)
}
# tag:fbs
@@ -1037,7 +1037,7 @@ FLATC_FLAGS_VALUE=
macro FLATC_FLAGS(FLAGS...) {
SET_APPEND(FLATC_FLAGS_VALUE $FLAGS)
}
-
+
# tag:fbs
_PY_FBS_DEPS=contrib/python/flatbuffers
@@ -1101,9 +1101,9 @@ NEED_PLATFORM_PEERDIRS=yes
PEERDIR_TEST_TOOL=yes
# tag:python-specific
-PYTHON2=no
-PYTHON3=no
-
+PYTHON2=no
+PYTHON3=no
+
# tag:python-specific
when (!$ARCADIA_PYTHON_UNICODE_SIZE) {
when ($OS_WINDOWS) {
@@ -1114,56 +1114,56 @@ when (!$ARCADIA_PYTHON_UNICODE_SIZE) {
}
}
-### @usage: _BARE_UNIT # internal
-###
-### The base of all modules describing default bare minimum for all modules.
-### To avoid surprises, all buildable modules are better to be inherited from it or its descendants.
-module _BARE_UNIT {
+### @usage: _BARE_UNIT # internal
+###
+### The base of all modules describing default bare minimum for all modules.
+### To avoid surprises, all buildable modules are better to be inherited from it or its descendants.
+module _BARE_UNIT {
.EXTS=.*
.CMD=TOUCH_UNIT
.IGNORED=GO_PROTO_PLUGIN
.NODE_TYPE=Bundle
.PEERDIR_POLICY=as_include
- .RESTRICTED=GRPC USE_SKIFF INDUCED_DEPS FUZZ_DICTS FUZZ_OPTS PACK DOCS_DIR DOCS_CONFIG DOCS_VARS YT_SPEC USE_CXX USE_UTIL WHOLE_ARCHIVE PRIMARY_OUTPUT SECONDARY_OUTPUT DEPENDENCY_MANAGEMENT EXCLUDE NO_DOCTESTS EMBED_JAVA_VCS_INFO RESOURCE_FILES PACK_GLOBALS_IN_LIBRARY EXPOSE GLOBAL_DEPS
- .FINAL_TARGET=no
-
- PEERDIR_TAGS=__EMPTY__
-
- when ($FATAL_ERROR_MESSAGE && $FATAL_ERROR_MODULE != "yes") {
- PEERDIR+=build/conf_fatal_error
- }
-
- DEFAULT(MODULE_VERSION)
- DEFAULT(MODULE_PREFIX)
- DEFAULT(MODULE_SUFFIX)
-}
-
-### @usage: _BASE_UNIT # internal
-###
-### The base of all LIBRARY/PROGRAM modules describing common logic for all modules.
-### To avoid surprises, all buildable modules are better to be inherited from it or its descendants.
-module _BASE_UNIT: _BARE_UNIT {
- .GLOBAL=_FBS_NAMESPACE_MAP
-
- PEERDIR_TAGS=CPP_PROTO CPP_FBS CPP_SSQLS CPP_IDL PY2 PY2_NATIVE YQL_UDF_STATIC __EMPTY__ DLL_LIB
-
- CPP_PROTO_CMDLINE=${cwd;rootdir;input:File} $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --cpp_out=${CPP_PROTO_PLUGINS}$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $PROTOC_STYLEGUIDE_OUT $PROTOC_PLUGIN_STYLEGUIDE ${input;rootrel:File}
+ .RESTRICTED=GRPC USE_SKIFF INDUCED_DEPS FUZZ_DICTS FUZZ_OPTS PACK DOCS_DIR DOCS_CONFIG DOCS_VARS YT_SPEC USE_CXX USE_UTIL WHOLE_ARCHIVE PRIMARY_OUTPUT SECONDARY_OUTPUT DEPENDENCY_MANAGEMENT EXCLUDE NO_DOCTESTS EMBED_JAVA_VCS_INFO RESOURCE_FILES PACK_GLOBALS_IN_LIBRARY EXPOSE GLOBAL_DEPS
+ .FINAL_TARGET=no
+
+ PEERDIR_TAGS=__EMPTY__
+
+ when ($FATAL_ERROR_MESSAGE && $FATAL_ERROR_MODULE != "yes") {
+ PEERDIR+=build/conf_fatal_error
+ }
+
+ DEFAULT(MODULE_VERSION)
+ DEFAULT(MODULE_PREFIX)
+ DEFAULT(MODULE_SUFFIX)
+}
+
+### @usage: _BASE_UNIT # internal
+###
+### The base of all LIBRARY/PROGRAM modules describing common logic for all modules.
+### To avoid surprises, all buildable modules are better to be inherited from it or its descendants.
+module _BASE_UNIT: _BARE_UNIT {
+ .GLOBAL=_FBS_NAMESPACE_MAP
+
+ PEERDIR_TAGS=CPP_PROTO CPP_FBS CPP_SSQLS CPP_IDL PY2 PY2_NATIVE YQL_UDF_STATIC __EMPTY__ DLL_LIB
+
+ CPP_PROTO_CMDLINE=${cwd;rootdir;input:File} $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --cpp_out=${CPP_PROTO_PLUGINS}$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $PROTOC_STYLEGUIDE_OUT $PROTOC_PLUGIN_STYLEGUIDE ${input;rootrel:File}
CPP_PROTO_OUTS+=${output;hide;norel;nopath;noext:File.pb.cc} ${output;main;hide;norel;nopath;noext:File.pb.h}
CPP_EV_OUTS+=${output;hide;norel:File.pb.cc} ${output;hide;norel:File.pb.h}
-
+
when ($PY_PROTOS_FOR == "yes") {
- MACRO_ALIAS(EVLOG_CMD _PY_EVLOG_CMD)
- MACRO_ALIAS(PROTO_CMD _PY_PROTO_CMD)
+ MACRO_ALIAS(EVLOG_CMD _PY_EVLOG_CMD)
+ MACRO_ALIAS(PROTO_CMD _PY_PROTO_CMD)
}
otherwise {
- MACRO_ALIAS(EVLOG_CMD _CPP_EVLOG_CMD)
+ MACRO_ALIAS(EVLOG_CMD _CPP_EVLOG_CMD)
MACRO_ALIAS(FBS_CMD _CPP_FLATC_CMD)
when ($BUILD_PROTO_AS_EVLOG == "yes") {
- MACRO_ALIAS(PROTO_CMD _CPP_PROTO_EVLOG_CMD)
+ MACRO_ALIAS(PROTO_CMD _CPP_PROTO_EVLOG_CMD)
}
otherwise {
- MACRO_ALIAS(PROTO_CMD _CPP_PROTO_CMD)
- }
+ MACRO_ALIAS(PROTO_CMD _CPP_PROTO_CMD)
+ }
when ($USE_VANILLA_PROTOC == "yes") {
PROTOC=${tool:"contrib/tools/protoc_std"}
PROTOC_STYLEGUIDE_OUT=
@@ -1176,7 +1176,7 @@ module _BASE_UNIT: _BARE_UNIT {
SANITIZER_DEFINED=no
when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
- CFLAGS+=-fsanitize=$SANITIZER_TYPE -D${SANITIZER_TYPE}_sanitizer_enabled $SANITIZER_CFLAGS -fno-omit-frame-pointer
+ CFLAGS+=-fsanitize=$SANITIZER_TYPE -D${SANITIZER_TYPE}_sanitizer_enabled $SANITIZER_CFLAGS -fno-omit-frame-pointer
LDFLAGS+=-fsanitize=$SANITIZER_TYPE
SANITIZER_DEFINED=yes
@@ -1229,7 +1229,7 @@ module _BASE_UNIT: _BARE_UNIT {
LDFLAGS+=-flto
}
when ($CLANG) {
- CFLAGS+=-flto
+ CFLAGS+=-flto
LDFLAGS+=-flto
}
}
@@ -1265,8 +1265,8 @@ module _BASE_UNIT: _BARE_UNIT {
PEERDIR+=contrib/libs/linux-headers
}
- # Adding PEERDIR from trigger doesn't always work. In this case it
- # cause troubles in contrib/libs/libc_compat/ubuntu_14 under musl
+ # Adding PEERDIR from trigger doesn't always work. In this case it
+ # cause troubles in contrib/libs/libc_compat/ubuntu_14 under musl
# Workaround this issue by setting variable with PEERDIR in trigger
# and then adding PEERDIR to it's value unconditionally.
when ($USE_UBUNTU_COMPATIBILITY == "yes" && $NEED_PLATFORM_PEERDIRS == "yes") {
@@ -1277,17 +1277,17 @@ module _BASE_UNIT: _BARE_UNIT {
}
PEERDIR+=$_UBUNTU_COMPAT_PEERDIR
- when ($NORUNTIME != "yes") {
+ when ($NORUNTIME != "yes") {
PEERDIR+=contrib/libs/cxxsupp
when ($MAPSMOBI_BUILD_TARGET == "yes") {
PEERDIR+=build/platform/mapkit
}
- }
-
- when ($NOUTIL != "yes") {
- PEERDIR+=util
- }
-
+ }
+
+ when ($NOUTIL != "yes") {
+ PEERDIR+=util
+ }
+
when ($MUSL == "yes") {
CFLAGS += -D_musl_
LINK_DYN_LIB_FLAGS += --musl
@@ -1312,20 +1312,20 @@ module _BASE_UNIT: _BARE_UNIT {
CFLAGS+=-DCYTHON_TRACE=1 -DCYTHON_TRACE_NOGIL=1
}
- DEFAULT(USE_SSE4 yes)
-
- when ($NOSSE != "yes") {
- CFLAGS+=$SSE_CFLAGS
- C_DEFINES+=$SSE_DEFINES
- when ($USE_SSE4 == "yes") {
- CFLAGS+=$SSE4_CFLAGS
- C_DEFINES+=$SSE4_DEFINES
+ DEFAULT(USE_SSE4 yes)
+
+ when ($NOSSE != "yes") {
+ CFLAGS+=$SSE_CFLAGS
+ C_DEFINES+=$SSE_DEFINES
+ when ($USE_SSE4 == "yes") {
+ CFLAGS+=$SSE4_CFLAGS
+ C_DEFINES+=$SSE4_DEFINES
}
- }
- elsewhen ($MSVC != "yes") {
- CFLAGS += -mno-sse
- }
-
+ }
+ elsewhen ($MSVC != "yes") {
+ CFLAGS += -mno-sse
+ }
+
when ($LIPO == "yes" && $NEED_PLATFORM_PEERDIRS != "no") {
when ($OS_DARWIN == "yes" || $OS_IOS == "yes") {
PEERDIR += build/platform/cctools
@@ -1389,19 +1389,19 @@ when ($COMMON_LINK_SETTINGS == "yes") {
}
when ($EMBED_LINKER_CREF == "yes") {
- LDFLAGS+=-Wl,--cref ${tmp;stdout;pre=$MODULE_PREFIX;suf=.ldcref:REALPRJNAME} -Wl,--no-demangle
- LINK_ADDITIONAL_SECTIONS+=--add-section=.ya.linker_cref=${tmp;pre=$MODULE_PREFIX;suf=.ldcref:REALPRJNAME}
+ LDFLAGS+=-Wl,--cref ${tmp;stdout;pre=$MODULE_PREFIX;suf=.ldcref:REALPRJNAME} -Wl,--no-demangle
+ LINK_ADDITIONAL_SECTIONS+=--add-section=.ya.linker_cref=${tmp;pre=$MODULE_PREFIX;suf=.ldcref:REALPRJNAME}
}
elsewhen ($DUMP_LINKER_CREF == "yes") {
- LDFLAGS+=-Wl,--cref ${output;stdout;pre=$MODULE_PREFIX;suf=.ldcref:REALPRJNAME} -Wl,--no-demangle
+ LDFLAGS+=-Wl,--cref ${output;stdout;pre=$MODULE_PREFIX;suf=.ldcref:REALPRJNAME} -Wl,--no-demangle
}
when ($EMBED_LINKER_MAP == "yes") {
- LDFLAGS+=-Wl,-Map=${tmp;pre=$MODULE_PREFIX;suf=.map.$_LINKER_ID:REALPRJNAME}
- LINK_ADDITIONAL_SECTIONS+=--add-section=.ya.linker_map.${_LINKER_ID}=${tmp;pre=$MODULE_PREFIX;suf=.map.$_LINKER_ID:REALPRJNAME}
+ LDFLAGS+=-Wl,-Map=${tmp;pre=$MODULE_PREFIX;suf=.map.$_LINKER_ID:REALPRJNAME}
+ LINK_ADDITIONAL_SECTIONS+=--add-section=.ya.linker_map.${_LINKER_ID}=${tmp;pre=$MODULE_PREFIX;suf=.map.$_LINKER_ID:REALPRJNAME}
}
elsewhen ($DUMP_LINKER_MAP == "yes") {
- LDFLAGS+=-Wl,-Map=${output;rootrel;pre=$MODULE_PREFIX;suf=.map.$_LINKER_ID:REALPRJNAME}
+ LDFLAGS+=-Wl,-Map=${output;rootrel;pre=$MODULE_PREFIX;suf=.map.$_LINKER_ID:REALPRJNAME}
}
when ($USE_MKL == "yes") {
@@ -1512,32 +1512,32 @@ when ($EMBED_LINKER_MAP == "yes" || $EMBED_LINKER_CREF == "yes") {
$OBJCOPY_TOOL $LINK_ADDITIONAL_SECTIONS $TARGET
}
-_SO_EXT_FILTER=${ext=.so:PEERS} ${hide;late_out;nopath;ext=.so;pre=$BINDIR/:PEERS}
-when ($OS_WINDOWS == "yes") {
- _SO_EXT_FILTER=${ext=.dll:PEERS} ${hide;late_out;nopath;ext=.dll;pre=$BINDIR/:PEERS}
-}
-elsewhen ($OS_DARWIN == "yes" || $OS_IOS == "yes") {
- _SO_EXT_FILTER=${ext=.dylib:PEERS} ${hide;late_out;nopath;ext=.dylib;pre=$BINDIR/:PEERS}
-}
-
-LINK_OR_COPY_SO_CMD=
+_SO_EXT_FILTER=${ext=.so:PEERS} ${hide;late_out;nopath;ext=.so;pre=$BINDIR/:PEERS}
+when ($OS_WINDOWS == "yes") {
+ _SO_EXT_FILTER=${ext=.dll:PEERS} ${hide;late_out;nopath;ext=.dll;pre=$BINDIR/:PEERS}
+}
+elsewhen ($OS_DARWIN == "yes" || $OS_IOS == "yes") {
+ _SO_EXT_FILTER=${ext=.dylib:PEERS} ${hide;late_out;nopath;ext=.dylib;pre=$BINDIR/:PEERS}
+}
+
+LINK_OR_COPY_SO_CMD=
when ($SO_OUTPUTS == "yes") {
- LINK_OR_COPY_SO_CMD=$FS_TOOLS link_or_copy_to_dir --no-check $_SO_EXT_FILTER ${BINDIR}
- LDFLAGS+=$RPATH_GLOBAL
-}
-
-# tag:restrinced tag:DLL
-### $usage: WITH_DYNAMIC_LIBS() # restricted
-###
-### Include dynamic libraries as extra PROGRAM/DLL outputs
-macro WITH_DYNAMIC_LIBS() {
- ENABLE(SO_OUTPUTS)
-}
-
+ LINK_OR_COPY_SO_CMD=$FS_TOOLS link_or_copy_to_dir --no-check $_SO_EXT_FILTER ${BINDIR}
+ LDFLAGS+=$RPATH_GLOBAL
+}
+
+# tag:restrinced tag:DLL
+### $usage: WITH_DYNAMIC_LIBS() # restricted
+###
+### Include dynamic libraries as extra PROGRAM/DLL outputs
+macro WITH_DYNAMIC_LIBS() {
+ ENABLE(SO_OUTPUTS)
+}
+
# tag:internal
### $usage: REAL_LINK_EXE_IMPL(peers...) # internal
macro REAL_LINK_EXE_IMPL(WHOLE_ARCHIVE_PEERS...) {
- .CMD=$REAL_LINK_EXE_CMDLINE && $LINK_OR_COPY_SO_CMD
+ .CMD=$REAL_LINK_EXE_CMDLINE && $LINK_OR_COPY_SO_CMD
}
# tag:internal
@@ -1549,13 +1549,13 @@ macro REAL_LINK_EXEC_DYN_LIB_IMPL(WHOLE_ARCHIVE_PEERS...) {
# tag:internal
### $usage: REAL_LINK_DYN_LIB_IMPL(peers...) # internal
macro REAL_LINK_DYN_LIB_IMPL(WHOLE_ARCHIVE_PEERS...) {
- .CMD=$REAL_LINK_DYN_LIB_CMDLINE && $LINK_OR_COPY_SO_CMD
+ .CMD=$REAL_LINK_DYN_LIB_CMDLINE && $LINK_OR_COPY_SO_CMD
}
# tag:internal
### $usage: LINK_EXE_IMPL(peers...) # internal
macro LINK_EXE_IMPL(WHOLE_ARCHIVE_PEERS...) {
- .CMD=$LINK_EXE_CMDLINE && $LINK_OR_COPY_SO_CMD
+ .CMD=$LINK_EXE_CMDLINE && $LINK_OR_COPY_SO_CMD
}
# tag:internal
@@ -1575,7 +1575,7 @@ module _LINK_UNIT: _BASE_UNIT {
.NODE_TYPE=Program
.PEERDIR_POLICY=as_build_from
.FINAL_TARGET=yes
- .ALIASES=RES_REQUIREMENTS=PY_REQUIREMENTS
+ .ALIASES=RES_REQUIREMENTS=PY_REQUIREMENTS
DEFAULT(ALLOCATOR $DEFAULT_ALLOCATOR)
_USE_LINKER()
@@ -1602,13 +1602,13 @@ macro ADD_CLANG_TIDY() {
}
# tag:internal
-### @usage: _BASE_PROGRAM # internal
-###
-### The base of all programs. It adds dependencies to make final artefact complete and runnable.
-module _BASE_PROGRAM: _LINK_UNIT {
+### @usage: _BASE_PROGRAM # internal
+###
+### The base of all programs. It adds dependencies to make final artefact complete and runnable.
+module _BASE_PROGRAM: _LINK_UNIT {
.SYMLINK_POLICY=EXE
.ALLOWED=INDUCED_DEPS WHOLE_ARCHIVE
- .GLOBAL=LDFLAGS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
+ .GLOBAL=LDFLAGS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
SET(MODULE_TYPE PROGRAM)
when ($OS_IOS == "yes") {
@@ -1636,15 +1636,15 @@ module _BASE_PROGRAM: _LINK_UNIT {
}
}
- DEFAULT(CPU_CHECK yes)
- when ($USE_SSE4 != "yes" || $NOUTIL == "yes" || $ALLOCATOR == "FAKE") {
- CPU_CHECK = no
- }
-
- when ($CPU_CHECK == "yes") {
+ DEFAULT(CPU_CHECK yes)
+ when ($USE_SSE4 != "yes" || $NOUTIL == "yes" || $ALLOCATOR == "FAKE") {
+ CPU_CHECK = no
+ }
+
+ when ($CPU_CHECK == "yes") {
PEERDIR += library/cpp/cpuid_check
}
-
+
when ($USE_ARC_PROFILE == "yes" && $NOUTIL != "yes") {
PEERDIR += library/cpp/execprofile/autostart
}
@@ -1667,49 +1667,49 @@ module _BASE_PROGRAM: _LINK_UNIT {
}
CPP_PROGRAM_SEM=add_executable $MODDIR $REALPRJNAME ${hide:TARGET} ${hide:AUTO_INPUT} && vcs_info && target_link_flags PUBLIC $OBJADDE_LIB $OBJADDE
-### @usage: PROGRAM([progname])
-###
+### @usage: PROGRAM([progname])
+###
### Regular program module.
-### If name is not specified it will be generated from the name of the containing project directory.
-module PROGRAM: _BASE_PROGRAM {
- .ALIASES=REQUIREMENTS=CC_REQUIREMENTS
+### If name is not specified it will be generated from the name of the containing project directory.
+module PROGRAM: _BASE_PROGRAM {
+ .ALIASES=REQUIREMENTS=CC_REQUIREMENTS
.SEM=CPP_PROGRAM_SEM
-
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor)
+
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor)
ADD_CLANG_TIDY()
SET(MODULE_LANG CPP)
}
-# tag:python-specific tag:deprecated tag:internal
-module _PY2_PROGRAM: _BASE_PY_PROGRAM {
- .ALIASES=REQUIREMENTS=PY_REQUIREMENTS
+# tag:python-specific tag:deprecated tag:internal
+module _PY2_PROGRAM: _BASE_PY_PROGRAM {
+ .ALIASES=REQUIREMENTS=PY_REQUIREMENTS
SET(MODULE_LANG PY2)
-
- # Looks like we cannot avoid copy-paste util ymake supports multiple inheritance
- # We need to attach coverage.extractor to every py_program target, except pytest targets
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor)
-}
-
+
+ # Looks like we cannot avoid copy-paste util ymake supports multiple inheritance
+ # We need to attach coverage.extractor to every py_program target, except pytest targets
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor)
+}
+
# tag:python-specific tag:deprecated
### @usage: PY2_PROGRAM([progname]) # deprecated
-###
+###
### Deprecated. Use PY3_PROGRAM instead.
-### Python 2.x binary program. Links all Python 2.x libraries and Python 2.x interpreter into itself to form regular executable.
+### Python 2.x binary program. Links all Python 2.x libraries and Python 2.x interpreter into itself to form regular executable.
### If name is not specified it will be generated from the name of the containing project directory.
-### This only compatible with PYTHON2-tagged modules and selects those from multimodules.
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
-module PY2_PROGRAM: _PY2_PROGRAM {
- when ($FAIL_PY2 == "yes") {
- _OK=no
- }
- otherwise {
- PEERDIR+=build/rules/py2_deprecation
- }
+### This only compatible with PYTHON2-tagged modules and selects those from multimodules.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module PY2_PROGRAM: _PY2_PROGRAM {
+ when ($FAIL_PY2 == "yes") {
+ _OK=no
+ }
+ otherwise {
+ PEERDIR+=build/rules/py2_deprecation
+ }
ASSERT(_OK You are using deprecated Python2-only code (PY2_PROGRAM). Please consider rewriting to Python 3.)
}
-# tag:python-specific
+# tag:python-specific
### @usage: NO_EXTENDED_SOURCE_SEARCH()
###
### Prevent module using in extended python source search.
@@ -1724,12 +1724,12 @@ macro NO_EXTENDED_SOURCE_SEARCH() {
# tag:python-specific
### @usage: PY3_PROGRAM([progname])
-###
-### Python 3.x binary program. Links all Python 3.x libraries and Python 3.x interpreter into itself to form regular executable.
-### If name is not specified it will be generated from the name of the containing project directory.
-### This only compatible with PYTHON3-tagged modules and selects those from multimodules.
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+###
+### Python 3.x binary program. Links all Python 3.x libraries and Python 3.x interpreter into itself to form regular executable.
+### If name is not specified it will be generated from the name of the containing project directory.
+### This only compatible with PYTHON3-tagged modules and selects those from multimodules.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
multimodule PY3_PROGRAM {
module PY3_BIN: PY3_PROGRAM_BIN {
.PEERDIRSELF=PY3_BIN_LIB
@@ -1748,12 +1748,12 @@ multimodule PY3_PROGRAM {
}
# tag:ycr-specific
-macro _YCR_GENERATE_CONFIGS_INTL(Package, App, Configs...) {
+macro _YCR_GENERATE_CONFIGS_INTL(Package, App, Configs...) {
.CMD=${tool:"maps/infra/yacare/scripts/make_configs"} $Package $App ${cwd:BINDIR} ${output;hide;pre=debian/$Package/:Configs}
}
# tag:ycr-specific
-macro _YCR_GENERATE_CONFIGS(Package, App) {
+macro _YCR_GENERATE_CONFIGS(Package, App) {
.CMD=$_YCR_GENERATE_CONFIGS_INTL($Package $App ${pre=etc/yandex/maps/yacare/:App.conf} ${pre=etc/template_generator/templates/etc/logrotate.d/:App} ${pre=etc/nginx/sites-available/:App.conf} ${pre=etc/syslog-ng/conf-available/:App.conf} ${pre=etc/template_generator/config.d/:App.yaml} ${pre=/juggler/checks-available/yacare_;suf=/MANIFEST.json:App} ${pre=etc/yandex/maps/roquefort/:App.conf} ${pre=usr/lib/yandex/maps/yacare/lua/init_worker.d/rate_limiter_:App.lua} ${pre=usr/lib/yandex/maps/yacare/lua/init_worker.d/tvm_:App.lua} ${pre=usr/lib/yandex/maps/yacare/lua/init.d/tvm_:App.lua} ${pre=etc/template_generator/templates/etc/supervisor/conf-available/:App.conf} ${pre=etc/template_generator/templates/etc/yandex/unified_agent/conf.d/04_yacare_:App.yml})
}
@@ -1766,10 +1766,10 @@ otherwise {
}
# tag:ycr-specific
-### @usage: YCR_PROGRAM([progname])
-###
-### yacare-specific program module. Generates yacare configs in addition to producing the program.
-### If name is not specified it will be generated from the name of the containing project directory.
+### @usage: YCR_PROGRAM([progname])
+###
+### yacare-specific program module. Generates yacare configs in addition to producing the program.
+### If name is not specified it will be generated from the name of the containing project directory.
module YCR_PROGRAM: PROGRAM {
.CMD=YCR_LINK_EXE
}
@@ -1785,7 +1785,7 @@ macro _PYCR_GENERATE_CONFIGS(Package, App) {
}
# tag:ycr-specific tag:python-specific
-PYCR_LINK_EXE=$LINK_EXE && $_PYCR_GENERATE_CONFIGS($MODULE_PREFIX$REALPRJNAME $MODULE_PREFIX$REALPRJNAME)
+PYCR_LINK_EXE=$LINK_EXE && $_PYCR_GENERATE_CONFIGS($MODULE_PREFIX$REALPRJNAME $MODULE_PREFIX$REALPRJNAME)
# tag:ycr-specific tag:python-specific
### @usage: PYCR_PROGRAM([progname])
@@ -1796,13 +1796,13 @@ module PYCR_PROGRAM: PY3_PROGRAM_BIN {
.CMD=PYCR_LINK_EXE
}
-### @usage: EXPORTS_SCRIPT(exports_file)
+### @usage: EXPORTS_SCRIPT(exports_file)
###
### Specify exports script within PROGRAM, DLL and DLL-derived modules.
-### This accepts 2 kind of files: .exports with <lang symbol> pairs and JSON-line .symlist files.
+### This accepts 2 kind of files: .exports with <lang symbol> pairs and JSON-line .symlist files.
### The other option use EXPORTS parameter of the DLL module itself.
-###
-### @see: [DLL](#module_DLL)
+###
+### @see: [DLL](#module_DLL)
macro EXPORTS_SCRIPT(Arg) {
SET(EXPORTS_FILE $Arg)
}
@@ -1831,12 +1831,12 @@ macro CUSTOM_LINK_STEP_SCRIPT(Name) {
SET(_CUSTOM_LINK_STEP_SCRIPT build/scripts/$Name)
}
-### @usage: _BASE_UNITTEST # internal
-###
-### Module with base logic for all unit-test modules: it makes code runnable as unit-test by Arcadia testing machinery.
-module _BASE_UNITTEST: _BASE_PROGRAM {
- .FINAL_TARGET=no
- .NODE_TYPE=Program
+### @usage: _BASE_UNITTEST # internal
+###
+### Module with base logic for all unit-test modules: it makes code runnable as unit-test by Arcadia testing machinery.
+module _BASE_UNITTEST: _BASE_PROGRAM {
+ .FINAL_TARGET=no
+ .NODE_TYPE=Program
.ALLOWED=YT_SPEC
when ($UT_SKIP_EXCEPTIONS == "yes") {
C_DEFINES+=-DUT_SKIP_EXCEPTIONS
@@ -1846,34 +1846,34 @@ module _BASE_UNITTEST: _BASE_PROGRAM {
UNITTEST_SEM=$CPP_PROGRAM_SEM && add_test NAME $REALPRJNAME COMMAND $REALPRJNAME
# tag:test
-### @usage: UNITTEST([name])
+### @usage: UNITTEST([name])
###
### Unit test module based on library/cpp/testing/unittest.
-### It is recommended not to specify the name.
+### It is recommended not to specify the name.
###
### Documentation: https://wiki.yandex-team.ru/yatool/test/#opisanievya.make1
-module UNITTEST: _BASE_UNITTEST {
+module UNITTEST: _BASE_UNITTEST {
.SEM=UNITTEST_SEM
PEERDIR(library/cpp/testing/unittest_main)
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py)
SET(MODULE_LANG CPP)
}
# tag:yt-specific tag:test
-### @usage: YT_UNITTEST([name])
-###
-### YT Unit test module based on mapreduce/yt/library/utlib
-module YT_UNITTEST: _BASE_UNITTEST {
+### @usage: YT_UNITTEST([name])
+###
+### YT Unit test module based on mapreduce/yt/library/utlib
+module YT_UNITTEST: _BASE_UNITTEST {
PEERDIR(mapreduce/yt/library/utlib)
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py)
}
# tag:test
-### @usage: UNITTEST_WITH_CUSTOM_ENTRY_POINT([name])
-###
-### Generic unit test module.
-module UNITTEST_WITH_CUSTOM_ENTRY_POINT: _BASE_UNITTEST {
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py)
+### @usage: UNITTEST_WITH_CUSTOM_ENTRY_POINT([name])
+###
+### Generic unit test module.
+module UNITTEST_WITH_CUSTOM_ENTRY_POINT: _BASE_UNITTEST {
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py)
}
# tag:cpp-specific tag:test
@@ -1886,26 +1886,26 @@ module UNITTEST_WITH_CUSTOM_ENTRY_POINT: _BASE_UNITTEST {
module GTEST: _BASE_UNITTEST {
.SEM=UNITTEST_SEM
PEERDIR(library/cpp/testing/gtest library/cpp/testing/gtest_main)
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME gunittest)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME gunittest)
SET(MODULE_LANG CPP)
}
USE_AFL=no
# tag:fuzzing
-### @usage: FUZZ()
+### @usage: FUZZ()
###
-### In order to start using Fuzzing in Arcadia, you need to create a FUZZ module with the implementation of the function LLVMFuzzerTestOneInput().
-### This module should be reachable by RECURSE from /autocheck project in order for the corpus to be regularly updated.
-### AFL and Libfuzzer are supported in Arcadia via a single interface, but the automatic fuzzing still works only through Libfuzzer.
-###
-### Example: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/re2/re2/fuzzing/re2_fuzzer.cc?rev=2919463#L58
+### In order to start using Fuzzing in Arcadia, you need to create a FUZZ module with the implementation of the function LLVMFuzzerTestOneInput().
+### This module should be reachable by RECURSE from /autocheck project in order for the corpus to be regularly updated.
+### AFL and Libfuzzer are supported in Arcadia via a single interface, but the automatic fuzzing still works only through Libfuzzer.
###
+### Example: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/re2/re2/fuzzing/re2_fuzzer.cc?rev=2919463#L58
+###
### Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
-module FUZZ: _BASE_PROGRAM {
+module FUZZ: _BASE_PROGRAM {
.NODE_TYPE=Program
- .FINAL_TARGET=no
- .ALLOWED=FUZZ_DICTS FUZZ_OPTS
+ .FINAL_TARGET=no
+ .ALLOWED=FUZZ_DICTS FUZZ_OPTS
DEFAULT(LIBFUZZER_PATH contrib/libs/libfuzzer12)
when ($USE_AFL == "no") {
@@ -1919,7 +1919,7 @@ module FUZZ: _BASE_PROGRAM {
PEERDIR+=devtools/nofuzz
}
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME fuzz.test)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME fuzz.test)
}
# tag:ios-specific
@@ -1941,14 +1941,14 @@ otherwise {
}
# tag:deprecated
-### @usage: BOOSTTEST([name]) #deprecated
-###
-### Test module based on boost/test/unit_test.hpp.
-### As with entire boost library usage of this technology is deprecated in Arcadia and restricted with configuration error in most of projects.
-### No new module of this type should be introduced unless it is explicitly approved by C++ committee.
-module BOOSTTEST: _BASE_PROGRAM {
+### @usage: BOOSTTEST([name]) #deprecated
+###
+### Test module based on boost/test/unit_test.hpp.
+### As with entire boost library usage of this technology is deprecated in Arcadia and restricted with configuration error in most of projects.
+### No new module of this type should be introduced unless it is explicitly approved by C++ committee.
+module BOOSTTEST: _BASE_PROGRAM {
.NODE_TYPE=Program
- .FINAL_TARGET=no
+ .FINAL_TARGET=no
.CMD=LINK_BOOSTTEST_CMD
PEERDIR(library/cpp/testing/boost_test)
when ($BOOSTTEST_IS_FAT_OBJECT) {
@@ -1958,7 +1958,7 @@ module BOOSTTEST: _BASE_PROGRAM {
PEERDIR+=devtools/boosttest_ios_wrapper/library
MODULE_SUFFIX=.ios.tar
}
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME $BOOST_TEST_TYPE_STRING)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME $BOOST_TEST_TYPE_STRING)
SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
}
@@ -1971,11 +1971,11 @@ module BOOSTTEST_WITH_MAIN: BOOSTTEST {
}
FUZZ_DICTS_VALUE=
-### @usage: FUZZ_DICTS(path1 [path2...])
-###
-### Allows you to specify dictionaries, relative to the root of Arcadia, which will be used in Fuzzing.
+### @usage: FUZZ_DICTS(path1 [path2...])
+###
+### Allows you to specify dictionaries, relative to the root of Arcadia, which will be used in Fuzzing.
### Libfuzzer and AFL use a single syntax for dictionary descriptions.
-### Should only be used in FUZZ modules.
+### Should only be used in FUZZ modules.
###
### Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
macro FUZZ_DICTS(Data...) {
@@ -1983,19 +1983,19 @@ macro FUZZ_DICTS(Data...) {
}
FUZZ_OPTS_VALUE=
-### @usage: FUZZ_OPTS(opt1 [Opt2...])
-###
-### Overrides or adds options to the corpus mining and fuzzer run.
-### Currently supported only Libfuzzer, so you should use the options for it.
-### Should only be used in FUZZ modules.
-###
-### @example:
-###
-### FUZZ_OPTS (
-### -max_len=1024
-### -rss_limit_mb=8192
-### )
-###
+### @usage: FUZZ_OPTS(opt1 [Opt2...])
+###
+### Overrides or adds options to the corpus mining and fuzzer run.
+### Currently supported only Libfuzzer, so you should use the options for it.
+### Should only be used in FUZZ modules.
+###
+### @example:
+###
+### FUZZ_OPTS (
+### -max_len=1024
+### -rss_limit_mb=8192
+### )
+###
### Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/
macro FUZZ_OPTS(Data...) {
SET_APPEND(FUZZ_OPTS_VALUE $Data)
@@ -2017,11 +2017,11 @@ macro YT_SPEC(Data...) {
# tag:test
TEST_SRCS_VALUE=
-### @usage: TEST_SRCS(Files...)
-###
+### @usage: TEST_SRCS(Files...)
+###
### In PY2TEST, PY3TEST and PY*_LIBRARY modules used as PY_SRCS macro and additionally used to mine test cases to be executed by testing framework.
-###
-### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynapytest
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynapytest
macro TEST_SRCS(Tests...) {
SET_APPEND(TEST_SRCS_VALUE $Tests)
}
@@ -2035,10 +2035,10 @@ TEST_DATA_VALUE=
### @usage: DATA([path...])
###
### Specifies the path to the data necessary test.
-### Valid values are: arcadia/<path> , arcadia_tests_data/<path> and sbr://<resource_id>.
-### In the latter case resource will be brought to the working directory of the test before it is started
+### Valid values are: arcadia/<path> , arcadia_tests_data/<path> and sbr://<resource_id>.
+### In the latter case resource will be brought to the working directory of the test before it is started
###
-### Used only inside TEST modules.
+### Used only inside TEST modules.
###
### Documentation: https://wiki.yandex-team.ru/yatool/test/#dannyeizrepozitorija
macro DATA(Data...) {
@@ -2060,11 +2060,11 @@ macro TAG(Tags...) {
# tag:test
TEST_REQUIREMENTS_VALUE=
-### @usage: REQUIREMENTS([cpu:<count>] [disk_usage:<size>] [ram:<size>] [ram_disk:<size>] [container:<id>] [network:<restricted|full>] [dns:dns64])
+### @usage: REQUIREMENTS([cpu:<count>] [disk_usage:<size>] [ram:<size>] [ram_disk:<size>] [container:<id>] [network:<restricted|full>] [dns:dns64])
###
### Allows you to specify the requirements of the test.
###
-### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
macro REQUIREMENTS(Tags...) {
SET_APPEND(TEST_REQUIREMENTS_VALUE $Tags)
}
@@ -2073,7 +2073,7 @@ macro REQUIREMENTS(Tags...) {
TEST_ENV_VALUE=
### @usage: ENV(key[=value])
###
-### Sets env variable key to value (gets value from system env by default).
+### Sets env variable key to value (gets value from system env by default).
macro ENV(Data...) {
SET_APPEND(TEST_ENV_VALUE ${quo:Data})
}
@@ -2087,11 +2087,11 @@ macro CONFTEST_LOAD_POLICY_LOCAL() {
# tag:test
TEST_RECIPES_VALUE=
-### @usage: USE_RECIPE(path [arg1 arg2...])
+### @usage: USE_RECIPE(path [arg1 arg2...])
###
-### Provides prepared environment via recipe for test.
-###
-### Documentation: https://wiki.yandex-team.ru/yatool/test/recipes
+### Provides prepared environment via recipe for test.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/recipes
macro USE_RECIPE(Data...) {
SET_APPEND(TEST_RECIPES_VALUE $Data)
SET_APPEND(TEST_RECIPES_VALUE "USE_RECIPE_DELIM")
@@ -2101,18 +2101,18 @@ macro USE_RECIPE(Data...) {
TEST_PYTHON_PATH_VALUE=
# tag:python-specific tag:test
-### @usage: PYTHON_PATH(Path)
-###
-### Set path to Python that will be used to runs scripts in tests
+### @usage: PYTHON_PATH(Path)
+###
+### Set path to Python that will be used to runs scripts in tests
macro PYTHON_PATH(Path) {
SET(TEST_PYTHON_PATH_VALUE $Path)
}
# tag:test
SKIP_TEST_VALUE=
-### @usage: SKIP_TEST(Reason)
-###
-### Skip the suite defined by test module. Provide a reason to be output in test execution report.
+### @usage: SKIP_TEST(Reason)
+###
+### Skip the suite defined by test module. Provide a reason to be output in test execution report.
macro SKIP_TEST(Reason...) {
SET(SKIP_TEST_VALUE $Reason)
}
@@ -2121,14 +2121,14 @@ macro SKIP_TEST(Reason...) {
LINT_LEVEL_VALUE=extended
### @usage: NO_LINT()
###
-### Do not check for style files included in PY_SRCS, TEST_SRCS, JAVA_SRCS.
+### Do not check for style files included in PY_SRCS, TEST_SRCS, JAVA_SRCS.
macro NO_LINT() {
SET(LINT_LEVEL_VALUE none)
}
-
-### @usage: LINT(<none|base|strict>)
-###
-### Set linting levem for sources of the module
+
+### @usage: LINT(<none|base|strict>)
+###
+### Set linting levem for sources of the module
macro LINT(level) {
SET(LINT_LEVEL_VALUE $level)
}
@@ -2142,12 +2142,12 @@ macro NO_DOCTESTS() {
}
# tag:python-specific tag:test
-### @usage: _BASE_PYTEST # internal
-###
-### Base logic of Python 2.x py.test modules: common module properties and dependencies.
-module _BASE_PYTEST: _BASE_PY_PROGRAM {
+### @usage: _BASE_PYTEST # internal
+###
+### Base logic of Python 2.x py.test modules: common module properties and dependencies.
+module _BASE_PYTEST: _BASE_PY_PROGRAM {
.NODE_TYPE=Program
- .FINAL_TARGET=no
+ .FINAL_TARGET=no
.ALLOWED=YT_SPEC NO_DOCTESTS
when ($USE_ARCADIA_PYTHON == "yes") {
PEERDIR+=library/python/pytest
@@ -2161,10 +2161,10 @@ module _BASE_PYTEST: _BASE_PY_PROGRAM {
}
# tag:python-specific tag:deprecated tag:test
-### @usage: PYTEST_BIN() #deprecated
-###
+### @usage: PYTEST_BIN() #deprecated
+###
### Same as PY2TEST. Don't use this, use PY2TEST instead.
-module PYTEST_BIN: _BASE_PYTEST {
+module PYTEST_BIN: _BASE_PYTEST {
.NODE_TYPE=Program
SETUP_PYTEST_BIN()
}
@@ -2172,31 +2172,31 @@ module PYTEST_BIN: _BASE_PYTEST {
# tag:python-specific tag:test
### @usage: PY2TEST([name])
###
-### The test module for Python 2.x based on py.test
-###
-### This module is compatible only with PYTHON2-tagged modules and selects peers from multimodules accordingly.
-### This module is compatible with non-Arcadia Python builds.
-###
+### The test module for Python 2.x based on py.test
+###
+### This module is compatible only with PYTHON2-tagged modules and selects peers from multimodules accordingly.
+### This module is compatible with non-Arcadia Python builds.
+###
### Documentation: https://wiki.yandex-team.ru/yatool/test/#python
-### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
module PY2TEST: PYTEST_BIN {
- when ($FAIL_PY2 == "yes") {
- _OK=no
- }
- otherwise {
- PEERDIR+=build/rules/py2_deprecation
- }
+ when ($FAIL_PY2 == "yes") {
+ _OK=no
+ }
+ otherwise {
+ PEERDIR+=build/rules/py2_deprecation
+ }
SET(MODULE_LANG PY2)
ASSERT(_OK You are using deprecated Python2-only code (PY2TEST). Please consider rewriting to Python 3.)
}
# tag:python-specific tag:deprecated tag:test
-### @usage: PY3TEST_BIN() #deprecated
-###
-### Same as PY3TEST. Don't use this, use PY3TEST instead.
-module PY3TEST_BIN: _BASE_PY3_PROGRAM {
+### @usage: PY3TEST_BIN() #deprecated
+###
+### Same as PY3TEST. Don't use this, use PY3TEST instead.
+module PY3TEST_BIN: _BASE_PY3_PROGRAM {
.NODE_TYPE=Program
- .FINAL_TARGET=no
+ .FINAL_TARGET=no
.ALLOWED=YT_SPEC NO_DOCTESTS
SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
SET(MODULE_LANG PY3)
@@ -2212,21 +2212,21 @@ module PY3TEST_BIN: _BASE_PY3_PROGRAM {
EXCLUDE_SUBMODULES=PY3TEST_LIBRARY
# tag:python-specific tag:test
-### @usage: PY3TEST([name])
-###
-### The test module for Python 3.x based on py.test
-###
+### @usage: PY3TEST([name])
+###
+### The test module for Python 3.x based on py.test
+###
### This module is compatible only with PYTHON3-tagged modules and selects peers from multimodules accordingly.
-### This module is only compatible with Arcadia Python build (to avoid tests duplication from Python2/3-tests). For non-Arcadia python use PYTEST.
-###
-### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynapytest
-### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+### This module is only compatible with Arcadia Python build (to avoid tests duplication from Python2/3-tests). For non-Arcadia python use PYTEST.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynapytest
+### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
multimodule PY3TEST {
module PY3TEST_PROGRAM: PY3TEST_BIN {
.FINAL_TARGET=yes
}
- module PY3TEST_LIBRARY: _PY3_LIBRARY {
+ module PY3TEST_LIBRARY: _PY3_LIBRARY {
PEERDIR+=library/python/pytest
_REQUIRE_EXPLICIT_LICENSE()
}
@@ -2245,50 +2245,50 @@ macro STYLE(Globs...) {
# tag:cpp-specific tag:deprecated tag:test
### @usage: GTEST_UGLY([name])
-###
+###
### Deprecated, do not use in new projects. Use GTEST instead.
###
-### The test module based on gtest (contrib/libs/gtest contrib/libs/gmock).
-### Use public documentation on gtest for details.
+### The test module based on gtest (contrib/libs/gtest contrib/libs/gmock).
+### Use public documentation on gtest for details.
###
-### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
module GTEST_UGLY: _BASE_PROGRAM {
.NODE_TYPE=Program
- .FINAL_TARGET=no
+ .FINAL_TARGET=no
PEERDIR(contrib/restricted/googletest/googlemock contrib/restricted/googletest/googletest)
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME gtest)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME gtest)
SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
}
# tag:test
-### @usage: EXECTEST()
-###
-### Module definition of generic test that executes a binary.
-### Use macro RUN to specify binary to run.
+### @usage: EXECTEST()
###
-### @example:
+### Module definition of generic test that executes a binary.
+### Use macro RUN to specify binary to run.
###
+### @example:
+###
### EXECTEST()
-### OWNER(g:yatool)
-###
-### RUN(
-### cat input.txt
-### )
-### DATA(
-### arcadia/devtools/ya/test/tests/exectest/data
-### )
-### DEPENDS(
-### devtools/dummy_arcadia/cat
-### )
-### TEST_CWD(devtools/ya/test/tests/exectest/data)
-### END()
-###
-### More examples: https://wiki.yandex-team.ru/yatool/test/#exec-testy
-###
-### @see: [RUN()](#macro_RUN)
-module EXECTEST: _BARE_UNIT {
+### OWNER(g:yatool)
+###
+### RUN(
+### cat input.txt
+### )
+### DATA(
+### arcadia/devtools/ya/test/tests/exectest/data
+### )
+### DEPENDS(
+### devtools/dummy_arcadia/cat
+### )
+### TEST_CWD(devtools/ya/test/tests/exectest/data)
+### END()
+###
+### More examples: https://wiki.yandex-team.ru/yatool/test/#exec-testy
+###
+### @see: [RUN()](#macro_RUN)
+module EXECTEST: _BARE_UNIT {
.NODE_TYPE=Program
- .FINAL_TARGET=no
+ .FINAL_TARGET=no
.ALLOWED=YT_SPEC
.RESTRICTED=FORK_TEST_FILES
SET(MODULE_SUFFIX .pkg.fake)
@@ -2300,8 +2300,8 @@ module EXECTEST: _BARE_UNIT {
### @usage: Y_BENCHMARK([benchmarkname])
###
### Benchmark test based on the library/cpp/testing/benchmark.
-###
-### For more details see: https://wiki.yandex-team.ru/yatool/test/#zapuskbenchmark
+###
+### For more details see: https://wiki.yandex-team.ru/yatool/test/#zapuskbenchmark
module Y_BENCHMARK: PROGRAM {
PEERDIR(library/cpp/testing/benchmark/main)
SET(MODULE_LANG CPP)
@@ -2315,7 +2315,7 @@ module Y_BENCHMARK: PROGRAM {
### For more details see: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/benchmark/README.md
module G_BENCHMARK: _BASE_PROGRAM {
PEERDIR(library/cpp/testing/gbenchmark_main)
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME g_benchmark)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME g_benchmark)
SET(MODULE_LANG CPP)
}
@@ -2335,36 +2335,36 @@ when ($YA_DEV == "yes") {
# tag:test
### @usage: UNITTEST_FOR(path/to/lib)
-###
-### Convenience extension of UNITTEST module.
-### The UNINTTEST module with additional SRCDIR + ADDINCL + PEERDIR on path/to/lib.
+###
+### Convenience extension of UNITTEST module.
+### The UNINTTEST module with additional SRCDIR + ADDINCL + PEERDIR on path/to/lib.
### path/to/lib is the path to the directory with the LIBRARY project.
-###
-### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
+###
+### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/
module UNITTEST_FOR: UNITTEST {
.SEM=UNITTEST_SEM
PEERDIR(ADDINCL $UNITTEST_DIR)
SRCDIR($UNITTEST_DIR)
}
-### @usage: _LIBRARY # internal
-###
-### Base module definition for all libraries.
-### Contains basic logic like module properties, default variable values etc.
-### All libraries similar to C++-libraries should be inherited from it.
-module _LIBRARY: _BASE_UNIT {
+### @usage: _LIBRARY # internal
+###
+### Base module definition for all libraries.
+### Contains basic logic like module properties, default variable values etc.
+### All libraries similar to C++-libraries should be inherited from it.
+module _LIBRARY: _BASE_UNIT {
.CMD=LINK_LIB
.NODE_TYPE=Library
.PEERDIR_POLICY=as_include
.EXTS=.o .obj .a .mf .supp .tidyjson .ld
.ALLOWED=GRPC USE_SKIFF EXTRALIBS OBJADDE_GLOBAL RESOURCE_FILES
- .GLOBAL=USER_CFLAGS USER_CXXFLAGS USER_CONLYFLAGS LDFLAGS SRCS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
- .RESTRICTED=ALLOCATOR SIZE TAG DATA TEST_DATA DEPENDS FORK_TESTS FORK_SUBTESTS SPLIT_FACTOR TEST_CWD RUN TIMEOUT SPLIT_DWARF
- .FINAL_TARGET=no
+ .GLOBAL=USER_CFLAGS USER_CXXFLAGS USER_CONLYFLAGS LDFLAGS SRCS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
+ .RESTRICTED=ALLOCATOR SIZE TAG DATA TEST_DATA DEPENDS FORK_TESTS FORK_SUBTESTS SPLIT_FACTOR TEST_CWD RUN TIMEOUT SPLIT_DWARF
+ .FINAL_TARGET=no
.GLOBAL_CMD=GLOBAL_LINK_LIB
.GLOBAL_EXTS=.o .obj .tidyjson
- .ALIASES=RES_REQUIREMENTS=PY_REQUIREMENTS
-
+ .ALIASES=RES_REQUIREMENTS=PY_REQUIREMENTS
+
GLOBAL_SUFFIX=.global$MODULE_SUFFIX
#TODO: Remove this hack (really we do not need add fake src at all)
ENABLE(NEED_ADD_FAKE_SRC)
@@ -2422,20 +2422,20 @@ CMAKE_FIND_PKG_COMP=
CONAN_REQUIRE=
### @usage: LIBRARY()
-###
-### The regular static library module.
-###
-### The LIBRARY() is intermediate module, so when built directly it won't build its dependencies.
-### It transitively provides its PEERDIRs to ultimate final target, where all LIBRARY() modules are built and linked together.
-###
-### This is C++ library, and it selects peers from multimodules accordingly.
-###
-### It makes little sense to mention LIBRARY in DEPENDS or BUNDLE, package and deploy it since it is not a standalone entity.
-### In order to use library in tests PEERDIR it to link into tests.
-### If you think you need to distribute static library please contact devtools@ for assistance.
+###
+### The regular static library module.
+###
+### The LIBRARY() is intermediate module, so when built directly it won't build its dependencies.
+### It transitively provides its PEERDIRs to ultimate final target, where all LIBRARY() modules are built and linked together.
+###
+### This is C++ library, and it selects peers from multimodules accordingly.
+###
+### It makes little sense to mention LIBRARY in DEPENDS or BUNDLE, package and deploy it since it is not a standalone entity.
+### In order to use library in tests PEERDIR it to link into tests.
+### If you think you need to distribute static library please contact devtools@ for assistance.
module LIBRARY: _LIBRARY {
.GLOBAL=_AARS _PROGUARD_RULES
- .ALIASES=REQUIREMENTS=CC_REQUIREMENTS
+ .ALIASES=REQUIREMENTS=CC_REQUIREMENTS
.SEM=CPP_LIBRARY_SEM
.GLOBAL_SEM=CPP_OBJ_LIBRARY_SEM
@@ -2454,7 +2454,7 @@ module LIBRARY: _LIBRARY {
CPP_LIBRARY_SEM=ignored
}
- when ($HAS_CPP_PROTOBUF_PEERS == "yes") {
+ when ($HAS_CPP_PROTOBUF_PEERS == "yes") {
PEERDIR+=$CPP_PROTOBUF_PEERS
}
SET(MODULE_TYPE LIBRARY)
@@ -2497,40 +2497,40 @@ macro _CONDITIONAL_SRCS(USE_CONDITIONAL_SRCS[], DYMMY...) {
}
# XXX: dirty hack for correct LDFLAGS passing
-RESOURCES_LIBRARY_LINK=$TOUCH_UNIT ${hide:LDFLAGS_GLOBAL} ${hide:LDFLAGS}
+RESOURCES_LIBRARY_LINK=$TOUCH_UNIT ${hide:LDFLAGS_GLOBAL} ${hide:LDFLAGS}
RESOURCES_LIBRARY_SEM=ignored
-### @usage: RESOURCES_LIBRARY()
-###
-### Definition of a module that brings its content from external source (Sandbox) via DECLARE_EXTERNAL_RESOURCE macro.
-### This can participate in PEERDIRs of others as library but it cannot have own sources and PEERDIRs.
-###
-### @see: [DECLARE_EXTERNAL_RESOURCE()](#macro_DECLARE_EXTERNAL_RESOURCE)
-module RESOURCES_LIBRARY: _BARE_UNIT {
+### @usage: RESOURCES_LIBRARY()
+###
+### Definition of a module that brings its content from external source (Sandbox) via DECLARE_EXTERNAL_RESOURCE macro.
+### This can participate in PEERDIRs of others as library but it cannot have own sources and PEERDIRs.
+###
+### @see: [DECLARE_EXTERNAL_RESOURCE()](#macro_DECLARE_EXTERNAL_RESOURCE)
+module RESOURCES_LIBRARY: _BARE_UNIT {
.CMD=RESOURCES_LIBRARY_LINK
.SEM=RESOURCES_LIBRARY_SEM
- .ALLOWED=DECLARE_EXTERNAL_RESOURCE EXTRALIBS OBJADDE_GLOBAL
- .RESTRICTED=ALLOCATOR SIZE TAG DATA TEST_DATA DEPENDS FORK_TESTS FORK_SUBTESTS SPLIT_FACTOR TEST_CWD RUN TIMEOUT SRC SRCS PEERDIR SPLIT_DWARF
- .NODE_TYPE=Library
- .PEERDIR_POLICY=as_include
- .EXTS=.o .obj .a .mf .supp .tidyjson .ld
- .GLOBAL=USER_CFLAGS USER_CXXFLAGS USER_CONLYFLAGS LDFLAGS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
-
- MODULE_SUFFIX=.pkg.fake
- ENABLE(NEED_ADD_FAKE_SRC)
+ .ALLOWED=DECLARE_EXTERNAL_RESOURCE EXTRALIBS OBJADDE_GLOBAL
+ .RESTRICTED=ALLOCATOR SIZE TAG DATA TEST_DATA DEPENDS FORK_TESTS FORK_SUBTESTS SPLIT_FACTOR TEST_CWD RUN TIMEOUT SRC SRCS PEERDIR SPLIT_DWARF
+ .NODE_TYPE=Library
+ .PEERDIR_POLICY=as_include
+ .EXTS=.o .obj .a .mf .supp .tidyjson .ld
+ .GLOBAL=USER_CFLAGS USER_CXXFLAGS USER_CONLYFLAGS LDFLAGS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
+
+ MODULE_SUFFIX=.pkg.fake
+ ENABLE(NEED_ADD_FAKE_SRC)
WITHOUT_LICENSE_TEXTS()
}
FAT_OBJECT_ARGS=
FAT_OBJECT_OUTS=
-
+
macro _FAT_OBJECT_ARGS_BASE(Flag, Lib) {
.CMD=$Flag=$Lib
}
macro PACK_GLOBALS_IN_LIBRARY() {
- SET_APPEND(FAT_OBJECT_ARGS $_FAT_OBJECT_ARGS_BASE(--globals-lib, ${BINDIR}/${pre=$MODULE_PREFIX:REALPRJNAME.globals.a}))
- SET_APPEND(FAT_OBJECT_OUTS \${output;hide;noauto;norel;nopath;noext;pre=$MODULE_PREFIX;suf=$BINDIR:REALPRJNAME.globals.a})
+ SET_APPEND(FAT_OBJECT_ARGS $_FAT_OBJECT_ARGS_BASE(--globals-lib, ${BINDIR}/${pre=$MODULE_PREFIX:REALPRJNAME.globals.a}))
+ SET_APPEND(FAT_OBJECT_OUTS \${output;hide;noauto;norel;nopath;noext;pre=$MODULE_PREFIX;suf=$BINDIR:REALPRJNAME.globals.a})
}
when ($OS_ANDROID != "yes") {
@@ -2540,12 +2540,12 @@ otherwise {
LINK_FAT_OBJECT_CMD=$LINK_FAT_OBJECT_LIBRARY
}
-### @usage: FAT_OBJECT()
-###
-### The "fat" object module. It will contain all its transitive dependencies reachable by PEERDIRs:
-### static libraries, local (from own SRCS) and global (from peers') object files.
-###
-### Designed for use in XCode projects for iOS.
+### @usage: FAT_OBJECT()
+###
+### The "fat" object module. It will contain all its transitive dependencies reachable by PEERDIRs:
+### static libraries, local (from own SRCS) and global (from peers') object files.
+###
+### Designed for use in XCode projects for iOS.
module FAT_OBJECT: LIBRARY {
.ALLOWED=PACK_GLOBALS_IN_LIBRARY
.CMD=LINK_FAT_OBJECT_CMD
@@ -2563,10 +2563,10 @@ module FAT_OBJECT: LIBRARY {
_USE_LINKER()
- # This module requires at least one .o which is not subject to removal so just add _fake_src.cpp as SRCS
- # ymake's handling of NEED_ADD_FAKE_SRC may insert arbitrary command, not necessarily compilation
- DISABLE(NEED_ADD_FAKE_SRC)
- SRCS(build/scripts/_fake_src.cpp)
+ # This module requires at least one .o which is not subject to removal so just add _fake_src.cpp as SRCS
+ # ymake's handling of NEED_ADD_FAKE_SRC may insert arbitrary command, not necessarily compilation
+ DISABLE(NEED_ADD_FAKE_SRC)
+ SRCS(build/scripts/_fake_src.cpp)
}
### @usage: RECURSIVE_LIBRARY()
@@ -2585,23 +2585,23 @@ module RECURSIVE_LIBRARY: LIBRARY {
SRCS(build/scripts/_fake_src.cpp)
}
-_SONAME=
-
-### @usage: DLL_UNIT # internal
-###
-### Base module for all dynamically linked libraries as final artifacts.
-### Contains all general logic for such kind of modules. Supports versioning and export files.
-### Cannot participate in linking to programs, intended to be used as final artifact (packaged and deployed).
-module DLL_UNIT: _LINK_UNIT {
+_SONAME=
+
+### @usage: DLL_UNIT # internal
+###
+### Base module for all dynamically linked libraries as final artifacts.
+### Contains all general logic for such kind of modules. Supports versioning and export files.
+### Cannot participate in linking to programs, intended to be used as final artifact (packaged and deployed).
+module DLL_UNIT: _LINK_UNIT {
.CMD=LINK_DYN_LIB
.NODE_TYPE=Library
.SYMLINK_POLICY=SO
- .GLOBAL=USER_CFLAGS USER_CXXFLAGS USER_CONLYFLAGS LDFLAGS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
+ .GLOBAL=USER_CFLAGS USER_CXXFLAGS USER_CONLYFLAGS LDFLAGS _WHOLE_ARCHIVE_LIBS_VALUE RPATH
.ALLOWED=WHOLE_ARCHIVE
- DYNAMIC_LINK=yes
+ DYNAMIC_LINK=yes
ALLOCATOR(FAKE)
SET(MODULE_TYPE DLL)
- SET(MODULE_TAG DLL)
+ SET(MODULE_TAG DLL)
SET(MODULE_LANG CPP)
ADD_CLANG_TIDY()
@@ -2610,7 +2610,7 @@ module DLL_UNIT: _LINK_UNIT {
}
elsewhen ($DARWIN == "yes" || $OS_IOS == "yes") {
MODULE_PREFIX=lib
- MODULE_SUFFIX=.dylib
+ MODULE_SUFFIX=.dylib
}
elsewhen ($TIDY == "yes") {
MODULE_PREFIX=
@@ -2618,18 +2618,18 @@ module DLL_UNIT: _LINK_UNIT {
}
otherwise {
MODULE_PREFIX=lib
- MODULE_SUFFIX=.so
- }
-
- # This by now replicates ymake's bahavior. We'll get rid of SONAME setting in ymake and fix this code alltogether
- SONAME=${pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX:REALPRJNAME}
- when ($MODULE_VERSION) {
- LINK_DYN_LIB_FLAGS=--soname ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX$MODULE_VERSION:REALPRJNAME}
+ MODULE_SUFFIX=.so
}
- _SONAME=$SONAME$MODULE_VERSION
+ # This by now replicates ymake's bahavior. We'll get rid of SONAME setting in ymake and fix this code alltogether
+ SONAME=${pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX:REALPRJNAME}
+ when ($MODULE_VERSION) {
+ LINK_DYN_LIB_FLAGS=--soname ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX$MODULE_VERSION:REALPRJNAME}
+ }
+ _SONAME=$SONAME$MODULE_VERSION
+
when ($LINUX == "yes") {
- # '-z notext' is needed for linking mkl into shared libraries
+ # '-z notext' is needed for linking mkl into shared libraries
LDFLAGS += -Wl,-z,notext
when ($_NO_FIX_ELF != "yes") {
LINK_DYN_LIB_FLAGS+=--fix-elf ${tool:"tools/fix_elf"}
@@ -2643,26 +2643,26 @@ module DLL_UNIT: _LINK_UNIT {
when ($CLANG_COVERAGE && $CLANG_COVERAGE != "no") {
PEERDIR+=library/cpp/testing/dump_clang_coverage
}
-
- when ($IDE_MSVS == "yes") {
- PEERDIR+=build/scripts/c_templates
- }
+
+ when ($IDE_MSVS == "yes") {
+ PEERDIR+=build/scripts/c_templates
+ }
}
# tag:python-specific
-### @usage: PY_ANY_MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
-###
-### The Python external module for any versio of Arcadia or system Python.
-### 1. major_ver and minor_ver must be integers.
-### 2. The resulting .so will have the prefix "lib".
-### 3. Processing EXPORTS and PREFIX is the same as for DLL module
-### This is native DLL, so it will select C++ version from PROTO_LIBRARY.
-###
-### Note: Use PYTHON2_MODULE()/PYTHON3_MODULE() in order to PEERDIR proper version of PY23_NATIVE_LIBRARY.
-### Do not PEERDIR any PY*_LIBRARY: this will link Python in and render artifact unusable as Python module.
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
-module PY_ANY_MODULE: DLL_UNIT {
+### @usage: PY_ANY_MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
+###
+### The Python external module for any versio of Arcadia or system Python.
+### 1. major_ver and minor_ver must be integers.
+### 2. The resulting .so will have the prefix "lib".
+### 3. Processing EXPORTS and PREFIX is the same as for DLL module
+### This is native DLL, so it will select C++ version from PROTO_LIBRARY.
+###
+### Note: Use PYTHON2_MODULE()/PYTHON3_MODULE() in order to PEERDIR proper version of PY23_NATIVE_LIBRARY.
+### Do not PEERDIR any PY*_LIBRARY: this will link Python in and render artifact unusable as Python module.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module PY_ANY_MODULE: DLL_UNIT {
when ($MSVC != "yes" && $DARWIN != "yes") {
LDFLAGS+= -Wl,-Bsymbolic
}
@@ -2678,13 +2678,13 @@ module PY_ANY_MODULE: DLL_UNIT {
}
}
- # This by now replicates ymake's bahavior. We'll get rid of SONAME setting in ymake and fix this code alltogether
- SONAME=${pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX:REALPRJNAME}
- when ($MODULE_VERSION) {
- LINK_DYN_LIB_FLAGS=--soname ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX$MODULE_VERSION:REALPRJNAME}
- }
- _SONAME=$SONAME$MODULE_VERSION
-
+ # This by now replicates ymake's bahavior. We'll get rid of SONAME setting in ymake and fix this code alltogether
+ SONAME=${pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX:REALPRJNAME}
+ when ($MODULE_VERSION) {
+ LINK_DYN_LIB_FLAGS=--soname ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX$MODULE_VERSION:REALPRJNAME}
+ }
+ _SONAME=$SONAME$MODULE_VERSION
+
# -bundle
when ($DARWIN == "yes") {
LDFLAGS+=-flat_namespace
@@ -2692,85 +2692,85 @@ module PY_ANY_MODULE: DLL_UNIT {
when ($MSVC == "yes" || $CYGWIN == "yes") {
MODULE_PREFIX=
- MODULE_SUFFIX=.pyd
+ MODULE_SUFFIX=.pyd
}
otherwise {
MODULE_PREFIX=
- MODULE_SUFFIX=.so
+ MODULE_SUFFIX=.so
}
.RESTRICTED=USE_PYTHON2 USE_PYTHON3 PY_SRCS PY_MAIN
}
# tag:python-specific
### @usage: PY2MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
-###
-### The Python external module for Python2 and any system Python
-### 1. major_ver and minor_ver must be integers.
-### 2. The resulting .so will have the prefix "lib".
-### 3. Processing EXPORTS and PREFIX is the same as for DLL module
-### This is native DLL, so it will select C++ version from PROTO_LIBRARY.
-###
-### Note: this module will always PEERDIR Python2 version of PY23_NATIVE_LIBRARY.
+###
+### The Python external module for Python2 and any system Python
+### 1. major_ver and minor_ver must be integers.
+### 2. The resulting .so will have the prefix "lib".
+### 3. Processing EXPORTS and PREFIX is the same as for DLL module
+### This is native DLL, so it will select C++ version from PROTO_LIBRARY.
+###
+### Note: this module will always PEERDIR Python2 version of PY23_NATIVE_LIBRARY.
### Do not PEERDIR PY2_LIBRARY or PY23_LIBRARY: this will link Python in and render artifact unusable as Python module.
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
module PY2MODULE: PY_ANY_MODULE {
- PYTHON2_MODULE()
+ PYTHON2_MODULE()
SET(MODULE_LANG PY2)
- .RESTRICTED=PYTHON3_MODULE PYTHON3_ADDINCL
-}
-
+ .RESTRICTED=PYTHON3_MODULE PYTHON3_ADDINCL
+}
+
# tag:python-specific
-### @usage: PY3MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
-###
-### The Python external module for Python3 and any system Python
-### 1. major_ver and minor_ver must be integers.
-### 2. The resulting .so will have the prefix "lib".
-### 3. Processing EXPORTS and PREFIX is the same as for DLL module
-### This is native DLL, so it will select C++ version from PROTO_LIBRARY.
-###
-### Note: this module will always PEERDIR Python3 version of PY23_NATIVE_LIBRARY.
-### Do not PEERDIR PY3_LIBRARY or PY23_LIBRARY: this will link Python in and render artifact unusable as Python module.
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
-module PY3MODULE: PY_ANY_MODULE {
- PYTHON3_MODULE()
+### @usage: PY3MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
+###
+### The Python external module for Python3 and any system Python
+### 1. major_ver and minor_ver must be integers.
+### 2. The resulting .so will have the prefix "lib".
+### 3. Processing EXPORTS and PREFIX is the same as for DLL module
+### This is native DLL, so it will select C++ version from PROTO_LIBRARY.
+###
+### Note: this module will always PEERDIR Python3 version of PY23_NATIVE_LIBRARY.
+### Do not PEERDIR PY3_LIBRARY or PY23_LIBRARY: this will link Python in and render artifact unusable as Python module.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module PY3MODULE: PY_ANY_MODULE {
+ PYTHON3_MODULE()
SET(MODULE_LANG PY3)
.RESTRICTED=PYTHON2_MODULE PYTHON2_ADDINCL
-}
-
+}
+
# tag:python-specific
-### @usage: PYTHON2_MODULE()
-###
-### Use in PY_ANY_MODULE to set it up for Python 2.x.
-macro PYTHON2_MODULE() {
- when ($USE_ARCADIA_PYTHON == "yes" && $MSVC == "yes" || $IS_CROSS_TOOLS == "yes") {
- PEERDIR+=contrib/tools/python/lib
- }
-
+### @usage: PYTHON2_MODULE()
+###
+### Use in PY_ANY_MODULE to set it up for Python 2.x.
+macro PYTHON2_MODULE() {
+ when ($USE_ARCADIA_PYTHON == "yes" && $MSVC == "yes" || $IS_CROSS_TOOLS == "yes") {
+ PEERDIR+=contrib/tools/python/lib
+ }
+
PYTHON2_ADDINCL()
-}
-
+}
+
# tag:python-specific
-### @usage: PYTHON3_MODULE()
-###
-### Use in PY_ANY_MODULE to set it up for Python 3.x.
-macro PYTHON3_MODULE() {
- when ($USE_ARCADIA_PYTHON == "yes" && $MSVC == "yes" || $IS_CROSS_TOOLS == "yes") {
- PEERDIR+=contrib/tools/python3/lib
- }
-
- PYTHON3_ADDINCL()
-}
-
+### @usage: PYTHON3_MODULE()
+###
+### Use in PY_ANY_MODULE to set it up for Python 3.x.
+macro PYTHON3_MODULE() {
+ when ($USE_ARCADIA_PYTHON == "yes" && $MSVC == "yes" || $IS_CROSS_TOOLS == "yes") {
+ PEERDIR+=contrib/tools/python3/lib
+ }
+
+ PYTHON3_ADDINCL()
+}
+
# tag:r-specific
-### @usage: R_MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
-###
-### The external module for R language.
-### 1. major_ver and minor_ver must be integers.
-### 2. The resulting .so will have the prefix "lib".
-### 3. Processing EXPORTS and PREFIX is the same as for DLL module
-### This is native DLL, so it will select C++ version from PROTO_LIBRARY.
+### @usage: R_MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
+###
+### The external module for R language.
+### 1. major_ver and minor_ver must be integers.
+### 2. The resulting .so will have the prefix "lib".
+### 3. Processing EXPORTS and PREFIX is the same as for DLL module
+### This is native DLL, so it will select C++ version from PROTO_LIBRARY.
module R_MODULE: DLL_UNIT {
when ($DARWIN == "yes") {
LDFLAGS+=-flat_namespace -dynamiclib
@@ -2784,27 +2784,27 @@ module R_MODULE: DLL_UNIT {
ADDINCL(contrib/libs/r-lang)
}
-### @usage: DYNAMIC_LIBRARY_FROM(Paths)
-###
-### Use specified libraries as sources of DLL
-macro DYNAMIC_LIBRARY_FROM(Path...) {
- PEERDIR($Path)
- WHOLE_ARCHIVE($Path)
-}
-
-
+### @usage: DYNAMIC_LIBRARY_FROM(Paths)
+###
+### Use specified libraries as sources of DLL
+macro DYNAMIC_LIBRARY_FROM(Path...) {
+ PEERDIR($Path)
+ WHOLE_ARCHIVE($Path)
+}
+
+
### @usage: DLL(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix])
-###
-### Dynamic library module defintion.
+###
+### Dynamic library module defintion.
### 1. major_ver and minor_ver must be integers.
### 2. EXPORTS allows you to explicitly specify the list of exported functions. This accepts 2 kind of files: .exports with <lang symbol> pairs and JSON-line .symlist files
### 3. PREFIX allows you to change the prefix of the output file (default DLL has the prefix "lib").
###
-### DLL cannot participate in linking to programs but can be used from Java or as final artifact (packaged and deployed).
+### DLL cannot participate in linking to programs but can be used from Java or as final artifact (packaged and deployed).
module DLL: DLL_UNIT {
SET(MAKE_ONLY_SHARED_LIB yes)
SET(MODULE_LANG CPP)
- when ($OS_WINDOWS) {
+ when ($OS_WINDOWS) {
MODULE_SUFFIX=.dll
}
@@ -2831,8 +2831,8 @@ module DLL_TOOL: DLL {
### 3. PREFIX allows you to change the prefix of the output file.
module SO_PROGRAM: DLL {
.CMD=LINK_EXEC_DYN_LIB
- SET(MODULE_TYPE PROGRAM)
-
+ SET(MODULE_TYPE PROGRAM)
+
MODULE_PREFIX=
when ($MSVC == "yes" || $CYGWIN == "yes") {
MODULE_SUFFIX=.exe
@@ -2849,13 +2849,13 @@ DLL_PROXY_CMD_MF=$GENERATE_MF && $COPY_CMD $AUTO_INPUT $TARGET
###
### The use of this module is strictly prohibited!!!
### This is a temporary and project-specific solution.
-module DEV_DLL_PROXY: _BARE_UNIT {
+module DEV_DLL_PROXY: _BARE_UNIT {
.NODE_TYPE=Library
- .EXTS=.so .dll .dylib .mf
+ .EXTS=.so .dll .dylib .mf
.CMD=DLL_PROXY_CMD_MF
DYNAMIC_LINK=yes
- when ($OS_WINDOWS == "yes") {
+ when ($OS_WINDOWS == "yes") {
MODULE_SUFFIX=.dll
}
elsewhen ($DARWIN == "yes" || $OS_IOS == "yes") {
@@ -2874,105 +2874,105 @@ module DEV_DLL_PROXY: _BARE_UNIT {
### The use of this module is strictly prohibited!!!
### This is a temporary and project-specific solution.
module DLL_PROXY: DEV_DLL_PROXY {
- .EXTS=.so .dylib .lib .mf
+ .EXTS=.so .dylib .lib .mf
.PROXY=yes
.PEERDIR_POLICY=as_build_from
- SET(PEERDIR_TAGS DLL __EMPTY__)
+ SET(PEERDIR_TAGS DLL __EMPTY__)
- when ($OS_WINDOWS == "yes") {
+ when ($OS_WINDOWS == "yes") {
MODULE_SUFFIX=.lib
}
}
-# tag:internal
-### @usage: DYNAMIC_DEPS(Path...) # internal, temporary
-###
-### Enlist paths to all DYNAMIC_LIBRARY dependencies of the DYNAMIC_LIBRARY
-### This it needed to transfer their outputs through the library to PROGRAM
-### or dependent DLL/DYNAMIC_LIBRARY.
-###
-### Note: this is temporary solution until support of `super-global` variables come
-### which will enable transfer of some properies though final targets like DLLs.
-macro DYNAMIC_DEPS(Path...) {
- # PEERDIR as macro completely ignored in place where this macro applies
- SET_APPEND(PEERDIR $Path)
-}
-
-# tag:internal
-### @usage: DYNAMIC_LIBRARY() # internal
-###
-### The use of this module is strictly prohibited except LGPL-related opensourcing
-### This provides linkable DLL module which brings its results to programs and tests
-### for seamless tesing and packaging
-multimodule DYNAMIC_LIBRARY {
- module DLL_BIN: DLL {
- .PROXY=yes
- .IGNORED=PROVIDES
- SET(MODULE_TAG DLL)
- }
- module DLL_LIB: _DLL_COMPATIBLE_LIBRARY {
- .CMD=TOUCH_UNIT_MF
- .PEERDIRSELF=DLL_BIN
- .IGNORED=SRCS PEERDIR RUN_PROGRAM PYTHON DYNAMIC_LIBRARY_FROM GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_PYTHON2 USE_PYTHON3
- .ALLOWED=DYNAMIC_DEPS
-
- SET(PEERDIR_TAGS DLL_LIB __EMPTY__)
-
- _BARE_MODULE()
- DYNAMIC_LINK=yes
- MODULE_SUFFIX=.pkg.fake
- PEERDIR+=build/platform/local_so
-
+# tag:internal
+### @usage: DYNAMIC_DEPS(Path...) # internal, temporary
+###
+### Enlist paths to all DYNAMIC_LIBRARY dependencies of the DYNAMIC_LIBRARY
+### This it needed to transfer their outputs through the library to PROGRAM
+### or dependent DLL/DYNAMIC_LIBRARY.
+###
+### Note: this is temporary solution until support of `super-global` variables come
+### which will enable transfer of some properies though final targets like DLLs.
+macro DYNAMIC_DEPS(Path...) {
+ # PEERDIR as macro completely ignored in place where this macro applies
+ SET_APPEND(PEERDIR $Path)
+}
+
+# tag:internal
+### @usage: DYNAMIC_LIBRARY() # internal
+###
+### The use of this module is strictly prohibited except LGPL-related opensourcing
+### This provides linkable DLL module which brings its results to programs and tests
+### for seamless tesing and packaging
+multimodule DYNAMIC_LIBRARY {
+ module DLL_BIN: DLL {
+ .PROXY=yes
+ .IGNORED=PROVIDES
+ SET(MODULE_TAG DLL)
+ }
+ module DLL_LIB: _DLL_COMPATIBLE_LIBRARY {
+ .CMD=TOUCH_UNIT_MF
+ .PEERDIRSELF=DLL_BIN
+ .IGNORED=SRCS PEERDIR RUN_PROGRAM PYTHON DYNAMIC_LIBRARY_FROM GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_PYTHON2 USE_PYTHON3
+ .ALLOWED=DYNAMIC_DEPS
+
+ SET(PEERDIR_TAGS DLL_LIB __EMPTY__)
+
+ _BARE_MODULE()
+ DYNAMIC_LINK=yes
+ MODULE_SUFFIX=.pkg.fake
+ PEERDIR+=build/platform/local_so
+
RESTRICT_PATH(contrib devtools/dummy_arcadia MSG Use of this module type outside contrib/libs is prohibited)
# disable credits generation for static library
SET(CREDITS_FLAGS)
- }
-}
-
+ }
+}
+
### @usage: GLOBAL_SRCS(filenames...)
###
-### Make all source files listed as GLOBAL.
+### Make all source files listed as GLOBAL.
### Call to GLOBAL_SRCS macro is equivalent to call to SRCS macro when each source file is marked with GLOBAL keyword.
### Arcadia root relative or project dir relative paths are supported for filenames arguments. GLOBAL keyword is not
### recognized for GLOBAL_SRCS in contrast to SRCS macro.
###
### @example:
### Consider the file to ya.make:
-###
+###
### LIBRARY()
-### GLOBAL_SRCS(foo.cpp bar.cpp)
+### GLOBAL_SRCS(foo.cpp bar.cpp)
### END()
-###
-### @see: [SRCS()](#macro_SRCS)
+###
+### @see: [SRCS()](#macro_SRCS)
macro GLOBAL_SRCS(Files...) {
SRCS(${pre=GLOBAL :Files})
}
### @usage: ALL_SRCS([GLOBAL] filenames...)
###
-### Make all source files listed as GLOBAL or not depending on the keyword GLOBAL
+### Make all source files listed as GLOBAL or not depending on the keyword GLOBAL
### Call to ALL_SRCS macro is equivalent to call to GLOBAL_SRCS macro when GLOBAL keyword is specified
### as the first argument and is equivalent to call to SRCS macro otherwise.
###
### @example:
-###
+###
### LIBRARY()
-### SET(MAKE_IT_GLOBAL GLOBAL)
-### ALL_SRCS(${MAKE_IT_GLOBAL} foo.cpp bar.cpp)
+### SET(MAKE_IT_GLOBAL GLOBAL)
+### ALL_SRCS(${MAKE_IT_GLOBAL} foo.cpp bar.cpp)
### END()
-###
-### @see: [GLOBAL_SRCS()](#macro_GLOBAL_SRCS), [SRCS()](#macro_SRCS)
+###
+### @see: [GLOBAL_SRCS()](#macro_GLOBAL_SRCS), [SRCS()](#macro_SRCS)
macro ALL_SRCS(GLOBAL?"GLOBAL":"", Files...) {
SRCS(${pre=$GLOBAL :Files})
}
-### @usage: _DLL_COMPATIBLE_LIBRARY # internal
-###
-### Base module to place DLLs into multimodules back to back with libraries.
-### In order to function properly all modules in multimodule shall have the
+### @usage: _DLL_COMPATIBLE_LIBRARY # internal
+###
+### Base module to place DLLs into multimodules back to back with libraries.
+### In order to function properly all modules in multimodule shall have the
### same set of arguments. So this module is just library that accepts but
-### ignores all DLL arguments.
+### ignores all DLL arguments.
module _DLL_COMPATIBLE_LIBRARY: LIBRARY {
}
@@ -2983,12 +2983,12 @@ module _DLL_COMPATIBLE_LIBRARY: LIBRARY {
PACKED_PACKAGE_ARGS=
PACKED_PACKAGE_EXT=
### @usage: PACK(archive_type)
-###
-### When placed inside the PACKAGE module, packs the build results tree to the archive with specified extension. Currently supported extensions are `tar` and `tar.gz`
-###
-### Is not allowed other module types than PACKAGE().
-###
-### @see: [PACKAGE()](#module_PACKAGE)
+###
+### When placed inside the PACKAGE module, packs the build results tree to the archive with specified extension. Currently supported extensions are `tar` and `tar.gz`
+###
+### Is not allowed other module types than PACKAGE().
+###
+### @see: [PACKAGE()](#module_PACKAGE)
macro PACK(Ext) {
SET(PACKED_PACKAGE_EXT $Ext)
}
@@ -2999,104 +2999,104 @@ macro PACKAGE_STRICT() {
}
### @usage: PACKAGE(name)
-###
+###
### Module collects what is described directly inside it, builds and collects all its transitively available PEERDIRs.
### As a result, build directory of the project gets the structure of the accessible part of Arcadia, where the build result of each PEERDIR is placed to relevant Arcadia subpath.
-### The data can be optionally packed if macro PACK() is used.
-###
-### Is only used together with the macros FILES(), PEERDIR(), COPY(), FROM_SANDBOX(), RUN_PROGRAM or BUNDLE(). Don't use SRCS inside a PACKAGE.
+### The data can be optionally packed if macro PACK() is used.
###
-### Documentation: https://wiki.yandex-team.ru/yatool/large-data/
+### Is only used together with the macros FILES(), PEERDIR(), COPY(), FROM_SANDBOX(), RUN_PROGRAM or BUNDLE(). Don't use SRCS inside a PACKAGE.
###
-### @see: [PACK()](#macro_PACK)
-module PACKAGE: _BASE_UNIT {
+### Documentation: https://wiki.yandex-team.ru/yatool/large-data/
+###
+### @see: [PACK()](#macro_PACK)
+module PACKAGE: _BASE_UNIT {
.CMD=TOUCH_PACKAGE_MF
.PEERDIR_POLICY=as_build_from
.ALL_INS_TO_OUT=yes
- .FINAL_TARGET=yes
- .ALLOWED=PACK
+ .FINAL_TARGET=yes
+ .ALLOWED=PACK
SET(MODULE_SUFFIX .pkg.fake)
- SET(DONT_RESOLVE_INCLUDES yes)
+ SET(DONT_RESOLVE_INCLUDES yes)
NO_PLATFORM()
when ($PACKED_PACKAGE_EXT) {
- PACKED_PACKAGE_ARGS+=--dest-arch ${output;pre=$MODULE_PREFIX;suf=.$PACKED_PACKAGE_EXT:REALPRJNAME}
+ PACKED_PACKAGE_ARGS+=--dest-arch ${output;pre=$MODULE_PREFIX;suf=.$PACKED_PACKAGE_EXT:REALPRJNAME}
}
SET(NEED_PLATFORM_PEERDIRS no)
- PEERDIR_TAGS=CPP_PROTO CPP_FBS PY2 PY2_NATIVE YQL_UDF_SHARED __EMPTY__ DOCBOOK JAR_RUNNABLE PY3_BIN PY3TEST_PROGRAM DLL
-}
-
-TOUCH_GROUP=$TOUCH_PACKAGE ${kv;hide:"p CI"}
-
-### @usage: CI_GROUP()
-###
-### Module collects what is described directly inside it transitively by PEERDIRs.
-### No particular layout of built artifacts is implied. This module is needed primarilly for CI dependency analysis and may not trigger builds at all.
-###
-### Is only used together with the macro PEERDIR() and FILES(). Don't use SRCS inside CI_GROUP().
-module CI_GROUP: _BARE_UNIT {
- .CMD=TOUCH_GROUP
- .PEERDIR_POLICY=as_build_from
- .ALL_INS_TO_OUT=yes
- .FINAL_TARGET=yes
- .RESTRICTED=SRCS
+ PEERDIR_TAGS=CPP_PROTO CPP_FBS PY2 PY2_NATIVE YQL_UDF_SHARED __EMPTY__ DOCBOOK JAR_RUNNABLE PY3_BIN PY3TEST_PROGRAM DLL
+}
+
+TOUCH_GROUP=$TOUCH_PACKAGE ${kv;hide:"p CI"}
+
+### @usage: CI_GROUP()
+###
+### Module collects what is described directly inside it transitively by PEERDIRs.
+### No particular layout of built artifacts is implied. This module is needed primarilly for CI dependency analysis and may not trigger builds at all.
+###
+### Is only used together with the macro PEERDIR() and FILES(). Don't use SRCS inside CI_GROUP().
+module CI_GROUP: _BARE_UNIT {
+ .CMD=TOUCH_GROUP
+ .PEERDIR_POLICY=as_build_from
+ .ALL_INS_TO_OUT=yes
+ .FINAL_TARGET=yes
+ .RESTRICTED=SRCS
MODULE_SUFFIX=.ci.pkg.fake
- PEERDIR_TAGS=CPP_PROTO PY3 PY3_NATIVE YQL_UDF_SHARED __EMPTY__ DOCBOOK JAR_RUNNABLE DLL
-}
-
+ PEERDIR_TAGS=CPP_PROTO PY3 PY3_NATIVE YQL_UDF_SHARED __EMPTY__ DOCBOOK JAR_RUNNABLE DLL
+}
+
TOUCH_UNIT_MF=$TOUCH_UNIT && $GENERATE_MF
TOUCH_DOCS=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"p DC"} ${kv;hide:"pc light-cyan"} $TARGET
TOUCH_DOCS_MF=$TOUCH_DOCS && $GENERATE_MF
# tag:proto
-### @usage: RESOLVE_PROTO()
-###
-### Enable include resolving within UNIONs and let system .proto being resolved
-### among .proto/.gztproto imports
-###
-### Note: it is currently impossible to enbale resolving only for .proto, so resolving is enabled for all supported files
+### @usage: RESOLVE_PROTO()
+###
+### Enable include resolving within UNIONs and let system .proto being resolved
+### among .proto/.gztproto imports
+###
+### Note: it is currently impossible to enbale resolving only for .proto, so resolving is enabled for all supported files
### also we only add ADDINCL for stock protobuf. So use this macro with care: it may cause resolving problems those are
-### to be addressed by either ADDINCLs or marking them as TEXT. Please contact devtools for details.
-macro RESOLVE_PROTO() {
- SET(DONT_RESOLVE_INCLUDES no)
- ADDINCL(FOR proto $PROTOBUF_PATH)
-}
-
+### to be addressed by either ADDINCLs or marking them as TEXT. Please contact devtools for details.
+macro RESOLVE_PROTO() {
+ SET(DONT_RESOLVE_INCLUDES no)
+ ADDINCL(FOR proto $PROTOBUF_PATH)
+}
+
### @usage: UNION(name)
###
-### Collection of PEERDIR dependencies, files and artifacts.
-### UNION doesn't build its peers, just provides those to modules depending on it.
-### When specied in DEPENDS() macro the UNION is transitively closed, building all its peers and providing those by own paths (without adding this module path like PACKAGE does).
+### Collection of PEERDIR dependencies, files and artifacts.
+### UNION doesn't build its peers, just provides those to modules depending on it.
+### When specied in DEPENDS() macro the UNION is transitively closed, building all its peers and providing those by own paths (without adding this module path like PACKAGE does).
###
-### Is only used together with the macros like FILES(), PEERDIR(), COPY(), FROM_SANDBOX(), RUN_PROGRAM or BUNDLE(). Don't use SRCS inside a UNION.
-###
-### Documentation: https://wiki.yandex-team.ru/yatool/large-data/
-module UNION: _BASE_UNIT {
+### Is only used together with the macros like FILES(), PEERDIR(), COPY(), FROM_SANDBOX(), RUN_PROGRAM or BUNDLE(). Don't use SRCS inside a UNION.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/large-data/
+module UNION: _BASE_UNIT {
.ALL_INS_TO_OUT=yes
- .FINAL_TARGET=no
+ .FINAL_TARGET=no
NO_PLATFORM()
SET(MODULE_SUFFIX .pkg.fake)
- SET(DONT_RESOLVE_INCLUDES yes)
+ SET(DONT_RESOLVE_INCLUDES yes)
.CMD=TOUCH_UNIT_MF
SET(NEED_PLATFORM_PEERDIRS no)
- PEERDIR_TAGS=CPP_PROTO CPP_FBS PY2 PY2_NATIVE YQL_UDF_SHARED __EMPTY__ DOCBOOK JAR_RUNABLE PY3_BIN DLL
+ PEERDIR_TAGS=CPP_PROTO CPP_FBS PY2 PY2_NATIVE YQL_UDF_SHARED __EMPTY__ DOCBOOK JAR_RUNABLE PY3_BIN DLL
}
# tag:python-specific
module _PY_PACKAGE: UNION {
.EXTS=.py
.ALL_INS_TO_OUT=yes
- .ALLOWED=GRPC USE_SKIFF
+ .ALLOWED=GRPC USE_SKIFF
ENABLE(PY_PROTOS_FOR)
SET(PEERDIR_TAGS PY_PROTO)
- SET(DONT_RESOLVE_INCLUDES no)
+ SET(DONT_RESOLVE_INCLUDES no)
}
-
+
# tag:python-specific tag:deprecated tag:internal
-### @usage: PY_PACKAGE(name) # internal, deprecated
-###
-### This is module created via PY_PROTOS_FOR() macro
+### @usage: PY_PACKAGE(name) # internal, deprecated
+###
+### This is module created via PY_PROTOS_FOR() macro
module PY_PACKAGE: _PY_PACKAGE {
- .FINAL_TARGET=yes
+ .FINAL_TARGET=yes
}
# tag:internal
@@ -3123,7 +3123,7 @@ _DOCS_EXTRA_TOOLS=
_DOCS_EXTRA_INPUTS=
_DOCS_ENV=
_DOCS_KV=${kv;hide:"p DO"} ${kv;hide:"pc light-cyan"} ${kv;hide:"show_out yes"}
-
+
_DOCS_PLANTUML_ENV=\
${env:"JAVA_PATH=$JDK_RESOURCE_GLOBAL/bin/java"} \
${env:"PLANTUML_PATH=${ARCADIA_BUILD_ROOT}/contrib/tools/plantuml/plantuml.run.cp.jar"} \
@@ -3157,8 +3157,8 @@ $_DOCS_COMMON_CMDLINE_PREFIX \
# tag:internal tag:docs
macro _DOCS_YFM_BOOK_IMPL(CONFIG, INCLUDE_SRCS[], EXTRA_INPUTS[]) {
.CMD=$_DOCS_YFM_BOOK_CMDLINIE
-}
-
+}
+
_DOCS_YFM_CMD=$_DOCS_YFM_BOOK_IMPL($_DOCS_CONFIG_VALUE INCLUDE_SRCS $_DOCS_INCLUDE_SOURCES_VALUE EXTRA_INPUTS $_DOCS_EXTRA_INPUTS)
_DOCS_MKDOCS_CMDLINE_SUFFIX=
@@ -3205,12 +3205,12 @@ module _DOCS_BASE_UNIT: _BARE_UNIT {
_DOCS_DEFAULT_CONFIG=$_DOCS_MKDOCS_DEFAULT_CONFIG
_DOCS_COMMON_BOOK_PROCESS_DEPS=$_DOCS_MKDOCS_BOOK_PROCESS_DEPS
}
- }
-}
-
+ }
+}
+
# tag:internal tag:docs
### _DOCS_EPILOOGUE() # internal
-###
+###
### This macro executes macros which should be envoked after all user
### specified macros in the ya.make file
macro _DOCS_EPILOGUE() {
@@ -3218,8 +3218,8 @@ macro _DOCS_EPILOGUE() {
_LATE_GLOB(_DOCS_SRCS_GLOB ${pre=${ARCADIA_ROOT}/;suf=/**/*:_DOCS_DIR_VALUE})
SET(_DOCS_SRCS_VALUE \${input;hide:_DOCS_SRCS_GLOB})
-}
-
+}
+
# tag:internal tag:docs
### _DOCS_YFM_USE_PLANTUML() # internal
###
@@ -3238,12 +3238,12 @@ macro _DOCS_YFM_USE_PLANTUML() {
# tag:docs
### @usage: DOCS()
-###
-### Documentation project multimodule.
-###
-### When built directly, via RECURSE, DEPENDS or BUNDLE the output artifact is docs.tar.gz with statically generated site (using mkdocs as builder).
-### When PEERDIRed from other DOCS() module behaves like a UNION (supplying own content and dependencies to build target).
-### Peerdirs from modules other than DOCS are not accepted.
+###
+### Documentation project multimodule.
+###
+### When built directly, via RECURSE, DEPENDS or BUNDLE the output artifact is docs.tar.gz with statically generated site (using mkdocs as builder).
+### When PEERDIRed from other DOCS() module behaves like a UNION (supplying own content and dependencies to build target).
+### Peerdirs from modules other than DOCS are not accepted.
### Most usual macros are not accepted, only used with the macros DOCS_DIR(), DOCS_CONFIG(), DOCS_VARS(), DOCS_BUILDER().
###
### @see: [DOCS_DIR()](#macro_DOCS_DIR), [DOCS_CONFIG()](#macro_DOCS_CONFIG), [DOCS_VARS()](#macro_DOCS_VARS), [DOCS_BUILDER()](#macro_DOCS_BUILDER).
@@ -3310,12 +3310,12 @@ macro DOCS_BUILDER(DocsTool) {
}
# tag:docs
-### @usage: DOCS_DIR(path)
-###
-### Specify directory with source .md files for DOCS multimodule if it differs from project directory.
+### @usage: DOCS_DIR(path)
+###
+### Specify directory with source .md files for DOCS multimodule if it differs from project directory.
### Path must be Arcadia root relative.
-###
-### @see: [DOCS](#multimodule_DOCS)
+###
+### @see: [DOCS](#multimodule_DOCS)
macro DOCS_DIR(Dir) {
SET(_DOCS_DIR_VALUE $Dir)
}
@@ -3323,26 +3323,26 @@ macro DOCS_DIR(Dir) {
# tag:docs
_DOCS_DEFAULT_CONFIG=
_DOCS_CONFIG_VALUE=$_DOCS_DEFAULT_CONFIG
-### @usage: DOCS_CONFIG(path)
-###
+### @usage: DOCS_CONFIG(path)
+###
### Specify path to config file for DOCS multimodule if it differs from default path.
### If [DOCS_BUILDER()](#macro_DOCS_BUILDER) is set to "mkdocs" the default path is "%%project_directory%%/mkdocs.yml".
### If [DOCS_BUILDER()](#macro_DOCS_BUILDER) is not set or set to "yfm" the default path is "%%project_directory%%/.yfm".
### Path must be either Arcadia root relative.
-###
-### @see: [DOCS](#multimodule_DOCS)
+###
+### @see: [DOCS](#multimodule_DOCS)
macro DOCS_CONFIG(File) {
SET(_DOCS_CONFIG_VALUE $File)
}
# tag:docs
_DOCS_VARS_VALUE=
-### @usage: DOCS_VARS(variable1=value1 variable2=value2 ...)
-###
-### Specify a set of default values of template variables for DOCS multimodule.
+### @usage: DOCS_VARS(variable1=value1 variable2=value2 ...)
+###
+### Specify a set of default values of template variables for DOCS multimodule.
### There must be no spaces around "=". Values will be treated as strings.
-###
-### @see: [DOCS](#multimodule_DOCS)
+###
+### @see: [DOCS](#multimodule_DOCS)
macro DOCS_VARS(Args...) {
SET_APPEND(_DOCS_VARS_VALUE $Args)
}
@@ -3361,12 +3361,12 @@ macro DOCS_INCLUDE_SOURCES(Args...) {
# tag:python-specific
PY_NAMESPACE_VALUE=
-
+
# tag:python-specific
-### @usage: PY_NAMESPACE(prefix)
-###
-### Sets default Python namespace for all python sources in the module.
-### Especially suitable in PROTO_LIBRARY where Python sources are generated and there is no PY_SRCS to place NAMESPACE parameter.
+### @usage: PY_NAMESPACE(prefix)
+###
+### Sets default Python namespace for all python sources in the module.
+### Especially suitable in PROTO_LIBRARY where Python sources are generated and there is no PY_SRCS to place NAMESPACE parameter.
macro PY_NAMESPACE(Arg) {
SET(PY_NAMESPACE_VALUE $Arg)
}
@@ -3382,39 +3382,39 @@ macro _SRCS_NO_GLOBAL(GLOBAL[], FILES...) {
}
# tag:java-specific
-JAVA_VCS_MF_ARG=
+JAVA_VCS_MF_ARG=
COMPILE_JAVA_MF=$COMPILE_JAVA
# tag:java-specific
-when ($EXT_JAVA_VCS_INFO == "yes") {
- JAVA_VCS_MF_ARG=--vcs-mf $VCS_JAVA
+when ($EXT_JAVA_VCS_INFO == "yes") {
+ JAVA_VCS_MF_ARG=--vcs-mf $VCS_JAVA
COMPILE_JAVA_MF=$GENERATE_VCS_JAVA_INFO_NODEP && $COMPILE_JAVA
}
-
+
# tag:java-specific
-EXT_JAVA_VCS_INFO=no
-### @usage: EMBED_JAVA_VCS_INFO()
-###
-### Embed manifest with vcs info into `EXTERNAL_JAVA_LIBRARY`
-### By default this is disabled.
-macro EMBED_JAVA_VCS_INFO() {
- ENABLE(EXT_JAVA_VCS_INFO)
-}
-
+EXT_JAVA_VCS_INFO=no
+### @usage: EMBED_JAVA_VCS_INFO()
+###
+### Embed manifest with vcs info into `EXTERNAL_JAVA_LIBRARY`
+### By default this is disabled.
+macro EMBED_JAVA_VCS_INFO() {
+ ENABLE(EXT_JAVA_VCS_INFO)
+}
+
# tag:java-specific tag:internal
-### @usage: EXTERNAL_JAVA_LIBRARY() #internal
-###
-### EXTERNAL_JAVA_LIBRARY() is a module for creating a .jar file using non-Java code (generators etc.)
+### @usage: EXTERNAL_JAVA_LIBRARY() #internal
+###
+### EXTERNAL_JAVA_LIBRARY() is a module for creating a .jar file using non-Java code (generators etc.)
### Unlike regular JAVA_LIBRARY this module doesn't produce .pom file, so it cannot be exported to Maven itself.
-### PEERDIR it from JAVA_LIBRARY or JAVA_PROGRAM for export to Maven.
-module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT {
+### PEERDIR it from JAVA_LIBRARY or JAVA_PROGRAM for export to Maven.
+module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT {
.EXTS=.jsrc .java .jar .mf
.NODE_TYPE=Bundle
.CMD=COMPILE_JAVA_MF
.PEERDIR_POLICY=as_build_from
- .FINAL_TARGET=no
+ .FINAL_TARGET=no
.ALIASES=SRCS=_SRCS_NO_GLOBAL
- .ALLOWED=EMBED_JAVA_VCS_INFO
+ .ALLOWED=EMBED_JAVA_VCS_INFO
.RESTRICTED=EXTERNAL_JAR
PEERDIR(build/platform/java/jdk)
@@ -3423,8 +3423,8 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT {
PEERDIR_TAGS=JAVA_PROTO JAVA_FBS JAVA_IDL
PROPAGATES_MANAGEABLE_PEERS=yes
DYNAMIC_LINK=yes
- MACRO_ALIAS(PROTO_CMD _JAVA_PROTO_CMD)
- MACRO_ALIAS(EVLOG_CMD _JAVA_EVLOG_CMD)
+ MACRO_ALIAS(PROTO_CMD _JAVA_PROTO_CMD)
+ MACRO_ALIAS(EVLOG_CMD _JAVA_EVLOG_CMD)
MACRO_ALIAS(FBS_CMD _JAVA_FLATC_CMD)
when ($PACKAGE_PREFIX) {
@@ -3481,11 +3481,11 @@ when($JDK_VERSION == "8") {
}
# tag:java-specific
-macro _DO_2_RUN_JAR_PROGRAM(IN_DIRS_VAR="uniq_", IN_DIRS_INPUTS[], IN{input}[], IN_DIR[], OUT_NOAUTO{output}[], OUT{output}[], TOOL{tool}[], OUT_DIR[], CLASSPATH[], REQUIREMENTS[], ADD_SRCS_TO_CLASSPATH?"yes":"no", CWD="${ARCADIA_BUILD_ROOT}", Args...) {
+macro _DO_2_RUN_JAR_PROGRAM(IN_DIRS_VAR="uniq_", IN_DIRS_INPUTS[], IN{input}[], IN_DIR[], OUT_NOAUTO{output}[], OUT{output}[], TOOL{tool}[], OUT_DIR[], CLASSPATH[], REQUIREMENTS[], ADD_SRCS_TO_CLASSPATH?"yes":"no", CWD="${ARCADIA_BUILD_ROOT}", Args...) {
_LATE_GLOB(${IN_DIRS_VAR} ${suf=/**/*:IN_DIR})
_CHECK_RUN_JAVA_PROG_CLASSPATH($CLASSPATH)
.PEERDIR=build/platform/java/jdk $JDK_RESOURCE_PEERDIR
- .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/mkdir.py"} ${OUT_DIR} && ${cwd:CWD} $YMAKE_PYTHON ${input:"build/scripts/setup_java_tmpdir.py"} $YMAKE_PYTHON ${input:"build/scripts/stdout2stderr.py"} $YMAKE_PYTHON ${input:"build/scripts/fix_java_command_file_cp.py"} --build-root ${ARCADIA_BUILD_ROOT} $JDK_RESOURCE/bin/java -Dfile.encoding=utf8 -classpath ${RUN_JAR_PROG_CP_PRE}${tool:CLASSPATH}${RUN_JAR_PROG_CP_SUF} ${Args} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} && $_GENTAR_HELPER($CLASSPATH $IN_DIR $IN $TOOL $Args OUT_DIR $OUT_DIR) ${input;hide:IN} ${output;noauto;hide:OUT_NOAUTO} ${output;hide:OUT} ${tool;hide:TOOL} ${IN_DIRS_INPUTS}
+ .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/mkdir.py"} ${OUT_DIR} && ${cwd:CWD} $YMAKE_PYTHON ${input:"build/scripts/setup_java_tmpdir.py"} $YMAKE_PYTHON ${input:"build/scripts/stdout2stderr.py"} $YMAKE_PYTHON ${input:"build/scripts/fix_java_command_file_cp.py"} --build-root ${ARCADIA_BUILD_ROOT} $JDK_RESOURCE/bin/java -Dfile.encoding=utf8 -classpath ${RUN_JAR_PROG_CP_PRE}${tool:CLASSPATH}${RUN_JAR_PROG_CP_SUF} ${Args} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} && $_GENTAR_HELPER($CLASSPATH $IN_DIR $IN $TOOL $Args OUT_DIR $OUT_DIR) ${input;hide:IN} ${output;noauto;hide:OUT_NOAUTO} ${output;hide:OUT} ${tool;hide:TOOL} ${IN_DIRS_INPUTS}
}
# tag:java-specific
@@ -3516,11 +3516,11 @@ macro _JAR_ANN_PROC_OPTS(Classes...) {
# tag:java-specific
macro _NOOP_MACRO(Args...) {
- ENABLE(UNUSED_MACRO)
+ ENABLE(UNUSED_MACRO)
}
# tag:java-specific
-module _JAR_BASE: _BARE_UNIT {
+module _JAR_BASE: _BARE_UNIT {
.NODE_TYPE=Bundle
.CMD=TOUCH_UNIT
.PEERDIR_POLICY=as_build_from
@@ -3711,7 +3711,7 @@ LINK_JAR=$PREPARE_JAVA_BUILD_DIRS \
$_PACK_JNI \
&& $PACK_JAR \
$_DO_JAVA_YNDEXING \
- ${requirements;hide:JAVA_REQUIREMENTS} \
+ ${requirements;hide:JAVA_REQUIREMENTS} \
${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} \
$_MAKE_JSTYLE_FILE_LIST \
$_LINK_UBERJAR \
@@ -4018,21 +4018,21 @@ multimodule JTEST_YMAKE {
# tag:python-specific tag:deprecated
### @usage: PY2_LIBRARY() # deprecated
-###
+###
### Deprecated. Use PY23_LIBRARY or PY3_LIBRARY instead.
### Python 2.x binary built library. Builds sources from PY_SRCS to data suitable for PY2_PROGRAM.
-### Adds dependencies to Python 2.x runtime library from Arcadia.
-### This module is only compatible with PYTHON2-tagged modules and selects those from multimodules.
-### This module is only compatible with Arcadia Python build.
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+### Adds dependencies to Python 2.x runtime library from Arcadia.
+### This module is only compatible with PYTHON2-tagged modules and selects those from multimodules.
+### This module is only compatible with Arcadia Python build.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
module PY2_LIBRARY: _LIBRARY {
- .ALIASES=REQUIREMENTS=PY_REQUIREMENTS
- _ARCADIA_PYTHON_ADDINCL()
-
- when ($NO_PYTHON_INCLS != "yes") {
- PEERDIR+=contrib/libs/python
- }
+ .ALIASES=REQUIREMENTS=PY_REQUIREMENTS
+ _ARCADIA_PYTHON_ADDINCL()
+
+ when ($NO_PYTHON_INCLS != "yes") {
+ PEERDIR+=contrib/libs/python
+ }
when ($MSVC == "yes" || $CYGWIN == "yes") {
MODULE_PREFIX=py
}
@@ -4043,25 +4043,25 @@ module PY2_LIBRARY: _LIBRARY {
.IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_PYTHON2
.RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
USE_GLOBAL_CMD=yes
-
- when ($PY_PROTO_MYPY_ENABLED == "yes") {
- PY_PROTO_MYPY_SUFFIX=_pb2.pyi
- PY_PROTO_MYPY_PLUGIN=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=_pb2.pyi:File}
- PY_PROTO_MYPY_PLUGIN_INTERNAL=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=__int___pb2.pyi:File} ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___pb2.pyi:File} ${nopath;noext;suf=_pb2.pyi:File}"})
- }
+
+ when ($PY_PROTO_MYPY_ENABLED == "yes") {
+ PY_PROTO_MYPY_SUFFIX=_pb2.pyi
+ PY_PROTO_MYPY_PLUGIN=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=_pb2.pyi:File}
+ PY_PROTO_MYPY_PLUGIN_INTERNAL=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=__int___pb2.pyi:File} ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___pb2.pyi:File} ${nopath;noext;suf=_pb2.pyi:File}"})
+ }
SET(MODULE_LANG PY2)
}
-
-### @usage: _PY3_LIBRARY()
-###
-### Basic Python3 library module
-module _PY3_LIBRARY: _LIBRARY {
- _ARCADIA_PYTHON3_ADDINCL()
-
- when ($NO_PYTHON_INCLS != "yes") {
- PEERDIR+=contrib/libs/python
- }
+
+### @usage: _PY3_LIBRARY()
+###
+### Basic Python3 library module
+module _PY3_LIBRARY: _LIBRARY {
+ _ARCADIA_PYTHON3_ADDINCL()
+
+ when ($NO_PYTHON_INCLS != "yes") {
+ PEERDIR+=contrib/libs/python
+ }
when ($MSVC == "yes" || $CYGWIN == "yes") {
MODULE_PREFIX=py
}
@@ -4072,53 +4072,53 @@ module _PY3_LIBRARY: _LIBRARY {
.IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
.RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL USE_PYTHON2 OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
USE_GLOBAL_CMD=yes
-
+
PEERDIR($YMAKE_PYTHON3_PEER)
RUN_CYTHON_SCRIPT=$YMAKE_PYTHON3 $CYTHON_SCRIPT
- when ($PY_PROTO_MYPY_ENABLED == "yes") {
- PY_PROTO_MYPY_SUFFIX=_pb2.pyi
- PY_PROTO_MYPY_PLUGIN=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=_pb2.pyi:File}
- PY_PROTO_MYPY_PLUGIN_INTERNAL=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=__int___pb2.pyi:File} ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___pb2.pyi:File} ${nopath;noext;suf=_pb2.pyi:File}"})
- }
+ when ($PY_PROTO_MYPY_ENABLED == "yes") {
+ PY_PROTO_MYPY_SUFFIX=_pb2.pyi
+ PY_PROTO_MYPY_PLUGIN=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=_pb2.pyi:File}
+ PY_PROTO_MYPY_PLUGIN_INTERNAL=$PY_PROTO_MYPY_PLUGIN_BASE ${output;hide;noauto;norel;nopath;noext;suf=__int___pb2.pyi:File} ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___pb2.pyi:File} ${nopath;noext;suf=_pb2.pyi:File}"})
+ }
SET(MODULE_LANG PY3)
}
# tag:python-specific
-### @usage: PY3_LIBRARY()
-###
-### Python 3.x binary library. Builds sources from PY_SRCS to data suitable for PY2_PROGRAM
-### Adds dependencies to Python 2.x runtime library from Arcadia.
-### This module is only compatible with PYTHON3-tagged modules and selects those from multimodules.
-### This module is only compatible with Arcadia Python build.
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
-module PY3_LIBRARY: _PY3_LIBRARY {
- .ALIASES=REQUIREMENTS=PY_REQUIREMENTS
-}
-
-
-# tag:python-specific
-### @usage: _BASE_PY_PROGRAM #internal
-###
+### @usage: PY3_LIBRARY()
+###
+### Python 3.x binary library. Builds sources from PY_SRCS to data suitable for PY2_PROGRAM
+### Adds dependencies to Python 2.x runtime library from Arcadia.
+### This module is only compatible with PYTHON3-tagged modules and selects those from multimodules.
+### This module is only compatible with Arcadia Python build.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module PY3_LIBRARY: _PY3_LIBRARY {
+ .ALIASES=REQUIREMENTS=PY_REQUIREMENTS
+}
+
+
+# tag:python-specific
+### @usage: _BASE_PY_PROGRAM #internal
+###
### The base module for all Python 2.x binary programs. Adds linking logic, relevant module properties and
-### dependency on Python 2.x interpreter. Also adds import tests on all sources including PEERDIR'ed libraries.
-### Links all Python 2.x libraries and Python 2.x interpreter into itself to form regular executable.
-### This only compatible with PYTHON2-tagged modules and selects those from multimodules.
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
-module _BASE_PY_PROGRAM: _BASE_PROGRAM {
+### dependency on Python 2.x interpreter. Also adds import tests on all sources including PEERDIR'ed libraries.
+### Links all Python 2.x libraries and Python 2.x interpreter into itself to form regular executable.
+### This only compatible with PYTHON2-tagged modules and selects those from multimodules.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module _BASE_PY_PROGRAM: _BASE_PROGRAM {
.CMD=PY_PROGRAM_LINK_EXE
- _ARCADIA_PYTHON_ADDINCL()
+ _ARCADIA_PYTHON_ADDINCL()
when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
NO_CHECK_IMPORTS_FOR_VALUE=
}
ADD_CHECK_PY_IMPORTS()
- when ($NO_PYTHON_INCLS != "yes") {
+ when ($NO_PYTHON_INCLS != "yes") {
PEERDIR += contrib/libs/python
- }
+ }
when ($USE_ARCADIA_PYTHON == "yes") {
PEERDIR += library/python/runtime/main
PEERDIR += contrib/python/subprocess32
@@ -4160,17 +4160,17 @@ otherwise {
# tag:python-specific
-### @usage: _BASE_PY_PROGRAM #internal
-###
+### @usage: _BASE_PY_PROGRAM #internal
+###
### The base module for all Python 3.x binary programs. Adds linking logic, relevant module properties and
-### dependency on Python 3.x interpreter. Also adds import tests on all sources including libraries.
-### Links all Python 3.x libraries and Python 3.x interpreter into itself to form regular executable.
-### This only compatible with PYTHON3-tagged modules and selects those from multimodules
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
-module _BASE_PY3_PROGRAM: _BASE_PROGRAM {
+### dependency on Python 3.x interpreter. Also adds import tests on all sources including libraries.
+### Links all Python 3.x libraries and Python 3.x interpreter into itself to form regular executable.
+### This only compatible with PYTHON3-tagged modules and selects those from multimodules
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/
+module _BASE_PY3_PROGRAM: _BASE_PROGRAM {
.CMD=PY3_PROGRAM_LINK_EXE
- _ARCADIA_PYTHON3_ADDINCL()
+ _ARCADIA_PYTHON3_ADDINCL()
PEERDIR(library/python/runtime_py3/main)
when ($PYTHON_SQLITE3 != "no") {
PEERDIR += contrib/tools/python3/src/Modules/_sqlite
@@ -4190,9 +4190,9 @@ module _BASE_PY3_PROGRAM: _BASE_PROGRAM {
ALLOCATOR($_MY_ALLOCATOR)
STRIP()
- when ($NO_PYTHON_INCLS != "yes") {
- PEERDIR+=contrib/libs/python
- }
+ when ($NO_PYTHON_INCLS != "yes") {
+ PEERDIR+=contrib/libs/python
+ }
when ($BUILD_TYPE == "DEBUG") {
NO_STRIP=yes
}
@@ -4202,10 +4202,10 @@ module _BASE_PY3_PROGRAM: _BASE_PROGRAM {
when ($PYTHON_COVERAGE == "yes") {
PEERDIR+=library/python/coverage
}
- when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") {
- PEERDIR += contrib/python/six
- }
- .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
+ when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") {
+ PEERDIR += contrib/python/six
+ }
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
.RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL USE_PYTHON2
SET(MODULE_LANG PY3)
}
@@ -4215,10 +4215,10 @@ module _BASE_PY3_PROGRAM: _BASE_PROGRAM {
### Use instead of PY3_PROGRAM only if ya.make with PY3_PROGRAM() included in another ya.make
### In all other cases use PY3_PROGRAM
module PY3_PROGRAM_BIN: _BASE_PY3_PROGRAM {
- .ALIASES=REQUIREMENTS=PY_REQUIREMENTS
- # Look's like we cannot avoid copy-paste util ymake supports multiple inheritance
- # We need to attach coverage.extractor to every py_program target, except pytest targets
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor)
+ .ALIASES=REQUIREMENTS=PY_REQUIREMENTS
+ # Look's like we cannot avoid copy-paste util ymake supports multiple inheritance
+ # We need to attach coverage.extractor to every py_program target, except pytest targets
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor)
}
# tag:java-specific
@@ -4324,7 +4324,7 @@ otherwise {
JDK_RESOURCE=$JDK8_RESOURCE_GLOBAL
}
}
-
+
# tag:java-specific
when (!$USE_SYSTEM_ERROR_PRONE) {
when ($JDK_VERSION == "8" || $JDK_VERSION == "10") {
@@ -4418,60 +4418,60 @@ when ($JDK_VERSION == "8") {
}
# tag:java-specific
-COMPILE_JAVA=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/compile_java.py"} --javac-bin $JDK_RESOURCE/bin/javac --jar-bin $JDK_RESOURCE/bin/jar $JAVA_VCS_MF_ARG $PACKAGE_PREFIX_ARGS --jar-output $TARGET --srcs-jar-output ${output;suf=-sources.jar:REALPRJNAME} $AUTO_INPUT DELIM $JAVAC_OPTS DELIM $PEERS ${requirements;hide:JAVA_REQUIREMENTS} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} ${kv;hide:"PEERS $PEERS"}
+COMPILE_JAVA=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/compile_java.py"} --javac-bin $JDK_RESOURCE/bin/javac --jar-bin $JDK_RESOURCE/bin/jar $JAVA_VCS_MF_ARG $PACKAGE_PREFIX_ARGS --jar-output $TARGET --srcs-jar-output ${output;suf=-sources.jar:REALPRJNAME} $AUTO_INPUT DELIM $JAVAC_OPTS DELIM $PEERS ${requirements;hide:JAVA_REQUIREMENTS} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} ${kv;hide:"PEERS $PEERS"}
REAL_SWIG_DLL_JAR_CMD=$GENERATE_VCS_JAVA_INFO_NODEP && ${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/build_dll_and_java.py"} $JAVA_SWIG_DELIM $REAL_LINK_DYN_LIB $JAVA_SWIG_DELIM $COMPILE_JAVA $JAVA_SWIG_DELIM $AUTO_INPUT $JAVA_SWIG_DELIM $TARGET $JAVA_SWIG_DELIM ${output;suf=.jar:REALPRJNAME} $JAVA_SWIG_DELIM ${output;suf=-sources.jar:REALPRJNAME} $JAVA_SWIG_DELIM $ARCADIA_BUILD_ROOT $ARCADIA_ROOT
# tag:deprecated
-### @usage: METAQUERY() #deprecated
-###
+### @usage: METAQUERY() #deprecated
+###
### Project Definition - KIWI Meta query. (Objected)
-###
+###
### https://wiki.yandex-team.ru/robot/manual/kiwi/techdoc/design/metaquery/
-module METAQUERY: _BASE_UNIT {
+module METAQUERY: _BASE_UNIT {
.ALL_INS_TO_OUT=yes
- .FINAL_TARGET=yes
- PRINT_MODULE_TYPE(METAQUERY $MODULE_PREFIX$REALPRJNAME)
+ .FINAL_TARGET=yes
+ PRINT_MODULE_TYPE(METAQUERY $MODULE_PREFIX$REALPRJNAME)
}
ARGS_DELIM="MACRO_CALLS_DELIM"
SYSTEM_PROPERTIES_VALUE=
-### @usage: SYSTEM_PROPERTIES([<Key Value>...] [<File Path>...])
-###
-### List of Key,Value pairs that will be available to test via System.getProperty().
-### FILE means that parst should be read from file specifies as Path.
-###
-### Documentation: https://wiki.yandex-team.ru/yatool/test/
+### @usage: SYSTEM_PROPERTIES([<Key Value>...] [<File Path>...])
+###
+### List of Key,Value pairs that will be available to test via System.getProperty().
+### FILE means that parst should be read from file specifies as Path.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/
macro SYSTEM_PROPERTIES(Args...) {
SET_APPEND(SYSTEM_PROPERTIES_VALUE $Args)
}
# tag:java-specific
JVM_ARGS_VALUE=
-### @usage: JVM_ARGS(Args...)
-###
-### Arguments to run Java programs in tests.
-###
-### Documentation: https://wiki.yandex-team.ru/yatool/test/
+### @usage: JVM_ARGS(Args...)
+###
+### Arguments to run Java programs in tests.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/
macro JVM_ARGS(Args...) {
SET_APPEND(JVM_ARGS_VALUE $Args)
}
# tag:java-specific
CHECK_JAVA_DEPS_VALUE=
-### @usage: CHECK_JAVA_DEPS(<yes|no>)
-###
-### Check for different classes with duplicate name in classpath.
-###
-### Documentation: https://wiki.yandex-team.ru/yatool/test/
+### @usage: CHECK_JAVA_DEPS(<yes|no>)
+###
+### Check for different classes with duplicate name in classpath.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/test/
macro CHECK_JAVA_DEPS(Arg) {
SET(CHECK_JAVA_DEPS_VALUE $Arg)
}
ERROR_PRONE_VALUE=
-### @usage: USE_ERROR_PRONE()
-###
-### Use errorprone instead of javac for .java compilation.
+### @usage: USE_ERROR_PRONE()
+###
+### Use errorprone instead of javac for .java compilation.
macro USE_ERROR_PRONE() {
SET(ERROR_PRONE_VALUE yes)
}
@@ -4479,34 +4479,34 @@ macro USE_ERROR_PRONE() {
TEST_CWD_VALUE=
### @usage: TEST_CWD(path)
###
-### Defines working directory for test runs. Othen used in conjunction with DATA() macro.
-### Is only used inside of the TEST modules.
+### Defines working directory for test runs. Othen used in conjunction with DATA() macro.
+### Is only used inside of the TEST modules.
###
-### Documentation: https://wiki.yandex-team.ru/yatool/test/
+### Documentation: https://wiki.yandex-team.ru/yatool/test/
macro TEST_CWD(Arg) {
SET(TEST_CWD_VALUE $Arg)
}
# tag:java-specific
MAKE_UBERJAR_VALUE=
-### @usage: UBERJAR()
-###
+### @usage: UBERJAR()
+###
### UBERJAR is a single all-in-one jar-archive that includes all its Java dependencies (reachable PEERDIR).
-### It also supports shading classes inside the archive by moving them to a different package (similar to the maven-shade-plugin).
-### Use UBERJAR inside JAVA_PROGRAM module.
-###
-### You can use the following macros to configure the archive:
-### 1. UBERJAR_HIDING_PREFIX prefix for classes to shade (classes remain in their packages by default)
+### It also supports shading classes inside the archive by moving them to a different package (similar to the maven-shade-plugin).
+### Use UBERJAR inside JAVA_PROGRAM module.
+###
+### You can use the following macros to configure the archive:
+### 1. UBERJAR_HIDING_PREFIX prefix for classes to shade (classes remain in their packages by default)
### 2. UBERJAR_HIDE_EXCLUDE_PATTERN exclude classes matching this patterns from shading (if enabled).
-### 3. UBERJAR_PATH_EXCLUDE_PREFIX the prefix for classes that should not get into the jar archive (all classes are placed into the archive by default)
+### 3. UBERJAR_PATH_EXCLUDE_PREFIX the prefix for classes that should not get into the jar archive (all classes are placed into the archive by default)
### 4. UBERJAR_MANIFEST_TRANSFORMER_MAIN add ManifestResourceTransformer class to uberjar processing and specify main-class
### 5. UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE add ManifestResourceTransformer class to uberjar processing and specify some attribute
### 6. UBERJAR_APPENDING_TRANSFORMER add AppendingTransformer class to uberjar processing
### 7. UBERJAR_SERVICES_RESOURCE_TRANSFORMER add ServicesResourceTransformer class to uberjar processing
-###
-### Documentation: https://wiki.yandex-team.ru/yatool/java/
-###
-### @see: [JAVA_PROGRAM](#module_JAVA_PROGRAM), [UBERJAR_HIDING_PREFIX](#macro_UBERJAR_HIDING_PREFIX), [UBERJAR_HIDE_EXCLUDE_PATTERN](#macro_UBERJAR_HIDE_EXCLUDE_PATTERN), [UBERJAR_PATH_EXCLUDE_PREFIX](#macro_UBERJAR_PATH_EXCLUDE_PREFIX)
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
+###
+### @see: [JAVA_PROGRAM](#module_JAVA_PROGRAM), [UBERJAR_HIDING_PREFIX](#macro_UBERJAR_HIDING_PREFIX), [UBERJAR_HIDE_EXCLUDE_PATTERN](#macro_UBERJAR_HIDE_EXCLUDE_PATTERN), [UBERJAR_PATH_EXCLUDE_PREFIX](#macro_UBERJAR_PATH_EXCLUDE_PREFIX)
macro UBERJAR() {
SET(MAKE_UBERJAR_VALUE yes)
}
@@ -4514,12 +4514,12 @@ macro UBERJAR() {
# tag:java-specific
UBERJAR_PREFIX_VALUE=
UBERJAR_PREFIX_FLAG=
-### @usage: UBERJAR_HIDING_PREFIX(Arg)
-###
-### Set prefix for classes to shade. All classes in UBERJAR will be moved into package prefixed with Arg.
-### Classes remain in their packages by default.
-###
-### @see: [UBERJAR](#macro_UBERJAR)
+### @usage: UBERJAR_HIDING_PREFIX(Arg)
+###
+### Set prefix for classes to shade. All classes in UBERJAR will be moved into package prefixed with Arg.
+### Classes remain in their packages by default.
+###
+### @see: [UBERJAR](#macro_UBERJAR)
macro UBERJAR_HIDING_PREFIX(Arg) {
SET(UBERJAR_PREFIX_VALUE $Arg)
SET(UBERJAR_PREFIX_FLAG ${pre=--shade-prefix :Arg})
@@ -4528,13 +4528,13 @@ macro UBERJAR_HIDING_PREFIX(Arg) {
# tag:java-specific
UBERJAR_HIDE_EXCLUDE_VALUE=
UBERJAR_HIDE_EXCLUDE_FLAGS=
-### @usage: UBERJAR_HIDE_EXCLUDE_PATTERN(Args...)
-###
-### Exculude classes matching this patterns from shading (if enabled).
-### Pattern may contain '*' and '**' globs.
-### Shading is enabled for UBERJAR program using UBERJAR_HIDING_PREFIX macro. If this macro is not specified all classes are shaded.
-###
-### @see: [UBERJAR](#macro_UBERJAR), [UBERJAR_HIDING_PREFIX](#macro_UBERJAR_HIDING_PREFIX)
+### @usage: UBERJAR_HIDE_EXCLUDE_PATTERN(Args...)
+###
+### Exculude classes matching this patterns from shading (if enabled).
+### Pattern may contain '*' and '**' globs.
+### Shading is enabled for UBERJAR program using UBERJAR_HIDING_PREFIX macro. If this macro is not specified all classes are shaded.
+###
+### @see: [UBERJAR](#macro_UBERJAR), [UBERJAR_HIDING_PREFIX](#macro_UBERJAR_HIDING_PREFIX)
macro UBERJAR_HIDE_EXCLUDE_PATTERN(Args...) {
SET_APPEND(UBERJAR_HIDE_EXCLUDE_VALUE $ARGS_DELIM $Args)
SET_APPEND(UBERJAR_HIDE_EXCLUDE_FLAGS ${pre=--shade-exclude :Args})
@@ -4543,12 +4543,12 @@ macro UBERJAR_HIDE_EXCLUDE_PATTERN(Args...) {
# tag:java-specific
UBERJAR_PATH_EXCLUDES=
UBERJAR_PATH_EXCLUDE_VALUE=
-### @usage: UBERJAR_PATH_EXCLUDE_PREFIX(Args...)
-###
-### Exculude classes matching this patterns from UBERJAR.
-### By default all dependencies of UBERJAR program will lend in a .jar archive.
-###
-### @see: [UBERJAR](#macro_UBERJAR)
+### @usage: UBERJAR_PATH_EXCLUDE_PREFIX(Args...)
+###
+### Exculude classes matching this patterns from UBERJAR.
+### By default all dependencies of UBERJAR program will lend in a .jar archive.
+###
+### @see: [UBERJAR](#macro_UBERJAR)
macro UBERJAR_PATH_EXCLUDE_PREFIX(Args...) {
SET_APPEND(UBERJAR_PATH_EXCLUDE_VALUE $ARGS_DELIM $Args)
SET_APPEND(UBERJAR_PATH_EXCLUDES ${pre=--uber-exclude :Args})
@@ -4611,20 +4611,20 @@ macro UBERJAR_SERVICES_RESOURCE_TRANSFORMER() {
# tag:idea-specific
IDEA_EXCLUDE_DIRS_VALUE=
-### @usage: IDEA_EXCLUDE_DIRS(<excluded dirs>)
-###
-### Exclude specified directories from an idea project generated by ya ide idea
-### Have no effect on regular build.
+### @usage: IDEA_EXCLUDE_DIRS(<excluded dirs>)
+###
+### Exclude specified directories from an idea project generated by ya ide idea
+### Have no effect on regular build.
macro IDEA_EXCLUDE_DIRS(Args...) {
SET_APPEND(IDEA_EXCLUDE_DIRS_VALUE $Args)
}
# tag:idea-specific
IDEA_RESOURCE_DIRS_VALUE=
-### @usage: IDEA_RESOURCE_DIRS(<additional dirs>)
-###
-### Set specified resource directories in an idea project generated by ya ide idea
-### Have no effect on regular build.
+### @usage: IDEA_RESOURCE_DIRS(<additional dirs>)
+###
+### Set specified resource directories in an idea project generated by ya ide idea
+### Have no effect on regular build.
macro IDEA_RESOURCE_DIRS(Args...) {
SET_APPEND(IDEA_RESOURCE_DIRS_VALUE $Args)
}
@@ -4641,9 +4641,9 @@ macro IDEA_MODULE_NAME(Name) {
# tag:java-specific
JAVAC_FLAGS_VALUE=
-### @usage: JAVAC_FLAGS(Args...)
-###
-### Set additional Java compilation flags.
+### @usage: JAVAC_FLAGS(Args...)
+###
+### Set additional Java compilation flags.
macro JAVAC_FLAGS(Args...) {
SET_APPEND(JAVAC_OPTS $Args)
SET_APPEND(JAVAC_FLAGS_VALUE $ARGS_DELIM $Args)
@@ -4674,9 +4674,9 @@ when ($SAVE_JAVAC_GENERATED_SRCS) {
# tag:java-specific
MAVEN_GROUP_ID_VALUE=
### @usage: MAVEN_GROUP_ID(group_id_for_maven_export)
-###
-### Set maven export group id for JAVA_PROGRAM() and JAVA_LIBRARY().
-### Have no effect on regular build.
+###
+### Set maven export group id for JAVA_PROGRAM() and JAVA_LIBRARY().
+### Have no effect on regular build.
macro MAVEN_GROUP_ID(Arg) {
SET(MAVEN_GROUP_ID_VALUE $Arg)
}
@@ -4684,16 +4684,16 @@ macro MAVEN_GROUP_ID(Arg) {
# tag:java-specific
ANNOTATION_PROCESSOR_VALUE=
### @usage: ANNOTATION_PROCESSOR(processors...)
-###
+###
### The macro is in development.
-### Used to specify annotation processors to build JAVA_PROGRAM() and JAVA_LIBRARY().
+### Used to specify annotation processors to build JAVA_PROGRAM() and JAVA_LIBRARY().
macro ANNOTATION_PROCESSOR(Args...) {
SET_APPEND(ANNOTATION_PROCESSOR_VALUE $ARGS_DELIM $Args)
}
EXCLUDE_VALUE=
### EXCLUDE(prefixes)
-###
+###
### The macro is in development.
### Specifies which libraries should be excluded from the classpath.
macro EXCLUDE(Args...) {
@@ -4703,28 +4703,28 @@ macro EXCLUDE(Args...) {
# tag:java-specific
JAVA_SRCS_VALUE=
### @usage: JAVA_SRCS(srcs)
-###
-### Specify java source files and resources. A macro can be contained in any of four java modules.
+###
+### Specify java source files and resources. A macro can be contained in any of four java modules.
### Keywords:
-### 1. X SRCDIR - specify the directory x is performed relatively to search the source code for these patterns. If there is no SRCDIR, the source will be searched relative to the module directory.
-### 2. PACKAGE_PREFIX x - use if source paths relative to the SRCDIR does not coincide with the full class names. For example, if all sources of module are in the same package, you can create a directory package/name , and just put the source code in the SRCDIR and specify PACKAGE_PREFIX package.name.
+### 1. X SRCDIR - specify the directory x is performed relatively to search the source code for these patterns. If there is no SRCDIR, the source will be searched relative to the module directory.
+### 2. PACKAGE_PREFIX x - use if source paths relative to the SRCDIR does not coincide with the full class names. For example, if all sources of module are in the same package, you can create a directory package/name , and just put the source code in the SRCDIR and specify PACKAGE_PREFIX package.name.
###
### @example:
### - example/ya.make
-###
-### JAVA_PROGRAM()
-### JAVA_SRCS(SRCDIR src/main/java **/*)
-### END()
-###
+###
+### JAVA_PROGRAM()
+### JAVA_SRCS(SRCDIR src/main/java **/*)
+### END()
+###
### - example/src/main/java/ru/yandex/example/HelloWorld.java
-###
-### package ru.yandex.example;
-### public class HelloWorld {
-### public static void main(String[] args) {
-### System.out.println("Hello, World!");
-### }
-### }
-###
+###
+### package ru.yandex.example;
+### public class HelloWorld {
+### public static void main(String[] args) {
+### System.out.println("Hello, World!");
+### }
+### }
+###
### Documentation: https://wiki.yandex-team.ru/yatool/java/#javasrcs
macro JAVA_SRCS(Args...) {
SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM $Args)
@@ -4755,21 +4755,21 @@ TEST_CLASSPATH_MANAGED=
DEPENDENCY_MANAGEMENT_VALUE=
### @usage: DEPENDENCY_MANAGEMENT(path/to/lib1 path/to/lib2 ...)
###
-### Lock version of the library from the contrib/java at some point, so that all unversioned PEERDIRs to this library refer to the specified version.
-###
-### For example, if the moduse has PEERDIR (contrib/java/junit/junit), and
-### 1. specifies DEPENDENCY_MANAGEMENT(contrib/java/junit/junit/4.12),
-### the PEERDIR is automatically replaced by contrib/java/junit/junit/4.12;
-### 2. doesn't specify DEPENDENCY_MANAGEMENT, PEERDIR automatically replaced
+### Lock version of the library from the contrib/java at some point, so that all unversioned PEERDIRs to this library refer to the specified version.
+###
+### For example, if the moduse has PEERDIR (contrib/java/junit/junit), and
+### 1. specifies DEPENDENCY_MANAGEMENT(contrib/java/junit/junit/4.12),
+### the PEERDIR is automatically replaced by contrib/java/junit/junit/4.12;
+### 2. doesn't specify DEPENDENCY_MANAGEMENT, PEERDIR automatically replaced
### with the default from contrib/java/junit/junit/ya.make.
-### These defaults are always there and are supported by maven-import, which puts
-### there the maximum version available in contrib/java.
+### These defaults are always there and are supported by maven-import, which puts
+### there the maximum version available in contrib/java.
###
-### The property is transitive. That is, if module A PEERDIRs module B, and B has PEERDIR(contrib/java/junit/junit), and this junit was replaced by junit-4.12, then junit-4.12 will come to A through B.
+### The property is transitive. That is, if module A PEERDIRs module B, and B has PEERDIR(contrib/java/junit/junit), and this junit was replaced by junit-4.12, then junit-4.12 will come to A through B.
###
-### If some module has both DEPENDENCY_MANAGEMENT(contrib/java/junit/junit/4.12) and PERDIR(contrib/java/junit/junit/4.11), the PEERDIR wins.
-###
-### Documentation: https://wiki.yandex-team.ru/yatool/java/
+### If some module has both DEPENDENCY_MANAGEMENT(contrib/java/junit/junit/4.12) and PERDIR(contrib/java/junit/junit/4.11), the PEERDIR wins.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
macro DEPENDENCY_MANAGEMENT(Args...) {
SET_APPEND(DEPENDENCY_MANAGEMENT_VALUE $ARGS_DELIM $Args)
_GHOST_PEERDIR($Args)
@@ -4855,11 +4855,11 @@ macro JAVA_EXTERNAL_DEPENDENCIES(Args...) {
}
# tag:java-specific
-### @usage _JAVA_PLACEHOLDER #internal
+### @usage _JAVA_PLACEHOLDER #internal
### The base module for all Java modules. Defines common properties and dependencies.
-module _JAVA_PLACEHOLDER: _BASE_UNIT {
+module _JAVA_PLACEHOLDER: _BASE_UNIT {
.CMD=TOUCH_JAVA_UNIT
- .FINAL_TARGET=yes
+ .FINAL_TARGET=yes
.ALLOWED=DEPENDENCY_MANAGEMENT EXCLUDE
.ALIASES=RUN_JAVA_PROGRAM=_RUN_JBUILD_PROGRAM
HAS_MANAGEABLE_PEERS=yes
@@ -4891,7 +4891,7 @@ module _JAVA_PLACEHOLDER: _BASE_UNIT {
when($WITH_GROOVY_VALUE) {
PEERDIR+=build/platform/java/groovy contrib/java/org/codehaus/groovy/groovy/${GROOVY_VERSION}
}
-
+
when($ERROR_PRONE_VALUE && $JDK_VERSION == "16") {
JAVAC_FLAGS_VALUE+=$ERROR_PRONE_JDK16_ADD_OPENS
}
@@ -4980,20 +4980,20 @@ macro JAR_EXCLUDE(Filters...) {
}
# tag:sandbox-specific
-### @usage: SANDBOX_TASK([Name])
-###
-### Multimodule describing Sandbox task (Python code that can be executed by Sandbox system).
-###
+### @usage: SANDBOX_TASK([Name])
+###
+### Multimodule describing Sandbox task (Python code that can be executed by Sandbox system).
+###
### When being a final target, this multimodule builds Sandbox binary task. It may PEERDIR other SANDBOX_TASKs as libraries.
### The final artifact is provided when SANDBOX_TASK is referred to by DEPENDS and BUNDLE macros.
### As PEERDIR target, it works like regular PY2_LIBRARY with predefined dependencies on Sandbox SDK to allow code reuse among SANDBOX_TASKs.
-###
+###
### Currently Sandbox supports only Python 2.x, so both variants will be compatible only with Python 2.x modules
### and will select multimodule variants accordingly.
-###
-### Documentation: https://wiki.yandex-team.ru/sandbox/tasks/binary
+###
+### Documentation: https://wiki.yandex-team.ru/sandbox/tasks/binary
multimodule SANDBOX_TASK {
- module SB_TASK_BIN: _PY2_PROGRAM {
+ module SB_TASK_BIN: _PY2_PROGRAM {
PY_MAIN(sandbox.taskbox.binary)
PEERDIR(sandbox/bin sandbox/sdk2 sandbox/sandboxsdk sandbox/taskbox/worker)
SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE api.*)
@@ -5001,13 +5001,13 @@ multimodule SANDBOX_TASK {
SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE library.*)
SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE sky*)
REGISTER_SANDBOX_IMPORT(${MODDIR})
- when ($FAIL_PY2 == "yes") {
- _OK=no
- }
- otherwise {
- PEERDIR+=build/rules/py2_deprecation
- }
-
+ when ($FAIL_PY2 == "yes") {
+ _OK=no
+ }
+ otherwise {
+ PEERDIR+=build/rules/py2_deprecation
+ }
+
ASSERT(_OK You are using deprecated Python2-only code (SANDBOX_TASK). Please consider rewriting to 2/3-compatible code.)
}
module PY2: PY2_LIBRARY {
@@ -5018,7 +5018,7 @@ multimodule SANDBOX_TASK {
# tag:sandbox-specific
multimodule SANDBOX_PY23_TASK {
- module SB_TASK_BIN: _PY2_PROGRAM {
+ module SB_TASK_BIN: _PY2_PROGRAM {
PY_MAIN(sandbox.taskbox.binary)
PEERDIR(sandbox/bin sandbox/sdk2 sandbox/sandboxsdk sandbox/taskbox/worker)
SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE api.*)
@@ -5077,50 +5077,50 @@ multimodule SANDBOX_PY3_TASK {
}
# tag:python-specific tag:internal
-NO_PYTHON_INCLS=no
-### @usage: NO_PYTHON_INCLUDES() # internal
-###
-### Disable dependencies on libraries providing Python headers.
-### This is only used in Python libraries themselves to avoid PEERDIR loops.
-macro NO_PYTHON_INCLUDES() {
- ENABLE(NO_PYTHON_INCLS)
-}
-
+NO_PYTHON_INCLS=no
+### @usage: NO_PYTHON_INCLUDES() # internal
+###
+### Disable dependencies on libraries providing Python headers.
+### This is only used in Python libraries themselves to avoid PEERDIR loops.
+macro NO_PYTHON_INCLUDES() {
+ ENABLE(NO_PYTHON_INCLS)
+}
+
# tag:python-specific
### @usage: PYTHON2_ADDINCL()
-###
-### This macro adds include path for Python headers (Python 2.x variant) without PEERDIR.
-### This should be used in 2 cases only:
+###
+### This macro adds include path for Python headers (Python 2.x variant) without PEERDIR.
+### This should be used in 2 cases only:
### - In PY2MODULE since it compiles into .so and uses external Python runtime;
-### - In system Python libraries themselves since proper PEERDIR there may create a loop;
+### - In system Python libraries themselves since proper PEERDIR there may create a loop;
### In all other cases use USE_PYTHON2 macro instead.
-###
+###
### Never use this macro in PY2_PROGRAM, PY2_LIBRARY and PY23_LIBRARY: they have everything needed by default.
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs
macro PYTHON2_ADDINCL() {
- _PYTHON_ADDINCL()
- SET(MODULE_TAG PY2_NATIVE)
- SET(PEERDIR_TAGS CPP_PROTO CPP_FBS PY2_NATIVE YQL_UDF_STATIC __EMPTY__ DLL_LIB)
-}
-
+ _PYTHON_ADDINCL()
+ SET(MODULE_TAG PY2_NATIVE)
+ SET(PEERDIR_TAGS CPP_PROTO CPP_FBS PY2_NATIVE YQL_UDF_STATIC __EMPTY__ DLL_LIB)
+}
+
# tag:python-specific tag:internal
-### @usage: _ARCADIA_PYTHON_ADDINCL() # internal
+### @usage: _ARCADIA_PYTHON_ADDINCL() # internal
### This macro sets up Python headers for modules with Arcadia python (e.g. PY2_LIBRARY) and configures module as Python 2.x.
-macro _ARCADIA_PYTHON_ADDINCL() {
- _PYTHON_ADDINCL()
- SET(MODULE_TAG PY2)
- SET(PEERDIR_TAGS PY2 PY2_NATIVE PY_PROTO PY2_FBS YQL_UDF_STATIC __EMPTY__ DLL_LIB)
-}
-
+macro _ARCADIA_PYTHON_ADDINCL() {
+ _PYTHON_ADDINCL()
+ SET(MODULE_TAG PY2)
+ SET(PEERDIR_TAGS PY2 PY2_NATIVE PY_PROTO PY2_FBS YQL_UDF_STATIC __EMPTY__ DLL_LIB)
+}
+
# tag:python-specific tag:internal
-### @usage: _PYTHON_ADDINCL() # internal
-### This macro sets up Python 2.x headers for both Arcadia and non-Arcadia python.
-macro _PYTHON_ADDINCL() {
- SET(PYTHON2 yes)
- SET(PYTHON3 no)
+### @usage: _PYTHON_ADDINCL() # internal
+### This macro sets up Python 2.x headers for both Arcadia and non-Arcadia python.
+macro _PYTHON_ADDINCL() {
+ SET(PYTHON2 yes)
+ SET(PYTHON3 no)
when ($USE_ARCADIA_PYTHON == "yes") {
- ADDINCL+=GLOBAL contrib/libs/python/Include
+ ADDINCL+=GLOBAL contrib/libs/python/Include
CFLAGS+=-DARCADIA_PYTHON_UNICODE_SIZE=$ARCADIA_PYTHON_UNICODE_SIZE
}
otherwise {
@@ -5134,91 +5134,91 @@ macro _PYTHON_ADDINCL() {
}
# tag:python-specific
-### @usage: PYTHON3_ADDINCL()
-###
-### This macro adds include path for Python headers (Python 3.x variant).
-### This should be used in 2 cases only:
+### @usage: PYTHON3_ADDINCL()
+###
+### This macro adds include path for Python headers (Python 3.x variant).
+### This should be used in 2 cases only:
### - In PY2MODULE since it compiles into .so and uses external Python runtime;
-### - In system Python libraries themselves since peerdir there may create a loop;
-### In all other cases use USE_PYTHON3() macro instead.
-###
-### Never use this macro in PY3_PROGRAM and PY3_LIBRARY and PY23_LIBRARY: they have everything by default.
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs
-macro PYTHON3_ADDINCL() {
- _PYTHON3_ADDINCL()
- SET(MODULE_TAG PY3_NATIVE)
- SET(PEERDIR_TAGS CPP_PROTO CPP_FBS PY3_NATIVE YQL_UDF_STATIC __EMPTY__ DLL_LIB)
-}
-
+### - In system Python libraries themselves since peerdir there may create a loop;
+### In all other cases use USE_PYTHON3() macro instead.
+###
+### Never use this macro in PY3_PROGRAM and PY3_LIBRARY and PY23_LIBRARY: they have everything by default.
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs
+macro PYTHON3_ADDINCL() {
+ _PYTHON3_ADDINCL()
+ SET(MODULE_TAG PY3_NATIVE)
+ SET(PEERDIR_TAGS CPP_PROTO CPP_FBS PY3_NATIVE YQL_UDF_STATIC __EMPTY__ DLL_LIB)
+}
+
# tag:python-specific tag:internal
-### @usage: _ARCADIA_PYTHON3_ADDINCL() # internal
-###
-### This macro sets up Python3 headers for modules with Arcadia python (e.g. PY3_LIBRARY) and configures module as Python 3.x.
-macro _ARCADIA_PYTHON3_ADDINCL() {
- _PYTHON3_ADDINCL()
- SET(MODULE_TAG PY3)
+### @usage: _ARCADIA_PYTHON3_ADDINCL() # internal
+###
+### This macro sets up Python3 headers for modules with Arcadia python (e.g. PY3_LIBRARY) and configures module as Python 3.x.
+macro _ARCADIA_PYTHON3_ADDINCL() {
+ _PYTHON3_ADDINCL()
+ SET(MODULE_TAG PY3)
SET(MODULE_LANG PY3)
- SET(PEERDIR_TAGS PY3 PY3_BIN_LIB PY3TEST_LIBRARY PY3_NATIVE PY3_PROTO PY3_FBS PY3_SSQLS YQL_UDF_STATIC __EMPTY__ DLL_LIB)
-}
-
+ SET(PEERDIR_TAGS PY3 PY3_BIN_LIB PY3TEST_LIBRARY PY3_NATIVE PY3_PROTO PY3_FBS PY3_SSQLS YQL_UDF_STATIC __EMPTY__ DLL_LIB)
+}
+
# tag:python-specific tag:internal
-### @usage: _PYTHON_ADDINCL() # internal
-###
-### This macro sets up Python 3.x headers for both Arcadia and non-Arcadia python.
-macro _PYTHON3_ADDINCL() {
- SET(PYTHON3 yes)
- SET(PYTHON2 no)
+### @usage: _PYTHON_ADDINCL() # internal
+###
+### This macro sets up Python 3.x headers for both Arcadia and non-Arcadia python.
+macro _PYTHON3_ADDINCL() {
+ SET(PYTHON3 yes)
+ SET(PYTHON2 no)
when ($USE_ARCADIA_PYTHON == "yes") {
- CFLAGS+=-DUSE_PYTHON3
- ADDINCL+=GLOBAL contrib/libs/python/Include
+ CFLAGS+=-DUSE_PYTHON3
+ ADDINCL+=GLOBAL contrib/libs/python/Include
}
otherwise {
- when ($USE_SYSTEM_PYTHON) {
+ when ($USE_SYSTEM_PYTHON) {
PEERDIR+=build/platform/python
- }
- otherwise {
- CFLAGS+=$PYTHON_INCLUDE
- }
+ }
+ otherwise {
+ CFLAGS+=$PYTHON_INCLUDE
+ }
}
}
# tag:python-specific
### @usage: USE_PYTHON2()
-###
-### This adds Python 2.x runtime library to your LIBRARY and makes it Python2-compatible.
-### Compatibility means proper PEERDIRs, ADDINCLs and variant selection on PEERDIRs to multimodules.
-###
+###
+### This adds Python 2.x runtime library to your LIBRARY and makes it Python2-compatible.
+### Compatibility means proper PEERDIRs, ADDINCLs and variant selection on PEERDIRs to multimodules.
+###
### If you'd like to use #include <Python.h> with Python2 specify USE_PYTHON2 or better make it PY2_LIBRARY.
-### If you'd like to use #include <Python.h> with Python3 specify USE_PYTHON3 or better make it PY3_LIBRARY.
-### If you'd like to use #include <Python.h> with both Python2 and Python3 convert your LIBRARY to PY23_LIBRARY.
-###
+### If you'd like to use #include <Python.h> with Python3 specify USE_PYTHON3 or better make it PY3_LIBRARY.
+### If you'd like to use #include <Python.h> with both Python2 and Python3 convert your LIBRARY to PY23_LIBRARY.
+###
### @see: [PY2_LIBRARY](#module_PY2_LIBRARY), [PY3_LIBRARY](#module_PY3_LIBRARY), [PY23_LIBRARY](#multimodule_PY23_LIBRARY)
macro USE_PYTHON2() {
- _ARCADIA_PYTHON_ADDINCL()
- SET(PEERDIR_TAGS PY2 PY2_NATIVE CPP_PROTO CPP_FBS YQL_UDF_STATIC __EMPTY__ DLL_LIB)
- PEERDIR(contrib/libs/python)
+ _ARCADIA_PYTHON_ADDINCL()
+ SET(PEERDIR_TAGS PY2 PY2_NATIVE CPP_PROTO CPP_FBS YQL_UDF_STATIC __EMPTY__ DLL_LIB)
+ PEERDIR(contrib/libs/python)
}
# tag:python-specific
-### @usage: USE_PYTHON3()
-###
-### This adds Python3 library to your LIBRARY and makes it Python3-compatible.
-### Compatibility means proper PEERDIRs, ADDINCLs and variant selection on PEERDIRs to multimodules.
-###
-### If you'd like to use #include <Python.h> with Python3 specify USE_PYTHON3 or better make it PY3_LIBRARY.
+### @usage: USE_PYTHON3()
+###
+### This adds Python3 library to your LIBRARY and makes it Python3-compatible.
+### Compatibility means proper PEERDIRs, ADDINCLs and variant selection on PEERDIRs to multimodules.
+###
+### If you'd like to use #include <Python.h> with Python3 specify USE_PYTHON3 or better make it PY3_LIBRARY.
### If you'd like to use #include <Python.h> with Python2 specify USE_PYTHON2 or better make it PY2_LIBRARY.
-### If you'd like to use #include <Python.h> with both Python2 and Python3 convert your LIBRARY to PY23_LIBRARY.
-###
+### If you'd like to use #include <Python.h> with both Python2 and Python3 convert your LIBRARY to PY23_LIBRARY.
+###
### @see: [PY2_LIBRARY](#module_PY2_LIBRARY), [PY3_LIBRARY](#module_PY3_LIBRARY), [PY23_LIBRARY](#multimodule_PY23_LIBRARY)
macro USE_PYTHON3() {
- _ARCADIA_PYTHON3_ADDINCL()
- SET(PEERDIR_TAGS PY3 PY3_BIN_LIB PY3TEST_LIBRARY PY3_NATIVE CPP_PROTO CPP_FBS YQL_UDF_STATIC __EMPTY__ DLL_LIB)
- PEERDIR(contrib/libs/python)
+ _ARCADIA_PYTHON3_ADDINCL()
+ SET(PEERDIR_TAGS PY3 PY3_BIN_LIB PY3TEST_LIBRARY PY3_NATIVE CPP_PROTO CPP_FBS YQL_UDF_STATIC __EMPTY__ DLL_LIB)
+ PEERDIR(contrib/libs/python)
- when ($USE_ARCADIA_PYTHON == "yes") {
- PEERDIR+=library/python/runtime_py3
- }
+ when ($USE_ARCADIA_PYTHON == "yes") {
+ PEERDIR+=library/python/runtime_py3
+ }
}
# tag:python-specific
@@ -5229,12 +5229,12 @@ when ($PERL_DEFAULT_PEERDIR == "yes") {
}
# tag:perl-specific
-### @usage: USE_PERL_LIB()
-### Add dependency on Perl to your LIBRARY
+### @usage: USE_PERL_LIB()
+### Add dependency on Perl to your LIBRARY
macro USE_PERL_LIB() {
PEERDIR(build/platform/perl)
}
-
+
# tag:perl-specific
### @usage: USE_PERL_514_LIB()
### Add dependency on Perl 5.14 to your LIBRARY
@@ -5245,19 +5245,19 @@ macro USE_PERL_514_LIB() {
}
# tag:perl-specific
-### @usage: ADD_PERL_MODULE(Dir ModuleName)
-### Add dependency on specified Perl module to the library
-macro ADD_PERL_MODULE(Dir, Module) {
- PEERDIR($Dir)
- SET_APPEND(modules $Module)
-}
-
+### @usage: ADD_PERL_MODULE(Dir ModuleName)
+### Add dependency on specified Perl module to the library
+macro ADD_PERL_MODULE(Dir, Module) {
+ PEERDIR($Dir)
+ SET_APPEND(modules $Module)
+}
+
# tag:allocator
-### @usage: ALLOCATOR(Alloc) # Default: LF
-###
-### Set memory allocator implementation for the PROGRAM()/DLL() module.
-### This may only be specified for programs and dlls, use in other modules leads to configuration errors.
-###
+### @usage: ALLOCATOR(Alloc) # Default: LF
+###
+### Set memory allocator implementation for the PROGRAM()/DLL() module.
+### This may only be specified for programs and dlls, use in other modules leads to configuration errors.
+###
### Available allocators are: "LF", "LF_YT", "LF_DBG", "YT", "J", "B", "BM", "C", "TCMALLOC", "GOOGLE", "LOCKLESS", "SYSTEM", "FAKE", "MIM", "HU".
### - LF - lfalloc (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/lfalloc)
### - LF_YT - Allocator selection for YT (https://a.yandex-team.ru/arc/trunk/arcadia/library/cpp/lfalloc/yt/ya.make)
@@ -5276,7 +5276,7 @@ macro ADD_PERL_MODULE(Dir, Module) {
### - SYSTEM - Use target system allocator
### - FAKE - Don't link with any allocator
###
-### More about allocators in Arcadia: https://wiki.yandex-team.ru/arcadia/allocators/
+### More about allocators in Arcadia: https://wiki.yandex-team.ru/arcadia/allocators/
macro ALLOCATOR(Alloc) {
SET(ALLOCATOR $Alloc)
@@ -5287,47 +5287,47 @@ macro ALLOCATOR(Alloc) {
}
}
-### @usage: CC_REQUIREMENTS([cpu: <value>] [ram: <value>])
-###
-### Override CPU and RAM requirements for all C/C++ compilation commands in the module
-macro CC_REQUIREMENTS(reqs...) {
- # Here we use the fact that quierements ara put into map during rendering, so last value wins
- SET_APPEND(CC_REQUIREMENTS $reqs)
-}
-
-### @usage: LIB_REQUIREMENTS([cpu: <value>] [ram: <value>])
-###
-### Override CPU and RAM requirements for library creation comand of a x_LIBRARY modules
-macro LIB_REQUIREMENTS(reqs...) {
- # Here we use the fact that quierements ara put into map during rendering, so last value wins
- SET_APPEND(LIB_REQUIREMENTS $reqs)
-}
-
-### @usage: LD_REQUIREMENTS([cpu: <value>] [ram: <value>])
-###
-### Override CPU and RAM requirements for link command in the module
-macro LD_REQUIREMENTS(reqs...) {
- # Here we use the fact that quierements ara put into map during rendering, so last value wins
- SET_APPEND(LD_REQUIREMENTS $reqs)
-}
-
-### @usage: JAVA_REQUIREMENTS([cpu: <value>] [ram: <value>])
-###
-### Override CPU and RAM requirements for all C/C++ compilation commands in the module
-macro JAVA_REQUIREMENTS(reqs...) {
- # Here we use the fact that quierements ara put into map during rendering, so last value wins
- SET_APPEND(JAVA_REQUIREMENTS $reqs)
-}
-
-
-### @usage: PY_REQUIREMENTS([cpu: <value>] [ram: <value>])
-###
-### Override CPU and RAM requirements for all Python build commands
-macro PY_REQUIREMENTS(reqs) {
- # Here we use the fact that quierem
- SET_APPEND(PY_REQUIREMENTS $reqs)
-}
-
+### @usage: CC_REQUIREMENTS([cpu: <value>] [ram: <value>])
+###
+### Override CPU and RAM requirements for all C/C++ compilation commands in the module
+macro CC_REQUIREMENTS(reqs...) {
+ # Here we use the fact that quierements ara put into map during rendering, so last value wins
+ SET_APPEND(CC_REQUIREMENTS $reqs)
+}
+
+### @usage: LIB_REQUIREMENTS([cpu: <value>] [ram: <value>])
+###
+### Override CPU and RAM requirements for library creation comand of a x_LIBRARY modules
+macro LIB_REQUIREMENTS(reqs...) {
+ # Here we use the fact that quierements ara put into map during rendering, so last value wins
+ SET_APPEND(LIB_REQUIREMENTS $reqs)
+}
+
+### @usage: LD_REQUIREMENTS([cpu: <value>] [ram: <value>])
+###
+### Override CPU and RAM requirements for link command in the module
+macro LD_REQUIREMENTS(reqs...) {
+ # Here we use the fact that quierements ara put into map during rendering, so last value wins
+ SET_APPEND(LD_REQUIREMENTS $reqs)
+}
+
+### @usage: JAVA_REQUIREMENTS([cpu: <value>] [ram: <value>])
+###
+### Override CPU and RAM requirements for all C/C++ compilation commands in the module
+macro JAVA_REQUIREMENTS(reqs...) {
+ # Here we use the fact that quierements ara put into map during rendering, so last value wins
+ SET_APPEND(JAVA_REQUIREMENTS $reqs)
+}
+
+
+### @usage: PY_REQUIREMENTS([cpu: <value>] [ram: <value>])
+###
+### Override CPU and RAM requirements for all Python build commands
+macro PY_REQUIREMENTS(reqs) {
+ # Here we use the fact that quierem
+ SET_APPEND(PY_REQUIREMENTS $reqs)
+}
+
when ($MIC_ARCH == "yes") {
CFLAGS+=-mmic
LDFLAGS+=-mmic
@@ -5372,9 +5372,9 @@ when ($STRIP_DEBUG_INFO) {
NO_SPLIT_DWARF=no
}
-### @usage: SPLIT_DWARF()
-###
-### Emit debug info for the PROGRAM/DLL as a separate file <module_name>.debug.
+### @usage: SPLIT_DWARF()
+###
+### Emit debug info for the PROGRAM/DLL as a separate file <module_name>.debug.
### NB: It does not help you to save process RSS but can add problems (see e.g. BEGEMOT-2147).
macro SPLIT_DWARF() {
SET(SPLIT_DWARF_VALUE yes)
@@ -5389,26 +5389,26 @@ when ($SPLIT_DWARF_VALUE == "yes" && $NO_SPLIT_DWARF != "yes" && $NO_DEBUGINFO !
BINUTILS_USED=yes
}
-### @usage: EXTRALIBS_STATIC(Libs...)
-###
-### Add the specified external static libraries to the program link
+### @usage: EXTRALIBS_STATIC(Libs...)
+###
+### Add the specified external static libraries to the program link
macro EXTRALIBS_STATIC(Args...) {
LDFLAGS(-Wl,-Bstatic ${Args} -Wl,-Bdynamic)
}
-### @usage ADD_COMPILABLE_TRANSLATE(Dict Name Options...)
-###
-### Generate translation dictionary code to transdict.LOWER(Name).cpp that will than be compiled into library
+### @usage ADD_COMPILABLE_TRANSLATE(Dict Name Options...)
+###
+### Generate translation dictionary code to transdict.LOWER(Name).cpp that will than be compiled into library
macro ADD_COMPILABLE_TRANSLATE(Dict, Name, MakeTransDictOptions...) {
__translatename_lower=${tolower:Name}
__translate_dict=${BINDIR}/transdict.${__translatename_lower}.cpp
RUN_PROGRAM(dict/tools/maketransdict -i ${Dict} ${MakeTransDictOptions} ${Name} STDOUT_NOAUTO ${__translate_dict} IN ${Dict})
}
-### @usage ADD_COMPILABLE_TRANSLIT(TranslitTable NGrams Name Options...)
-###
-### Generate transliteration dictionary code
-### This will emit both translit, untranslit and ngrams table codes those will be than further compiled into library
+### @usage ADD_COMPILABLE_TRANSLIT(TranslitTable NGrams Name Options...)
+###
+### Generate transliteration dictionary code
+### This will emit both translit, untranslit and ngrams table codes those will be than further compiled into library
macro ADD_COMPILABLE_TRANSLIT(TranslitTable, NGrams, Name, Options...) {
__translitname_lower=${tolower:Name}
__translit_table=${BINDIR}/translit_trie_${__translitname_lower}.cpp
@@ -5423,38 +5423,38 @@ macro ADD_COMPILABLE_TRANSLIT(TranslitTable, NGrams, Name, Options...) {
# tag:python-specific tag:proto tag:deprecated
-### @usage GENERATE_PY_PROTOS(ProtoFiles...) # deprecated
+### @usage GENERATE_PY_PROTOS(ProtoFiles...) # deprecated
###
-### Generate python bindings for protobuf files.
-### Macro is obsolete and not recommended for use!
+### Generate python bindings for protobuf files.
+### Macro is obsolete and not recommended for use!
macro GENERATE_PY_PROTOS(FILES...) {
foreach (FILE : $FILES) {
- _PY_PROTO_CMD($FILE)
+ _PY_PROTO_CMD($FILE)
}
}
# tag:python-specific tag:proto
-macro _GENERATE_PY_PROTOS_INTERNAL(FILES...) {
+macro _GENERATE_PY_PROTOS_INTERNAL(FILES...) {
foreach (FILE : $FILES) {
- _PY_PROTO_CMD_INTERNAL($FILE)
+ _PY_PROTO_CMD_INTERNAL($FILE)
}
}
# tag:python-specific
-macro _GENERATE_PY_EVS_INTERNAL(FILES...) {
+macro _GENERATE_PY_EVS_INTERNAL(FILES...) {
foreach (FILE : $FILES) {
- _PY_EVLOG_CMD_INTERNAL($FILE)
+ _PY_EVLOG_CMD_INTERNAL($FILE)
}
}
-macro _COPY_FILE_IMPL(FILE, AUTO_DST="", NOAUTO_DST="", OUTPUT_INCLUDES[], REQUIREMENTS[]) {
- .CMD=$COPY_CMD ${input:FILE} ${output:AUTO_DST} ${output;noauto:NOAUTO_DST} ${output_include;hide:OUTPUT_INCLUDES} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p CP"} ${kv;hide:"pc light-cyan"}
+macro _COPY_FILE_IMPL(FILE, AUTO_DST="", NOAUTO_DST="", OUTPUT_INCLUDES[], REQUIREMENTS[]) {
+ .CMD=$COPY_CMD ${input:FILE} ${output:AUTO_DST} ${output;noauto:NOAUTO_DST} ${output_include;hide:OUTPUT_INCLUDES} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p CP"} ${kv;hide:"pc light-cyan"}
.SEM=copy_file ${input:FILE} ${output:AUTO_DST} ${output;noauto:NOAUTO_DST}
}
### @usage: COPY_FILE(File Destination [AUTO] [OUTPUT_INCLUDES Deps...])
-###
-### Copy file to build root. It is possible to change both location and the name.
+###
+### Copy file to build root. It is possible to change both location and the name.
###
### Parameters:
### - File - Source file name.
@@ -5464,8 +5464,8 @@ macro _COPY_FILE_IMPL(FILE, AUTO_DST="", NOAUTO_DST="", OUTPUT_INCLUDES[], REQUI
###
### The file will be just copied if AUTO boolean parameter is not specified. You should explicitly
### mention it in SRCS under new name (or specify AUTO boolean parameter) for further processing.
-macro COPY_FILE(File, Destination, AUTO?"AUTO_DST":"NOAUTO_DST", OUTPUT_INCLUDES[], REQUIREMENTS[]) {
- .CMD=$_COPY_FILE_IMPL($File $AUTO $Destination OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS)
+macro COPY_FILE(File, Destination, AUTO?"AUTO_DST":"NOAUTO_DST", OUTPUT_INCLUDES[], REQUIREMENTS[]) {
+ .CMD=$_COPY_FILE_IMPL($File $AUTO $Destination OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS)
.SEM=$_COPY_FILE_IMPL($File $AUTO $Destination OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS)
}
@@ -5477,12 +5477,12 @@ macro COPY_FILE_WITH_CONTEXT(FILE, DEST, AUTO?"AUTO":"", OUTPUT_INCLUDES[]) {
.CMD=$COPY_FILE($FILE $DEST $AUTO OUTPUT_INCLUDES $FILE $OUTPUT_INCLUDES)
}
-macro _BUNDLE_TARGET(Target, Destination) {
+macro _BUNDLE_TARGET(Target, Destination) {
.CMD=$MOVE_FILE ${result:Target} ${output;noauto:Destination} ${kv;hide:"p BN"} ${kv;hide:"pc light-cyan"} $VCS_INFO_DISABLE_CACHE__NO_UID__
}
-### @usage: TIMEOUT(TIMEOUT)
-###
+### @usage: TIMEOUT(TIMEOUT)
+###
### Sets a timeout on test execution
###
### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
@@ -5507,7 +5507,7 @@ TEST_PARTITION=SEQUENTIAL
# tag:test
### @usage: FORK_TESTS()
###
-### Splits a test run on chunks by test classes.
+### Splits a test run on chunks by test classes.
### The number of chunks can be overridden using the macro SPLIT_FACTOR.
###
### Allows to run tests in parallel. Supported in UNITTEST, JTEST/JUNIT5 and PY2TEST/PY3TEST modules.
@@ -5535,9 +5535,9 @@ macro FORK_SUBTESTS(MODE...) {
# tag:test
### @usage: SPLIT_FACTOR(x)
###
-### Sets the number of chunks for parallel run tests when used in test module with FORK_TESTS() or FORK_SUBTESTS().
-### If none of those is specified this macro implies FORK_TESTS().
-###
+### Sets the number of chunks for parallel run tests when used in test module with FORK_TESTS() or FORK_SUBTESTS().
+### If none of those is specified this macro implies FORK_TESTS().
+###
### Supports C++ ut and PyTest.
###
### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
@@ -5561,39 +5561,39 @@ macro FORK_TEST_FILES() {
TEST_SIZE_NAME=SMALL
### @usage: SIZE(SMALL/MEDIUM/LARGE)
###
-### Set the 'size' for the test. Each 'size' has own set of resrtictions, SMALL bein the most restricted and LARGE being the list.
-### See documentation on test system for more details.
-###
+### Set the 'size' for the test. Each 'size' has own set of resrtictions, SMALL bein the most restricted and LARGE being the list.
+### See documentation on test system for more details.
+###
### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/
macro SIZE(Type) {
SET(TEST_SIZE_NAME $Type)
}
-### @usage: JOIN_SRCS(Out Src...)
-###
-### Join set of sources into single file named Out and send it for further processing.
-### This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only.
-### You should specify file name with the extension as Out. Futher processing will be done according this extension.
+### @usage: JOIN_SRCS(Out Src...)
+###
+### Join set of sources into single file named Out and send it for further processing.
+### This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only.
+### You should specify file name with the extension as Out. Futher processing will be done according this extension.
macro JOIN_SRCS(Out, Src...) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_join_srcs.py"} ${output:Out} --ya-start-command-file ${input;rootrel:Src} --ya-end-command-file ${output_include;hide:Src} ${kv;hide:"p JS"} ${kv;hide:"pc magenta"}
.SEM=target_joined_source $Out ${input:Src} ${output;hide;suf=.o:Out} && modules_required yandex_common.cmake
_CONDITIONAL_SRCS($TIDY_VALUE $Src)
}
-### @usage: JOIN_SRCS_GLOBAL(Out Src...)
-###
-### Join set of sources into single file named Out and send it for further processing as if it were listed as SRCS(GLOBAL Out).
-### This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only.
+### @usage: JOIN_SRCS_GLOBAL(Out Src...)
+###
+### Join set of sources into single file named Out and send it for further processing as if it were listed as SRCS(GLOBAL Out).
+### This macro doesn't place all file into Out, it emits #include<Src>... Use the for C++ source files only.
### You should specify file name with the extension as Out. Further processing will be done according to this extension.
macro JOIN_SRCS_GLOBAL(Out, Src...) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_join_srcs.py"} ${output;noauto:Out} --ya-start-command-file ${input;rootrel:Src} --ya-end-command-file ${output_include;hide:Src} ${kv;hide:"p JS"} ${kv;hide:"pc magenta"}
SRCS(GLOBAL $Out)
}
-### @usage: FLAT_JOIN_SRCS_GLOBAL(Out Src...)
-###
-### Join set of sources into single file named Out and send it for further processing as if it were listed as SRCS(GLOBAL Out).
-### This macro places all files into single file, so will work with any sources.
+### @usage: FLAT_JOIN_SRCS_GLOBAL(Out Src...)
+###
+### Join set of sources into single file named Out and send it for further processing as if it were listed as SRCS(GLOBAL Out).
+### This macro places all files into single file, so will work with any sources.
### You should specify file name with the extension as Out. Further processing will be done according to this extension.
macro FLAT_JOIN_SRCS_GLOBAL(Out, Src...) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/fs_tools.py"} cat ${output;noauto:Out} --ya-start-command-file ${input:Src} --ya-end-command-file ${output_include;hide:Src} ${kv;hide:"p JS"} ${kv;hide:"pc magenta"}
@@ -5606,20 +5606,20 @@ SSE2_CFLAGS=
SSE3_CFLAGS=
SSSE3_CFLAGS=
SSE41_CFLAGS=
-SSE42_CFLAGS=
-POPCNT_CFLAGS=
-PCLMUL_CFLAGS=
-CX16_FLAGS=
+SSE42_CFLAGS=
+POPCNT_CFLAGS=
+PCLMUL_CFLAGS=
+CX16_FLAGS=
AVX_CFLAGS=
AVX2_CFLAGS=
AVX512_CFLAGS=
-
+
# tag:cpu
-SSE_DEFINES=
-SSE_CFLAGS=
-SSE4_DEFINES=
-SSE4_CFLAGS=
-
+SSE_DEFINES=
+SSE_CFLAGS=
+SSE4_DEFINES=
+SSE4_CFLAGS=
+
# tag:cpu
when (($ARCH_X86_64 || $ARCH_I386) && $DISABLE_INSTRUCTION_SETS != "yes") {
when ($CLANG || $CLANG_CL || $GCC) {
@@ -5628,9 +5628,9 @@ when (($ARCH_X86_64 || $ARCH_I386) && $DISABLE_INSTRUCTION_SETS != "yes") {
SSE3_CFLAGS=-msse3
SSSE3_CFLAGS=-mssse3
SSE41_CFLAGS=-msse4.1
- SSE42_CFLAGS=-msse4.2
- POPCNT_CFLAGS=-mpopcnt
- PCLMUL_CFLAGS=-mpclmul
+ SSE42_CFLAGS=-msse4.2
+ POPCNT_CFLAGS=-mpopcnt
+ PCLMUL_CFLAGS=-mpclmul
AVX_CFLAGS=-mavx
# On Intel FMA3 instruction set comes together with AVX-2 extension starting with Broadwell / Haswell.
@@ -5647,58 +5647,58 @@ when (($ARCH_X86_64 || $ARCH_I386) && $DISABLE_INSTRUCTION_SETS != "yes") {
# See:
# https://en.wikichip.org/wiki/x86/avx-512
AVX512_CFLAGS=-mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl
- when ($ARCH_X86_64 && $OS_ANDROID != "yes") {
- CX16_FLAGS=-mcx16
- }
- SSE_DEFINES=-DSSE_ENABLED=1 -DSSE3_ENABLED=1 -DSSSE3_ENABLED=1
- SSE4_DEFINES=-DSSE41_ENABLED=1 -DSSE42_ENABLED=1 -DPOPCNT_ENABLED=1 -DCX16_ENABLED=1
+ when ($ARCH_X86_64 && $OS_ANDROID != "yes") {
+ CX16_FLAGS=-mcx16
+ }
+ SSE_DEFINES=-DSSE_ENABLED=1 -DSSE3_ENABLED=1 -DSSSE3_ENABLED=1
+ SSE4_DEFINES=-DSSE41_ENABLED=1 -DSSE42_ENABLED=1 -DPOPCNT_ENABLED=1 -DCX16_ENABLED=1
}
elsewhen ($MSVC) {
SSE2_CFLAGS=/D__SSE2__=1
SSE3_CFLAGS=/D__SSE3__=1
SSSE3_CFLAGS=/D__SSSE3__=1
- SSE41_CFLAGS=/D__SSE4_1__=1
- SSE42_CFLAGS=/D__SSE4_2__=1
- POPCNT_CFLAGS=/D__POPCNT__=1
- PCLMUL_CFLAGS=/D__PCLMUL__=1
- AVX_CFLAGS=/arch:AVX /DAVX_ENABLED=1
- AVX2_CFLAGS=/arch:AVX2 /DAVX2_ENABLED=1
+ SSE41_CFLAGS=/D__SSE4_1__=1
+ SSE42_CFLAGS=/D__SSE4_2__=1
+ POPCNT_CFLAGS=/D__POPCNT__=1
+ PCLMUL_CFLAGS=/D__PCLMUL__=1
+ AVX_CFLAGS=/arch:AVX /DAVX_ENABLED=1
+ AVX2_CFLAGS=/arch:AVX2 /DAVX2_ENABLED=1
AVX512_CFLAGS=/arch:AVX512 /DAVX512_ENABLED=1
- SSE_DEFINES=/DSSE_ENABLED=1 /DSSE3_ENABLED=1 /DSSSE3_ENABLED=1
- SSE4_DEFINES=/DSSE41_ENABLED=1 /DSSE42_ENABLED=1 /DPOPCNT_ENABLED=1 /DCX16_ENABLED=1
+ SSE_DEFINES=/DSSE_ENABLED=1 /DSSE3_ENABLED=1 /DSSSE3_ENABLED=1
+ SSE4_DEFINES=/DSSE41_ENABLED=1 /DSSE42_ENABLED=1 /DPOPCNT_ENABLED=1 /DCX16_ENABLED=1
}
- SSE_CFLAGS=$SSE2_CFLAGS $SSE3_CFLAGS $SSSE3_CFLAGS
- SSE4_CFLAGS=$SSE41_CFLAGS $SSE42_CFLAGS $POPCNT_CFLAGS $CX16_FLAGS
- when ($ARCH_I386 && $OS_ANDROID == "yes") {
- USE_SSE4=no
- }
-}
-otherwise {
- USE_SSE4=no
- CPU_CHECK=no
+ SSE_CFLAGS=$SSE2_CFLAGS $SSE3_CFLAGS $SSSE3_CFLAGS
+ SSE4_CFLAGS=$SSE41_CFLAGS $SSE42_CFLAGS $POPCNT_CFLAGS $CX16_FLAGS
+ when ($ARCH_I386 && $OS_ANDROID == "yes") {
+ USE_SSE4=no
+ }
}
+otherwise {
+ USE_SSE4=no
+ CPU_CHECK=no
+}
# tag:cpu
-when ($NOSSE == "yes") {
- USE_SSE4=no
-}
-
+when ($NOSSE == "yes") {
+ USE_SSE4=no
+}
+
# tag:cpu
-### @usage: NO_SSE4()
-###
-### Compile module without SSE4
-macro NO_SSE4() {
- SET(USE_SSE4 no)
-}
-
+### @usage: NO_SSE4()
+###
+### Compile module without SSE4
+macro NO_SSE4() {
+ SET(USE_SSE4 no)
+}
+
# tag:cpu
-### @usage: NO_CPU_CHECK()
-###
-### Compile module without startup CPU features check
-macro NO_CPU_CHECK() {
- SET(CPU_CHECK no)
-}
-
+### @usage: NO_CPU_CHECK()
+###
+### Compile module without startup CPU features check
+macro NO_CPU_CHECK() {
+ SET(CPU_CHECK no)
+}
+
### @usage: ADDINCLSELF()
###
### The macro adds the -I<project source path> flag to the source compilation flags of the current project.
@@ -5723,14 +5723,14 @@ macro SET_COMPILE_OUTPUTS_MODIFIERS(NOREL?";norel":"") {
_EMPTY_CMD=
# tag:src-processing tag:internal
-### @usage: _SRC(Ext Src Flags) # internal
-###
-### Basic building block of extension-based command dispatching
-### To enable specific extension processing define _SRC() macro with fixed first argument (Ext).
-### Internal logic will apply this macro to all files with this Ext listed in SRC/SRCS macros or outputs
-### of other commands (except ones marked as noauto)
+### @usage: _SRC(Ext Src Flags) # internal
+###
+### Basic building block of extension-based command dispatching
+### To enable specific extension processing define _SRC() macro with fixed first argument (Ext).
+### Internal logic will apply this macro to all files with this Ext listed in SRC/SRCS macros or outputs
+### of other commands (except ones marked as noauto)
macro _SRC(EXT, SRC, SRCFLAGS...) {
- # Generic macro definition for _SRC (just a placeholder, it does nothing)
+ # Generic macro definition for _SRC (just a placeholder, it does nothing)
}
# tag:src-processing
@@ -5751,7 +5751,7 @@ macro _SRC("s79", SRC, SRCFLAGS...) {
# tag:src-processing
macro _SRC("mm", SRC, SRCFLAGS...) {
- .CMD=$C_COMPILER $C_FLAGS_PLATFORM -x objective-c++ -fobjc-arc -fobjc-abi-version=2 -c -o ${output:SRC.o} ${input:SRC} $CXXFLAGS ${pre=-I:_C__INCLUDE} ${SRCFLAGS} ${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p CC"} ${kv;hide:"pc light-green"} $TOOLCHAIN_ENV
+ .CMD=$C_COMPILER $C_FLAGS_PLATFORM -x objective-c++ -fobjc-arc -fobjc-abi-version=2 -c -o ${output:SRC.o} ${input:SRC} $CXXFLAGS ${pre=-I:_C__INCLUDE} ${SRCFLAGS} ${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p CC"} ${kv;hide:"pc light-green"} $TOOLCHAIN_ENV
}
# tag:src-processing
@@ -5855,17 +5855,17 @@ macro _SRC("proto", SRC, SRCFLAGS...) {
# tag:src-processing
macro _SRC("gztproto", SRC, SRCFLAGS...) {
- # _PROTO__INCLUDE is before ARCADIA_ROOT in includes because in gazetteer we don't use builtins now and paths'canonization (resolving) depends on order of roots.
+ # _PROTO__INCLUDE is before ARCADIA_ROOT in includes because in gazetteer we don't use builtins now and paths'canonization (resolving) depends on order of roots.
# descriptor.proto must be resolved as google/protobuf/descriptor.proto
.CMD=${tool:"dict/gazetteer/converter"} -I$PROTOBUF_PATH ${pre="-I":_PROTO__INCLUDE} -I$ARCADIA_ROOT ${SRCFLAGS} ${input:SRC} ${output;nopath;noext;norel:SRC.proto} ${kv;hide:"p GZ"} ${kv;hide:"pc yellow"}
.PEERDIR=kernel/gazetteer/proto
}
# tag:src-processing
-macro _SRC("cfgproto", SRC, SRCFLAGS...) {
- .CMD=$_CPP_CFGPROTO_CMD($SRC)
-}
-
+macro _SRC("cfgproto", SRC, SRCFLAGS...) {
+ .CMD=$_CPP_CFGPROTO_CMD($SRC)
+}
+
# tag:src-processing
macro _SRC("pyx", SRC, SRCFLAGS...) {
# Copy-paste from BUILDWITH_CYTHON
@@ -5890,7 +5890,7 @@ macro _SRC("ssqls", SRC, SRCFLAGS...) {
# tag:src-processing
macro _SRC("f", SRC, SRCFLAGS...) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/f2c.py"} -t ${tool:"contrib/tools/f2c"} -c ${input:SRC} -o ${output:SRC.c} ${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p FT"} ${kv;hide:"pc light-green"}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/f2c.py"} -t ${tool:"contrib/tools/f2c"} -c ${input:SRC} -o ${output:SRC.c} ${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p FT"} ${kv;hide:"pc light-green"}
.PEERDIR=contrib/libs/libf2c
.ADDINCL=contrib/libs/libf2c
}
@@ -5946,11 +5946,11 @@ macro _SRC("asm", SRC, SRCFLAGS...) {
}
# tag:src-processing
-macro _SRC("lua", SRC, SRCFLAGS...) {
- .CMD=${cwd:LUAJIT_PATH} ${tool:"contrib/libs/luajit/compiler"} -b -g ${input:SRC} ${SRCFLAGS} ${global;output;suf=.o:SRC} ${kv;hide:"p LJ"} ${kv;hide:"pc light-cyan"}
- .PEERDIR=$LUAJIT_PATH
-}
-
+macro _SRC("lua", SRC, SRCFLAGS...) {
+ .CMD=${cwd:LUAJIT_PATH} ${tool:"contrib/libs/luajit/compiler"} -b -g ${input:SRC} ${SRCFLAGS} ${global;output;suf=.o:SRC} ${kv;hide:"p LJ"} ${kv;hide:"pc light-cyan"}
+ .PEERDIR=$LUAJIT_PATH
+}
+
# tag:src-processing
macro _SRC("cu", SRC, SRCFLAGS...) {
.CMD=$_SRC_CU_CMD
@@ -5971,7 +5971,7 @@ macro _SRC("fbs64", SRC, SRCFLAGS...) {
macro _SRC("pysrc", SRC, SRCFLAGS...) {
.CMD=$_SRC_PYSRC($SRC, $SRCFLAGS)
}
-
+
# tag:src-processing
macro _SRC_py2src(SRC, SRCFLAGS...) {
.CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/compile_pysrc.py"} --input ${input:SRC} --output ${output;noext;suf=.py2_raw.cpp:SRC} --rescompiler ${tool:"tools/rescompiler"} py2 --python $(PYTHON)/python --py_compile ${input:"build/scripts/py_compile.py"} ${kv;hide:"p P2"} ${kv;hide:"pc light-green"}
@@ -6051,14 +6051,14 @@ macro _SRC_masm(SRC, SRCFLAGS...) {
}
# tag:lua-specific
-### @usage: COMPILE_LUA(Src, [NAME <import_name>])
-###
-### Compile LUA source file to object code using LUA 2.0
-### Optionally override import name which is by default reflects Src name
-macro COMPILE_LUA(Src, NAME="") {
- .CMD=$_SRC(lua, $Src, ${pre=-n :NAME})
-}
-
+### @usage: COMPILE_LUA(Src, [NAME <import_name>])
+###
+### Compile LUA source file to object code using LUA 2.0
+### Optionally override import name which is by default reflects Src name
+macro COMPILE_LUA(Src, NAME="") {
+ .CMD=$_SRC(lua, $Src, ${pre=-n :NAME})
+}
+
# tag:lua-specific
### @usage: _SRC_lua_21(SRC [SRCFLAGS...]) # internal
###
@@ -6069,14 +6069,14 @@ macro _SRC_lua_21(SRC, SRCFLAGS...) {
}
# tag:lua-specific
-### @usage: COMPILE_LUA_21(Src, [NAME <import_name>])
-###
+### @usage: COMPILE_LUA_21(Src, [NAME <import_name>])
+###
### Compile LUA source file to object code using LUA 2.1
-### Optionally override import name which is by default reflects Src name
-macro COMPILE_LUA_21(Src, NAME="") {
+### Optionally override import name which is by default reflects Src name
+macro COMPILE_LUA_21(Src, NAME="") {
.CMD=$_SRC_lua_21($Src, ${pre=-n :NAME})
-}
-
+}
+
GETTEXT_KEEP_PATH=no
_MO_OUTPUT=
when ($GETTEXT_KEEP_PATH == "yes") {
@@ -6135,29 +6135,29 @@ macro YDL_DESC_USE_BINARY() {
SET_APPEND(YDL_DESC_FLAGS $YDL_DESC_FLAGS_BINARY)
}
-### @usage SRC(File Flags...)
-###
-### Compile single file with extra Flags.
-### Compilation is driven by the last extension of the File and Flags are specific to corresponding compilation command
+### @usage SRC(File Flags...)
+###
+### Compile single file with extra Flags.
+### Compilation is driven by the last extension of the File and Flags are specific to corresponding compilation command
macro SRC(FILE, FLAGS...) {
_SRC(${lastext:FILE} $FILE $FLAGS)
}
-### @usage: SRCS(<[GLOBAL] File> ...)
+### @usage: SRCS(<[GLOBAL] File> ...)
###
-### Source files of the project. Files are built according to their extension and put int module output or fed to ultimate PROGRAM/DLL depending on GLOBAL presence.
+### Source files of the project. Files are built according to their extension and put int module output or fed to ultimate PROGRAM/DLL depending on GLOBAL presence.
### Arcadia Paths from the root and is relative to the project's LIST are supported
###
-### GLOBAL marks next file as direct input to link phase of the program/shared library project built into. This prevents symbols of the file to be excluded by linker as unused.
+### GLOBAL marks next file as direct input to link phase of the program/shared library project built into. This prevents symbols of the file to be excluded by linker as unused.
### The scope of the GLOBAL keyword is the following file (that is, in the case of SRCS(GLOBAL foo.cpp bar.cpp) global will be only foo.cpp)
###
### @example:
###
### LIBRARY(test_global)
-### SRCS(GLOBAL foo.cpp)
+### SRCS(GLOBAL foo.cpp)
### END()
-###
-### This will produce foo.o and feed it to any PROGRAM/DLL module transitively depending on test_global library. The library itself will be empty and won't produce .a file.
+###
+### This will produce foo.o and feed it to any PROGRAM/DLL module transitively depending on test_global library. The library itself will be empty and won't produce .a file.
macro SRCS(FILES...) {
foreach (FILE : $FILES) {
_SRC(${lastext:FILE} $FILE)
@@ -6165,50 +6165,50 @@ macro SRCS(FILES...) {
}
# tag:cpu tag:src-processing
-### @usage SRC_C_SSE2(File Flags...)
-### Compile single .c-file with SSE2 and extra Flags.
+### @usage SRC_C_SSE2(File Flags...)
+### Compile single .c-file with SSE2 and extra Flags.
macro SRC_C_SSE2(FILE, FLAGS...) {
_SRC(c $FILE $SSE2_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse2)
}
# tag:cpu tag:src-processing
-### @usage SRC_C_SSE3(File Flags...)
-### Compile single .c-file with SSE3 and extra Flags.
+### @usage SRC_C_SSE3(File Flags...)
+### Compile single .c-file with SSE3 and extra Flags.
macro SRC_C_SSE3(FILE, FLAGS...) {
_SRC(c $FILE $SSE3_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse3)
}
# tag:cpu tag:src-processing
-### @usage SRC_C_SSSE3(File Flags...)
-### Compile single .c-file with SSSE3 and extra Flags.
+### @usage SRC_C_SSSE3(File Flags...)
+### Compile single .c-file with SSSE3 and extra Flags.
macro SRC_C_SSSE3(FILE, FLAGS...) {
_SRC(c $FILE $SSSE3_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .ssse3)
}
# tag:cpu tag:src-processing
-### @usage SRC_C_SSE41(File Flags...)
-### Compile single .c-file with SSE4.1 and extra Flags.
+### @usage SRC_C_SSE41(File Flags...)
+### Compile single .c-file with SSE4.1 and extra Flags.
macro SRC_C_SSE41(FILE, FLAGS...) {
_SRC(c $FILE $SSE41_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse41)
}
# tag:cpu tag:src-processing
-### @usage SRC_C_SSE4(File Flags...)
-### Compile single .c-file with SSE4 (SSE4.1, SSE4.2 and POPCNT) and extra Flags.
-macro SRC_C_SSE4(FILE, FLAGS...) {
+### @usage SRC_C_SSE4(File Flags...)
+### Compile single .c-file with SSE4 (SSE4.1, SSE4.2 and POPCNT) and extra Flags.
+macro SRC_C_SSE4(FILE, FLAGS...) {
_SRC(c $FILE $SSE4_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse4)
-}
-
+}
+
# tag:cpu tag:src-processing
-### @usage SRC_C_AVX(File Flags...)
-### Compile single .c-file with AVX and extra Flags.
+### @usage SRC_C_AVX(File Flags...)
+### Compile single .c-file with AVX and extra Flags.
macro SRC_C_AVX(FILE, FLAGS...) {
_SRC(c $FILE $AVX_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .avx)
}
# tag:cpu tag:src-processing
-### @usage SRC_C_AVX2(File Flags...)
-### Compile single .c-file with AVX2 and extra Flags.
+### @usage SRC_C_AVX2(File Flags...)
+### Compile single .c-file with AVX2 and extra Flags.
macro SRC_C_AVX2(FILE, FLAGS...) {
_SRC(c $FILE $AVX2_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .avx2)
}
@@ -6221,107 +6221,107 @@ macro SRC_CPP_PIC(FILE, FLAGS...) {
}
# tag:cpu tag:src-processing
-### @usage SRC_CPP_SSE2(File Flags...)
-### Compile single .cpp-file with SSE2 and extra Flags.
+### @usage SRC_CPP_SSE2(File Flags...)
+### Compile single .cpp-file with SSE2 and extra Flags.
macro SRC_CPP_SSE2(FILE, FLAGS...) {
_SRC(cpp $FILE $SSE2_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse2)
}
# tag:cpu tag:src-processing
-### @usage SRC_CPP_SSE3(File Flags...)
-### Compile single .cpp-file with SSE3 and extra Flags.
+### @usage SRC_CPP_SSE3(File Flags...)
+### Compile single .cpp-file with SSE3 and extra Flags.
macro SRC_CPP_SSE3(FILE, FLAGS...) {
_SRC(cpp $FILE $SSE3_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse3)
}
# tag:cpu tag:src-processing
-### @usage SRC_CPP_SSSE3(File Flags...)
-### Compile single .cpp-file with SSSE3 and extra Flags.
+### @usage SRC_CPP_SSSE3(File Flags...)
+### Compile single .cpp-file with SSSE3 and extra Flags.
macro SRC_CPP_SSSE3(FILE, FLAGS...) {
_SRC(cpp $FILE $SSSE3_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sss3)
}
# tag:cpu tag:src-processing
-### @usage SRC_CPP_SSE41(File Flags...)
-### Compile single .cpp-file with SSE4.1 and extra Flags.
+### @usage SRC_CPP_SSE41(File Flags...)
+### Compile single .cpp-file with SSE4.1 and extra Flags.
macro SRC_CPP_SSE41(FILE, FLAGS...) {
_SRC(cpp $FILE $SSE41_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse41)
}
# tag:cpu tag:src-processing
-### @usage SRC_CPP_SSE4(File Flags...)
-### Compile single .cpp-file with SSE4 (SSE4.1, SSE4.2 and POPCNT) and extra Flags.
-macro SRC_CPP_SSE4(FILE, FLAGS...) {
+### @usage SRC_CPP_SSE4(File Flags...)
+### Compile single .cpp-file with SSE4 (SSE4.1, SSE4.2 and POPCNT) and extra Flags.
+macro SRC_CPP_SSE4(FILE, FLAGS...) {
_SRC(cpp $FILE $SSE4_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse4)
-}
-
+}
+
# tag:cpu tag:src-processing
-### @usage SRC_CPP_AVX(File Flags...)
-### Compile single .cpp-file with AVX and extra Flags.
+### @usage SRC_CPP_AVX(File Flags...)
+### Compile single .cpp-file with AVX and extra Flags.
macro SRC_CPP_AVX(FILE, FLAGS...) {
_SRC(cpp $FILE $AVX_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .avx)
}
# tag:cpu tag:src-processing
-### @usage SRC_CPP_AVX2(File Flags...)
-### Compile single .cpp-file with AVX2 and extra Flags.
+### @usage SRC_CPP_AVX2(File Flags...)
+### Compile single .cpp-file with AVX2 and extra Flags.
macro SRC_CPP_AVX2(FILE, FLAGS...) {
_SRC(cpp $FILE $AVX2_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .avx2)
}
# tag:python-processing tag:cython
# TODO: use it in [.pyx] cmd
-### @usage: BUILDWITH_CYTHON_CPP(Src Options...)
+### @usage: BUILDWITH_CYTHON_CPP(Src Options...)
###
-### Generates .cpp file from .pyx.
+### Generates .cpp file from .pyx.
macro BUILDWITH_CYTHON_CPP(Src, Options...) {
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} --cplus ${CYTHON_CPP_OUTPUT_INCLUDES} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} -o ${output;tobindir:Src.cpp} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
}
# tag:python-processing tag:cython tag:internal
-### @usage: _BUILDWITH_CYTHON_CPP_DEP(Src Dep Options...) # internal
-###
-### Generates .cpp file from .pyx and attach extra input Dep.
-### If Dep changes the .cpp file will be re-generated.
-macro _BUILDWITH_CYTHON_CPP_DEP(Src, Dep, Options...) {
+### @usage: _BUILDWITH_CYTHON_CPP_DEP(Src Dep Options...) # internal
+###
+### Generates .cpp file from .pyx and attach extra input Dep.
+### If Dep changes the .cpp file will be re-generated.
+macro _BUILDWITH_CYTHON_CPP_DEP(Src, Dep, Options...) {
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} --cplus ${CYTHON_CPP_OUTPUT_INCLUDES} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} ${input;hide:Dep} -o ${output;tobindir:Src.cpp} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
}
# tag:python-processing tag:cython
-### @usage: BUILDWITH_CYTHON_C(Src Options...)
+### @usage: BUILDWITH_CYTHON_C(Src Options...)
###
-### Generates .c file from .pyx.
+### Generates .c file from .pyx.
macro BUILDWITH_CYTHON_C(Src, Options...) {
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} -o ${output;tobindir:Src.c} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
}
# tag:python-processing tag:cython tag:internal
-### @usage: _BUILDWITH_CYTHON_C_DEP(Src Dep Options...) # internal
-###
-### Generates .c file from .pyx and attach extra input Dep.
-### If Dep changes the .c file will be re-generated.
-macro _BUILDWITH_CYTHON_C_DEP(Src, Dep, Options...) {
+### @usage: _BUILDWITH_CYTHON_C_DEP(Src Dep Options...) # internal
+###
+### Generates .c file from .pyx and attach extra input Dep.
+### If Dep changes the .c file will be re-generated.
+macro _BUILDWITH_CYTHON_C_DEP(Src, Dep, Options...) {
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} ${input;hide:Dep} -o ${output;tobindir:Src.c} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
}
# tag:python-processing tag:cython tag:internal
-### @usage: _BUILDWITH_CYTHON_C_H(Src Dep Options...) # internal
+### @usage: _BUILDWITH_CYTHON_C_H(Src Dep Options...) # internal
###
### BUILDWITH_CYTHON_C without .pyx infix and with cdef public .h file.
-macro _BUILDWITH_CYTHON_C_H(Src, Dep, Options...) {
+macro _BUILDWITH_CYTHON_C_H(Src, Dep, Options...) {
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} ${input;hide:Dep} -o ${output;noext;tobindir:Src.c} ${output;hide;addincl;noext;tobindir:Src.h} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
}
# tag:python-processing tag:cython tag:internal
-### @usage: _BUILDWITH_CYTHON_C_API_H(Src Dep Options...) # internal
+### @usage: _BUILDWITH_CYTHON_C_API_H(Src Dep Options...) # internal
###
### BUILDWITH_CYTHON_C_H with cdef api _api.h file.
-macro _BUILDWITH_CYTHON_C_API_H(Src, Dep, Options...) {
+macro _BUILDWITH_CYTHON_C_API_H(Src, Dep, Options...) {
.CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS ${Options} ${pre=-I:_CYTHON__INCLUDE} ${input:Src} ${input;hide:Dep} -o ${output;noext;tobindir:Src.c} ${output;hide;addincl;noext;tobindir:Src.h} ${output;hide;addincl;noext;defext=_api.h;tobindir:Src} $CYTHON_OUTPUT_INCLUDES ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"}
ADDINCL(FOR cython contrib/tools/cython/Cython/Includes)
}
@@ -6345,63 +6345,63 @@ macro _SWIG_PYTHON_C(Src, DstSubPrefix) {
ADDINCL(FOR swig $_SWIG_LIBRARY/python FOR swig $_SWIG_LIBRARY)
}
-### @usage: BUILDWITH_RAGEL6(Src Options...)
-###
-### Compile .rl file using Ragel6.
+### @usage: BUILDWITH_RAGEL6(Src Options...)
+###
+### Compile .rl file using Ragel6.
macro BUILDWITH_RAGEL6(Src, Options...) {
.CMD=$RUN_NO_SANITIZE ${tool:"contrib/tools/ragel6"} $RAGEL6_FLAGS ${Options} -I${ARCADIA_ROOT} -o ${output;nopath;noext;defext=.rl6.cpp:Src} ${input:Src} ${kv;hide:"p R6"} ${kv;hide:"pc yellow"}
}
# tag:python-processing tag:internal
# TODO: use it in [.pyx] cmd
-### @usage: _PY_REGISTER() # internal
-###
-### Register Python 2.x module in internal resource file system. Arcadia Python 2.x importer will be retrieve these on import directive.
+### @usage: _PY_REGISTER() # internal
###
+### Register Python 2.x module in internal resource file system. Arcadia Python 2.x importer will be retrieve these on import directive.
+###
### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
macro _PY_REGISTER(Func) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_py_reg.py"} $Func ${output;noauto:Func.reg.cpp} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_py_reg.py"} $Func ${output;noauto:Func.reg.cpp} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"}
SRCS(GLOBAL $Func.reg.cpp)
}
# tag:python-processing tag:internal
-### @usage: _PY3_REGISTER() # internal
-###
-### Register Python 3.x module in internal resource file system. Arcadia Python 3.x importer will be retrieve these on import directive
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
+### @usage: _PY3_REGISTER() # internal
+###
+### Register Python 3.x module in internal resource file system. Arcadia Python 3.x importer will be retrieve these on import directive
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
macro _PY3_REGISTER(Func) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_py3_reg.py"} $Func ${output;noauto:Func.reg3.cpp} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"}
- SRCS(GLOBAL $Func.reg3.cpp)
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_py3_reg.py"} $Func ${output;noauto:Func.reg3.cpp} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"}
+ SRCS(GLOBAL $Func.reg3.cpp)
}
# tag:python-processing tag:internal
-### @usage: _PY_COMPILE_BYTECODE(SrcX Src) # internal
-###
+### @usage: _PY_COMPILE_BYTECODE(SrcX Src) # internal
+###
### Compile Python 2.x .py source file into Arcadia binary form suitable for PY2_PROGRAM
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
-macro _PY_COMPILE_BYTECODE(SrcX, Src, Dst) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/py_compile.py"} $SrcX ${input:Src} ${output;noauto:Dst.yapyc} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"}
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
+macro _PY_COMPILE_BYTECODE(SrcX, Src, Dst) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/py_compile.py"} $SrcX ${input:Src} ${output;noauto:Dst.yapyc} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"}
}
# tag:python-processing tag:internal
-### @usage: _PY3_COMPILE_BYTECODE(SrcX Src) # internal
-###
-### Compile Python 3.x .py source file into Arcadia binary form suitable for PY3_PROGRAM
-###
-### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
-macro _PY3_COMPILE_BYTECODE(SrcX, Src, Dst) {
- .CMD=${env:"PYTHONHASHSEED=0"} ${tool:"contrib/tools/python3/pycc"} $SrcX ${input:Src} ${output;noauto:Dst.yapyc3} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"}
+### @usage: _PY3_COMPILE_BYTECODE(SrcX Src) # internal
+###
+### Compile Python 3.x .py source file into Arcadia binary form suitable for PY3_PROGRAM
+###
+### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/pysrcs/#makrospyregister
+macro _PY3_COMPILE_BYTECODE(SrcX, Src, Dst) {
+ .CMD=${env:"PYTHONHASHSEED=0"} ${tool:"contrib/tools/python3/pycc"} $SrcX ${input:Src} ${output;noauto:Dst.yapyc3} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"}
}
### @usage: ARCHIVE_ASM(NAME archive_name files...)
###
-### Similar to the macro ARCHIVE, but:
+### Similar to the macro ARCHIVE, but:
### 1. works faster and it is better to use for large files.
### 2. Different syntax (see examples in codesearch or users/pg/tests/archive_test)
-macro ARCHIVE_ASM(NAME="", DONTCOMPRESS?"-p":"", REQUIREMENTS[], Files...) {
- .CMD=$ARCH_TOOL -q $DONTCOMPRESS ${input;join=\: :Files}: -o ${output;chksum;suf=$OBJ_SUF.rodata:NAME} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p AR"} ${kv;hide:"pc light-cyan"}
+macro ARCHIVE_ASM(NAME="", DONTCOMPRESS?"-p":"", REQUIREMENTS[], Files...) {
+ .CMD=$ARCH_TOOL -q $DONTCOMPRESS ${input;join=\: :Files}: -o ${output;chksum;suf=$OBJ_SUF.rodata:NAME} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p AR"} ${kv;hide:"pc light-cyan"}
}
# tag:yweb-specific
@@ -6416,23 +6416,23 @@ macro PIRE_INLINE(FILES...) {
}
}
-### @usage: ARCHIVE(archive_name [DONT_COMPRESS] files...)
+### @usage: ARCHIVE(archive_name [DONT_COMPRESS] files...)
###
### Add arbitrary data to a modules. Unlike RESOURCE macro the result should be futher processed by othet macros in the module.
-###
+###
### Example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a1ispolzujjtekomanduarchive
-macro ARCHIVE(NAME="", DONTCOMPRESS?"-p":"", REQUIREMENTS[], Files...) {
- .CMD=$ARCH_TOOL -q -x $DONTCOMPRESS ${input;join=\: :Files}: -o ${output;chksum;addincl;noauto:NAME} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p AR"} ${kv;hide:"pc light-red"}
+macro ARCHIVE(NAME="", DONTCOMPRESS?"-p":"", REQUIREMENTS[], Files...) {
+ .CMD=$ARCH_TOOL -q -x $DONTCOMPRESS ${input;join=\: :Files}: -o ${output;chksum;addincl;noauto:NAME} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p AR"} ${kv;hide:"pc light-red"}
}
-### @usage: ARCHIVE_BY_KEYS(archive_name key [DONT_COMPRESS] files...)
-###
-### Add arbitrary data to a module be accessible by specified key.
+### @usage: ARCHIVE_BY_KEYS(archive_name key [DONT_COMPRESS] files...)
+###
+### Add arbitrary data to a module be accessible by specified key.
### Unlike RESOURCE macro the result should be futher processed by othet macros in the module.
-###
-### Example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a1ispolzujjtekomanduarchive
-macro ARCHIVE_BY_KEYS(NAME="", KEYS="", DONTCOMPRESS?"-p":"", REQUIREMENTS[], Files...) {
- .CMD=$ARCH_TOOL -q -x $DONTCOMPRESS ${input:Files} -k $KEYS -o ${output;chksum;addincl;noauto:NAME} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p AR"} ${kv;hide:"pc light-red"}
+###
+### Example: https://wiki.yandex-team.ru/yatool/howtowriteyamakefiles/#a1ispolzujjtekomanduarchive
+macro ARCHIVE_BY_KEYS(NAME="", KEYS="", DONTCOMPRESS?"-p":"", REQUIREMENTS[], Files...) {
+ .CMD=$ARCH_TOOL -q -x $DONTCOMPRESS ${input:Files} -k $KEYS -o ${output;chksum;addincl;noauto:NAME} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p AR"} ${kv;hide:"pc light-red"}
}
#scripts
@@ -6464,12 +6464,12 @@ macro UPDATE_VCS_JAVA_INFO_NODEP(Jar) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/vcs_info.py"} output-java $(VCS)/vcs.json $VCS_JAVA $Jar $VCS_INFO_DISABLE_CACHE__NO_UID__
}
-### @usage: CREATE_BUILDINFO_FOR(GenHdr)
-###
-### Creates header file to access some information about build specified via configuration variables.
-### Unlike CREATE_SVNVERSION_FOR() it doesn't take revion information from VCS, it uses revision and SandboxTaskId passed via -D options to ya make
+### @usage: CREATE_BUILDINFO_FOR(GenHdr)
+###
+### Creates header file to access some information about build specified via configuration variables.
+### Unlike CREATE_SVNVERSION_FOR() it doesn't take revion information from VCS, it uses revision and SandboxTaskId passed via -D options to ya make
macro CREATE_BUILDINFO_FOR(GenHdr) {
- .CMD=$YIELD $CXX_COMPILER && $YIELD $CXXFLAGS && $XARGS $YMAKE_PYTHON ${input:BUILDVERSION_SCRIPT} ${output:GenHdr} ${kv;hide:"p BI"} ${kv;hide:"pc yellow"} ${hide;kv:"show_out"} $SVN_DEPENDS_CACHE__NO_UID__
+ .CMD=$YIELD $CXX_COMPILER && $YIELD $CXXFLAGS && $XARGS $YMAKE_PYTHON ${input:BUILDVERSION_SCRIPT} ${output:GenHdr} ${kv;hide:"p BI"} ${kv;hide:"pc yellow"} ${hide;kv:"show_out"} $SVN_DEPENDS_CACHE__NO_UID__
}
DECIMAL_MD5_SCRIPT=build/scripts/decimal_md5.py
@@ -6484,18 +6484,18 @@ macro DECIMAL_MD5_LOWER_32_BITS(File, FUNCNAME="", Opts...) {
}
# tag:internal
-### @usage $CFG_VARS # internal
-###
-### Mark commands that embed Configuration variables into files
-macro CFG_VARS() {
- .GEN_FROM_FILE=yes
-}
-
-### @usage: CONFIGURE_FILE(from to)
-###
-### Copy file with the replacement of configuration variables in form of @ANY_CONF_VAR@ with their values.
+### @usage $CFG_VARS # internal
+###
+### Mark commands that embed Configuration variables into files
+macro CFG_VARS() {
+ .GEN_FROM_FILE=yes
+}
+
+### @usage: CONFIGURE_FILE(from to)
+###
+### Copy file with the replacement of configuration variables in form of @ANY_CONF_VAR@ with their values.
### The values are collected during configure stage, while replacement itself happens during build stage.
-### Used implicitly for .in-files processing.
+### Used implicitly for .in-files processing.
macro CONFIGURE_FILE(Src, Dst) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/configure_file.py"} ${input:Src} ${output;addincl:Dst} $CFG_VARS ${kv;hide:"p CF"} ${kv;hide:"pc yellow"}
.SEM=set_vasrs ${CFG_VARS} && configure_file $S/${input;rootrel:Src} $B/${output;rootrel:Dst}
@@ -6503,46 +6503,46 @@ macro CONFIGURE_FILE(Src, Dst) {
### @usage: BASE_CODEGEN(tool_path prefix)
###
-### Generator ${prefix}.cpp + ${prefix}.h files based on ${prefix}.in.
+### Generator ${prefix}.cpp + ${prefix}.h files based on ${prefix}.in.
macro BASE_CODEGEN(Tool, Prefix, Opts...) {
.CMD=${tool:Tool} ${input:Prefix.in} ${output;nopath;noauto:Prefix.cpp} ${output;nopath:Prefix.h} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc yellow"}
}
# tag:internal
-### @usage: _SPLIT_CODEGEN_BASE(tool prefix OUTS[] OUTPUT_INCLUDES[]) # internal
+### @usage: _SPLIT_CODEGEN_BASE(tool prefix OUTS[] OUTPUT_INCLUDES[]) # internal
###
-### Generator of a certain number .the. cpp file + one header .h file from .in.
-### This is the call of the generator. Python macro SPLIT_CODEGEN() is defined in order to properly fill command outputs from OUT_NUM argument.
-macro _SPLIT_CODEGEN_BASE(Tool, Prefix, OUT[], OPTS[], OUTPUT_INCLUDES[]) {
+### Generator of a certain number .the. cpp file + one header .h file from .in.
+### This is the call of the generator. Python macro SPLIT_CODEGEN() is defined in order to properly fill command outputs from OUT_NUM argument.
+macro _SPLIT_CODEGEN_BASE(Tool, Prefix, OUT[], OPTS[], OUTPUT_INCLUDES[]) {
.CMD=${tool:Tool} ${input:Prefix.in} ${output;hide:OUT} ${output;nopath;noauto:Prefix.cpp} ${output;nopath:Prefix.h} $OPTS ${output_include;hide:OUTPUT_INCLUDES} ${kv;hide:"p SC"} ${kv;hide:"pc yellow"}
}
-STRUCT_CODEGEN_OUTPUT_INCLUDES=${output_include;hide:"util/generic/singleton.h"} \
-${output_include;hide:"util/generic/strbuf.h"} \
-${output_include;hide:"util/generic/vector.h"} \
-${output_include;hide:"util/generic/ptr.h"} \
-${output_include;hide:"util/generic/yexception.h"} \
-${output_include;hide:"kernel/struct_codegen/reflection/reflection.h"} \
-${output_include;hide:"kernel/struct_codegen/reflection/floats.h"}
-
-### @usage: STRUCT_CODEGEN(Prefix)
-### A special case BASE_CODEGEN, in which the kernel/struct_codegen/codegen_tool tool is used.
+STRUCT_CODEGEN_OUTPUT_INCLUDES=${output_include;hide:"util/generic/singleton.h"} \
+${output_include;hide:"util/generic/strbuf.h"} \
+${output_include;hide:"util/generic/vector.h"} \
+${output_include;hide:"util/generic/ptr.h"} \
+${output_include;hide:"util/generic/yexception.h"} \
+${output_include;hide:"kernel/struct_codegen/reflection/reflection.h"} \
+${output_include;hide:"kernel/struct_codegen/reflection/floats.h"}
+
+### @usage: STRUCT_CODEGEN(Prefix)
+### A special case BASE_CODEGEN, in which the kernel/struct_codegen/codegen_tool tool is used.
macro STRUCT_CODEGEN(Prefix) {
- .CMD=$BASE_CODEGEN(kernel/struct_codegen/codegen_tool, $Prefix, $STRUCT_CODEGEN_OUTPUT_INCLUDES)
+ .CMD=$BASE_CODEGEN(kernel/struct_codegen/codegen_tool, $Prefix, $STRUCT_CODEGEN_OUTPUT_INCLUDES)
.PEERDIR=kernel/struct_codegen/metadata kernel/struct_codegen/reflection
}
-### @usage: DUMPERF_CODEGEN(Prefix)
-### A special case BASE_CODEGEN, in which the extsearch/images/robot/tools/dumperf/codegen tool is used
+### @usage: DUMPERF_CODEGEN(Prefix)
+### A special case BASE_CODEGEN, in which the extsearch/images/robot/tools/dumperf/codegen tool is used
macro DUMPERF_CODEGEN(Prefix) {
.CMD=$BASE_CODEGEN(extsearch/images/robot/tools/dumperf/codegen, $Prefix, ${output_include;hide:"extsearch/images/kernel/erf/erf_format.h"})
}
# tag:flags
-### @usage: LDFLAGS(LinkerFlags...)
-###
-### Add flags to the link command line of executable or shared library/dll.
-### Note: LDFLAGS are always global. When set in the LIBRARY module they will affect all programs/dlls/tests the library is linked into.
+### @usage: LDFLAGS(LinkerFlags...)
+###
+### Add flags to the link command line of executable or shared library/dll.
+### Note: LDFLAGS are always global. When set in the LIBRARY module they will affect all programs/dlls/tests the library is linked into.
### Note: remember about the incompatibility of flags for gcc and cl.
macro LDFLAGS(Flags...) {
SET_APPEND(LDFLAGS_GLOBAL $Flags)
@@ -6550,24 +6550,24 @@ macro LDFLAGS(Flags...) {
# tag:flags
### @usage: CFLAGS([GLOBAL compiler_flag]* compiler_flags)
-###
-### Add the specified flags to the compilation command of C and C++ files.
-### @params: GLOBAL - Propagates these flags to dependent projects
-### Note: remember about the incompatibility flags for clang and cl (to set flags specifically for cl.exe use MSVC_FLAGS).
+###
+### Add the specified flags to the compilation command of C and C++ files.
+### @params: GLOBAL - Propagates these flags to dependent projects
+### Note: remember about the incompatibility flags for clang and cl (to set flags specifically for cl.exe use MSVC_FLAGS).
macro CFLAGS(Flags...) {
SET_APPEND_WITH_GLOBAL(USER_CFLAGS $Flags)
}
# tag:flags
### @usage: MASMFLAGS(compiler flags)
-### Add the specified flags to the compilation command of .masm files.
+### Add the specified flags to the compilation command of .masm files.
macro MASMFLAGS(Flags...) {
SET_APPEND(MASMFLAGS $Flags)
}
# tag:flags
### @usage: CONLYFLAGS([GLOBAL compiler_flag]* compiler_flags)
-### Add the specified flags to the compilation command of .c (but not .cpp) files.
+### Add the specified flags to the compilation command of .c (but not .cpp) files.
### @params: GLOBAL - Distributes these flags on dependent projects
macro CONLYFLAGS(Flags...) {
SET_APPEND_WITH_GLOBAL(USER_CONLYFLAGS $Flags)
@@ -6575,7 +6575,7 @@ macro CONLYFLAGS(Flags...) {
# tag:flags
### @usage: CXXFLAGS(compiler_flags)
-### Add the specified flags to the compilation command of .cpp (but not .c) files.
+### Add the specified flags to the compilation command of .cpp (but not .c) files.
macro CXXFLAGS(Flags...) {
SET_APPEND_WITH_GLOBAL(USER_CXXFLAGS $Flags)
}
@@ -6596,43 +6596,43 @@ macro NVCC_DEVICE_LINK(Srcs...) {
.CMD=$NVCC $NVCC_FLAGS -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:"devlink"} -dlink ${input;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:Srcs} ${kv;hide:"p DL"} ${kv;hide:"pc light-blue"}
}
-### @usage: STRIP()
-### Strip debug info from a PROGRAM, DLL or TEST.
-### This macro doesn't work in LIBRARY's, UNION's and PACKAGE's.
+### @usage: STRIP()
+### Strip debug info from a PROGRAM, DLL or TEST.
+### This macro doesn't work in LIBRARY's, UNION's and PACKAGE's.
macro STRIP() {
ENABLE(STRIP)
}
-### @usage: NO_OPTIMIZE()
-### Build code without any optimizations (-O0 mode).
+### @usage: NO_OPTIMIZE()
+### Build code without any optimizations (-O0 mode).
macro NO_OPTIMIZE() {
ENABLE(NO_OPTIMIZE)
}
-### @usage: NO_COMPILER_WARNINGS()
+### @usage: NO_COMPILER_WARNINGS()
### Disable all compiler warnings in the module.
-### Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.
+### Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.
macro NO_COMPILER_WARNINGS() {
ENABLE(NO_COMPILER_WARNINGS)
}
### @usage: WERROR()
-### Consider warnings as errors in the current module.
+### Consider warnings as errors in the current module.
### In the bright future will be removed, since WERROR is the default.
-### Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.
+### Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.
macro WERROR() {
ENABLE(WERROR)
}
### @usage: NO_WERROR()
-### Override WERROR() behavior
-### Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.
+### Override WERROR() behavior
+### Priorities: NO_COMPILER_WARNINGS > NO_WERROR > WERROR_MODE > WERROR.
macro NO_WERROR() {
DISABLE(WERROR)
}
-### @usage: NO_WSHADOW()
-### Disable C++ shadowing warnings.
+### @usage: NO_WSHADOW()
+### Disable C++ shadowing warnings.
macro NO_WSHADOW() {
ENABLE(NO_WSHADOW)
}
@@ -6640,23 +6640,23 @@ macro NO_WSHADOW() {
# tag:internal
### @usage: NO_PLATFORM_RESOURCES() # internal
### Exclude dependency on platform resources libraries.
-### Most probably you'll never need this. If you think you need, please contact devtools@ for assistance.
+### Most probably you'll never need this. If you think you need, please contact devtools@ for assistance.
macro NO_PLATFORM_RESOURCES() {
ENABLE(NOPLATFORM_RESOURCES)
}
# tag:internal tag:codenav
### @usage: NO_CODENAVIGATION() # internal
-### Disable codenaviagtion for a module. Needed to avoid PEERDIR loops in codenavigation support.
-### Most probably you'll never need this. If you think you need, please contact devtools@ for assistance.
+### Disable codenaviagtion for a module. Needed to avoid PEERDIR loops in codenavigation support.
+### Most probably you'll never need this. If you think you need, please contact devtools@ for assistance.
macro NO_CODENAVIGATION() {
ENABLE(NOCODENAVIGATION)
}
-### @usage: NO_UTIL()
-### Build module without dependency on util.
-### Note: use this with care. Util most likely will be linked into executable anyway,
-### so using util headers/functions/classes may not be detected at build time and may lead to unpredictable behavors at configure time.
+### @usage: NO_UTIL()
+### Build module without dependency on util.
+### Note: use this with care. Util most likely will be linked into executable anyway,
+### so using util headers/functions/classes may not be detected at build time and may lead to unpredictable behavors at configure time.
macro NO_UTIL() {
ENABLE(NOUTIL)
}
@@ -6664,10 +6664,10 @@ macro NO_UTIL() {
### @usage: NO_RUNTIME()
###
### This macro:
-### 1. Sets the ENABLE(NOUTIL) + DISABLE(USE_INTERNAL_STL);
-### 2. If the project that contains the macro NO_RUNTIME(), peerdir-it project does not contain NO_RUNTIME() => Warning.
-### Note: use this with care. Arcadia STL most likely will be linked into executable anyway, so using STL headers/functions/classes
-### may not be detected at build time and may lead to unpredictable behavors at configure time.
+### 1. Sets the ENABLE(NOUTIL) + DISABLE(USE_INTERNAL_STL);
+### 2. If the project that contains the macro NO_RUNTIME(), peerdir-it project does not contain NO_RUNTIME() => Warning.
+### Note: use this with care. Arcadia STL most likely will be linked into executable anyway, so using STL headers/functions/classes
+### may not be detected at build time and may lead to unpredictable behavors at configure time.
macro NO_RUNTIME() {
SET(USE_ARCADIA_LIBM no)
NO_UTIL()
@@ -6675,25 +6675,25 @@ macro NO_RUNTIME() {
}
### @usage: NO_LIBC()
-###
-### Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata).
-### Note: use this with care. libc most likely will be linked into executable anyway,
-### so using libc headers/functions may not be detected at build time and may lead to unpredictable behavors at configure time.
+###
+### Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata).
+### Note: use this with care. libc most likely will be linked into executable anyway,
+### so using libc headers/functions may not be detected at build time and may lead to unpredictable behavors at configure time.
macro NO_LIBC() {
NO_RUNTIME()
DISABLE(MUSL)
}
-### @usage: NO_PLATFORM()
-###
-### Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata) and set NO_PLATFORM variable for special processing.
-### Note: use this with care. libc most likely will be linked into executable anyway,
-### so using libc headers/functions may not be detected at build time and may lead to unpredictable behavors at configure time.
-macro NO_PLATFORM() {
- NO_LIBC()
- ENABLE(NOPLATFORM)
-}
-
+### @usage: NO_PLATFORM()
+###
+### Exclude dependencies on C++ and C runtimes (including util, musl and libeatmydata) and set NO_PLATFORM variable for special processing.
+### Note: use this with care. libc most likely will be linked into executable anyway,
+### so using libc headers/functions may not be detected at build time and may lead to unpredictable behavors at configure time.
+macro NO_PLATFORM() {
+ NO_LIBC()
+ ENABLE(NOPLATFORM)
+}
+
# tag:cpp-specific
### @usage: USE_CXX()
###
@@ -6713,39 +6713,39 @@ macro USE_UTIL() {
}
# tag:deprecated
-### @usage: NO_JOIN_SRC() # deprecated, does-nothing
+### @usage: NO_JOIN_SRC() # deprecated, does-nothing
### This macro currently does nothing. This is default behavior which cannot be overridden at module level.
macro NO_JOIN_SRC() {
ENABLE(UNUSED_MACRO)
}
# tag:deprecated
-### @usage: JOINSRC() # deprecated, does-nothing
-### This macro currently does nothing. Use JOIN_SRCS and similar macros to make one file of set of sources.
-macro JOINSRC() {
- ENABLE(UNUSED_MACRO)
-}
-
+### @usage: JOINSRC() # deprecated, does-nothing
+### This macro currently does nothing. Use JOIN_SRCS and similar macros to make one file of set of sources.
+macro JOINSRC() {
+ ENABLE(UNUSED_MACRO)
+}
+
# tag:sanitize
### @usage: NO_SANITIZE()
###
-### Disable all sanitizers for the module.
+### Disable all sanitizers for the module.
macro NO_SANITIZE() {
DISABLE(SANITIZER_TYPE)
}
# tag:coverage tag:sanitize
-### @usage: NO_SANITIZE_COVERAGE()
-###
-### Disable lightweight coverage (-fsanitize-coverage) for the module.
+### @usage: NO_SANITIZE_COVERAGE()
+###
+### Disable lightweight coverage (-fsanitize-coverage) for the module.
macro NO_SANITIZE_COVERAGE() {
DISABLE(SANITIZE_COVERAGE)
}
# tag:coverage
-### @usage: NO_CLANG_COVERAGE()
-###
-### Disable heavyweight clang coverage for the module
+### @usage: NO_CLANG_COVERAGE()
+###
+### Disable heavyweight clang coverage for the module
macro NO_CLANG_COVERAGE() {
DISABLE(CLANG_COVERAGE)
}
@@ -6774,17 +6774,17 @@ macro NO_CYTHON_COVERAGE() {
# tag:lua-specific
LUAJIT_PATH=${ARCADIA_ROOT}/contrib/libs/luajit
-macro _LUAJIT_OBJDUMP(Src, OUT="") {
+macro _LUAJIT_OBJDUMP(Src, OUT="") {
.CMD=${cwd:LUAJIT_PATH} ${tool:"contrib/libs/luajit/compiler"} -b -g ${input:Src} ${output;noauto:OUT} ${kv;hide:"p LJ"} ${kv;hide:"pc light-cyan"}
}
# tag:lua-specific
LUAJIT_21_PATH=${ARCADIA_ROOT}/contrib/libs/luajit_21
-macro _LUAJIT_21_OBJDUMP(Src, OUT="") {
+macro _LUAJIT_21_OBJDUMP(Src, OUT="") {
.CMD=${cwd:LUAJIT_21_PATH} ${tool:"contrib/libs/luajit_21/compiler"} -b -g ${input:Src} ${output;noauto:OUT} ${kv;hide:"p LJ"} ${kv;hide:"pc light-cyan"}
}
-macro _MX_BIN_TO_INFO(Src) {
+macro _MX_BIN_TO_INFO(Src) {
.CMD=${tool:"tools/mx_bin2info"} ${input:Src} ${output;nopath;noext;noauto:Src.info} ${kv;hide:"p MX"} ${kv;hide:"pc yellow"}
}
@@ -6796,7 +6796,7 @@ ${output_include;hide:"util/generic/hash.h"} \
${output_include;hide:"util/generic/ptr.h"} \
${output_include;hide:"util/generic/singleton.h"}
-macro _MX_GEN_TABLE(Srcs...) {
+macro _MX_GEN_TABLE(Srcs...) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/gen_mx_table.py"} $Srcs ${output;stdout:"mx_tables.cpp"} $MX_GEN_TABLE_INCLS ${kv;hide:"p MX"} ${kv;hide:"pc yellow"}
PEERDIR(kernel/matrixnet)
PEERDIR(library/cpp/archive)
@@ -6804,10 +6804,10 @@ macro _MX_GEN_TABLE(Srcs...) {
RELEV_FML_CODEGEN_INCLS=${output_include;hide:"kernel/relevfml/relev_fml.h"} ${output_include;hide:"library/cpp/sse/sse.h"}
-### @usage: GENERATE_ENUM_SERIALIZATION(File.h)
-###
-### Create serialization support for enumeration members defined in the header (String <-> Enum conversions) and compile it into the module.
-###
+### @usage: GENERATE_ENUM_SERIALIZATION(File.h)
+###
+### Create serialization support for enumeration members defined in the header (String <-> Enum conversions) and compile it into the module.
+###
### Documentation: https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles/
macro GENERATE_ENUM_SERIALIZATION(File) {
.CMD=$ENUM_PARSER_TOOL ${input:File} --include-path ${input;rootrel:File} --output ${output;chksum;suf=_serialized.cpp:File} ${output_include;hide:File} ${output_include;hide:"util/generic/serialized_enum.h"} ${kv;hide:"p EN"} ${kv;hide:"pc yellow"}
@@ -6815,12 +6815,12 @@ macro GENERATE_ENUM_SERIALIZATION(File) {
PEERDIR(tools/enum_parser/enum_serialization_runtime)
}
-### @usage: GENERATE_ENUM_SERIALIZATION_WITH_HEADER(File.h)
-###
-### Create serialization support for enumeration members defined in the header (String <-> Enum conversions) and compile it into the module
-### Provide access to serialization functions via generated header File_serialized.h
-###
-### Documentation: https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles/
+### @usage: GENERATE_ENUM_SERIALIZATION_WITH_HEADER(File.h)
+###
+### Create serialization support for enumeration members defined in the header (String <-> Enum conversions) and compile it into the module
+### Provide access to serialization functions via generated header File_serialized.h
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/HowToWriteYaMakeFiles/
macro GENERATE_ENUM_SERIALIZATION_WITH_HEADER(File) {
.CMD=$ENUM_PARSER_TOOL ${input:File} --include-path ${input;rootrel:File} --output ${output;chksum;suf=_serialized.cpp:File} --header ${output;chksum;suf=_serialized.h:File} ${output_include;hide:File} ${kv;hide:"p EN"} ${kv;hide:"pc yellow"}
.SEM=generate_enum_serilization ${input:File} ${output;hide;suf=_serialized.o:File} GEN_HEADER ${output;suf=_serialized.h:File} INCLUDE_HEADERS ${input;rootrel:File} ${tool;hide:"tools/enum_parser/enum_parser/bin"}
@@ -6829,70 +6829,70 @@ macro GENERATE_ENUM_SERIALIZATION_WITH_HEADER(File) {
### @usage: DEB_VERSION(File)
###
-### Creates a header file DebianVersion.h define the DEBIAN_VERSION taken from the File.
+### Creates a header file DebianVersion.h define the DEBIAN_VERSION taken from the File.
macro DEB_VERSION(File) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/mkver.py"} ${input:File} ${output;stdout:"DebianVersion.h"} ${kv;hide:"p CL"} ${kv;hide:"pc yellow"}
}
-BUILD_MN_SCRIPT=build/scripts/build_mn.py
-
+BUILD_MN_SCRIPT=build/scripts/build_mn.py
+
# tag:matrixnet
-### @usage: BUILD_MN([CHECK] [PTR] [MULTI] mninfo mnname) # matrixnet
-###
-### Generate MatrixNet data and access code using single command.
-### Alternative macro BUILD_MNS() works faster and better for large files.
+### @usage: BUILD_MN([CHECK] [PTR] [MULTI] mninfo mnname) # matrixnet
+###
+### Generate MatrixNet data and access code using single command.
+### Alternative macro BUILD_MNS() works faster and better for large files.
macro BUILD_MN(MnInfo, MnName, CHECK?"fml_tool=$FML_UNUSED_TOOL CHECK":"", MULTI?, PTR?, RANKING_SUFFIX="") {
.CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnF $ARCADIA_ROOT $ARCH_TOOL ${input:MnInfo} $MnName ranking_suffix=$RANKING_SUFFIX ${output;chksum;pre=mn.:MnName.cpp} ${output;hide;pre=MN_External_;suf=.rodata:MnName} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} $CHECK $MULTI $PTR ${kv;hide:"p MN"} ${kv;hide:"pc yellow"}
}
-macro _BUILD_MNS_FILE(Input, Name, Output, Suffix, Check, Fml_tool, AsmDataName) {
+macro _BUILD_MNS_FILE(Input, Name, Output, Suffix, Check, Fml_tool, AsmDataName) {
.CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnsFilesF $ARCADIA_ROOT $BINDIR $ARCH_TOOL fml_tool=$Fml_tool $Name ranking_suffix=$Suffix ${input:Input} ${output;hide:Output} ${output;hide;pre=MN_External_;suf=.rodata:AsmDataName} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} ${kv;hide:"p MN"} ${kv;hide:"pc yellow"}
}
MNS_OUTPUT=mnmodels
-macro _BUILD_MNS_CPP(NAME="", CHECK?, RANKING_SUFFIX="", Files...) {
- .CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnsCppF $NAME ranking_suffix=$RANKING_SUFFIX ${input:MNS_OUTPUT.h} ${output:MNS_OUTPUT.cpp} ${input:Files} ${output_include;hide:MNS_OUTPUT.h} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} ${kv;hide:"p MN"} ${kv;hide:"pc yellow"}
+macro _BUILD_MNS_CPP(NAME="", CHECK?, RANKING_SUFFIX="", Files...) {
+ .CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnsCppF $NAME ranking_suffix=$RANKING_SUFFIX ${input:MNS_OUTPUT.h} ${output:MNS_OUTPUT.cpp} ${input:Files} ${output_include;hide:MNS_OUTPUT.h} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} ${kv;hide:"p MN"} ${kv;hide:"pc yellow"}
}
-macro _BUILD_MNS_HEADER(NAME="", CHECK?, RANKING_SUFFIX="", Files...) {
+macro _BUILD_MNS_HEADER(NAME="", CHECK?, RANKING_SUFFIX="", Files...) {
.CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnsHeaderF $NAME ranking_suffix=$RANKING_SUFFIX ${output:MNS_OUTPUT.h} ${input:Files} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} ${output_include;hide:"kernel/matrixnet/mn_multi_categ.h"} ${kv;hide:"p MN"} ${kv;hide:"pc yellow"}
}
# TODO: support foreach_in and keywords simultaneous usage (look at BUILD_MNS_FILES)
# tag:matrixnet
-### @usage: BUILD_MNS([CHECK] NAME listname mninfos...) # matrixnet
-###
-### Generate MatrixNet data and access code using separate commands for support code, interface and data.
-### Faster version of BUILD_MN() macro for large files.
+### @usage: BUILD_MNS([CHECK] NAME listname mninfos...) # matrixnet
+###
+### Generate MatrixNet data and access code using separate commands for support code, interface and data.
+### Faster version of BUILD_MN() macro for large files.
macro BUILD_MNS(Files...) {
- _BUILD_MNS_HEADER($Files)
- _BUILD_MNS_CPP($Files)
- _BUILD_MNS_FILES($Files)
+ _BUILD_MNS_HEADER($Files)
+ _BUILD_MNS_CPP($Files)
+ _BUILD_MNS_FILES($Files)
}
-### @usage: BUILD_PLNS(Src...)
-###
-### Generate interface header plnmodels.h for Relev model (PLN).
-### Relev specific macro.
-macro BUILD_PLNS(Src...) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/build_pln_header.py"} ${output:"plnmodels.h"} ${input:Src} $RELEV_FML_CODEGEN_INCLS ${kv;hide:"p PN"} ${kv;hide:"pc yellow"}
+### @usage: BUILD_PLNS(Src...)
+###
+### Generate interface header plnmodels.h for Relev model (PLN).
+### Relev specific macro.
+macro BUILD_PLNS(Src...) {
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/build_pln_header.py"} ${output:"plnmodels.h"} ${input:Src} $RELEV_FML_CODEGEN_INCLS ${kv;hide:"p PN"} ${kv;hide:"pc yellow"}
.PEERDIR=kernel/relevfml library/cpp/sse
-}
-
-### @usage: COMPILE_NLG(Src...)
-###
-### Generate and compile .nlg templates (Jinja2-based) and interface for megamind runtime.
-###
-### Alice-specific macro
-macro COMPILE_NLG(Src...) {
- PEERDIR(alice/nlg/runtime)
+}
+
+### @usage: COMPILE_NLG(Src...)
+###
+### Generate and compile .nlg templates (Jinja2-based) and interface for megamind runtime.
+###
+### Alice-specific macro
+macro COMPILE_NLG(Src...) {
+ PEERDIR(alice/nlg/runtime)
RUN_PROGRAM(alice/nlg/bin compile-cpp --import-dir ${ARCADIA_ROOT} --out-dir ${ARCADIA_BUILD_ROOT} --include-prefix ${MODDIR} ${Src} IN ${Src} OUT register.cpp register.h ${suf=.cpp:Src} ${suf=.h:Src} OUT_NOAUTO ${suf=.pb.txt:Src})
-}
-
-### @usage: NEED_CHECK()
-###
+}
+
+### @usage: NEED_CHECK()
+###
### Commits to the project marked with this macro will be blocked by pre-commit check and then will be
### automatically merged to trunk only if there is no new broken build targets in check results.
### The use of this macro is disabled by default.
@@ -6901,16 +6901,16 @@ macro NEED_CHECK(Flags...) {
ENABLE(UNUSED_MACRO)
}
-### @usage: NO_NEED_CHECK()
-###
+### @usage: NO_NEED_CHECK()
+###
### Commits to the project marked with this macro will not be affected by higher-level NEED_CHECK macro.
macro NO_NEED_CHECK(Flags...) {
ENABLE(UNUSED_MACRO)
}
# tag:deprecated
-### @usage: NEED_REVIEW() # deprecated
-###
+### @usage: NEED_REVIEW() # deprecated
+###
### Mark the project as needing review.
### Reviewers are listed in the macro OWNER. The use of this macro is disabled by default.
### Details can be found here: https://clubs.at.yandex-team.ru/arcadia/6104
@@ -6919,9 +6919,9 @@ macro NEED_REVIEW(Flags...) {
ENABLE(UNUSED_MACRO)
}
-### @usage: VERSION(Args...)
-###
-### Specify version of a module. Currently unused by build system, only informative.
+### @usage: VERSION(Args...)
+###
+### Specify version of a module. Currently unused by build system, only informative.
macro VERSION(Flags...) {
ENABLE(UNUSED_MACRO)
}
@@ -6958,18 +6958,18 @@ SCHEEME2_STRUCT_INFO_FLAGS=-f "const static ui32 RecordSig" -u "RecordSig" --gcc
### ${DATAWORK_SCHEEME_EXPORT_FLAGS})
###
### for compatibility with C++ compiler and the external environment.
-### See tools/structparser for more details.
+### See tools/structparser for more details.
macro GEN_SCHEEME2(ScheemeName, FromFile) {
.CMD=$CXX_COMPILER $C_FLAGS_PLATFORM -c ${tmp;stdout:FromFile.cph} $SCHEEME2_CFLAGS ${input:FromFile} ${pre=-I:_C__INCLUDE} $CXXFLAGS -Wno-error && ${tool:"tools/structparser"} -o ${output:ScheemeName.inc} -n N${ScheemeName}SchemeInfo $SCHEEME2_STRUCT_INFO_FLAGS $DATAWORK_SCHEEME_EXPORT_FLAGS ${tmp:FromFile.cph} ${output;stdout;noauto:ScheemeName.inc.log} ${kv;hide:"p SH"} ${kv;hide:"pc yellow"}
}
-### @usage: SYMLINK(from to)
+### @usage: SYMLINK(from to)
### Add symlink
macro SYMLINK(From, To) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/symlink.py"} ${input;dirallowed:From} ${output;noauto:To} ${kv;hide:"p LN"} ${kv;hide:"pc light-cyan"}
}
-### @usage: RUN_PROGRAM(tool_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [REQUIREMENTS reqs])
+### @usage: RUN_PROGRAM(tool_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [REQUIREMENTS reqs])
###
### Run a program from arcadia.
### These macros are similar: RUN_PROGRAM, LUA, PYTHON.
@@ -6980,7 +6980,7 @@ macro SYMLINK(From, To) {
### - CWD dir - Absolute path of the working directory.
### - ENV key=value... - Environment variables.
### - TOOL tools... - Auxiliary tool directories.
-### - IN inputs... - Input files
+### - IN inputs... - Input files
### - OUT[_NOAUTO] outputs... - Output files. NOAUTO outputs are not automatically added to the build process.
### - STDOUT[_NOAUTO] output - Redirect the standard output to the output file.
### - OUTPUT_INCLUDES output_includes... - Includes of the output files that are needed to build them.
@@ -6989,18 +6989,18 @@ macro SYMLINK(From, To) {
### For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or
### ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
### Note that Tool is always built for the host platform, so be careful to provide that tool can be built for all Arcadia major host platforms (Linux, MacOS and Windows).
-macro RUN_PROGRAM(Tool, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], IN_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], REQUIREMENTS[], Args...) {
- .CMD=${cwd:CWD} ${env:ENV} ${tool:Tool} $Args ${input;hide:IN} ${input;hide:IN_DEPS} ${output_include;hide:OUTPUT_INCLUDES} ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} ${kv;hide:"p PR"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+macro RUN_PROGRAM(Tool, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], IN_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], REQUIREMENTS[], Args...) {
+ .CMD=${cwd:CWD} ${env:ENV} ${tool:Tool} $Args ${input;hide:IN} ${input;hide:IN_DEPS} ${output_include;hide:OUTPUT_INCLUDES} ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} ${kv;hide:"p PR"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
}
# tag:lua-specific
-### @usage: LUA(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...][ REQUIREMENTS reqs])
+### @usage: LUA(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...][ REQUIREMENTS reqs])
###
### Run a lua script.
### These macros are similar: RUN_PROGRAM, LUA, PYTHON.
###
### Parameters:
-### - script_path - Path to the script.3
+### - script_path - Path to the script.3
### - args... - Program arguments. Relative paths listed in TOOL, IN, OUT, STDOUT become absolute.
### - CWD dir - Absolute path of the working directory.
### - ENV key=value... - Environment variables.
@@ -7013,12 +7013,12 @@ macro RUN_PROGRAM(Tool, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{t
###
### For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or
### ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
-macro LUA(ScriptPath, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], IN_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], REQUIREMENTS[], Args...) {
- .CMD=${cwd:CWD} ${env:ENV} $LUA_TOOL ${input:ScriptPath} $Args ${input;hide:IN} ${input;hide:IN_DEPS} ${output_include;hide:OUTPUT_INCLUDES} ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} ${kv;hide:"p LU"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+macro LUA(ScriptPath, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], IN_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], REQUIREMENTS[], Args...) {
+ .CMD=${cwd:CWD} ${env:ENV} $LUA_TOOL ${input:ScriptPath} $Args ${input;hide:IN} ${input;hide:IN_DEPS} ${output_include;hide:OUTPUT_INCLUDES} ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} ${kv;hide:"p LU"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
}
# tag:python-specific
-### @usage: PYTHON(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [REQUIREMENTS reqs])
+### @usage: PYTHON(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [REQUIREMENTS reqs])
###
### Run a python script with $(PYTHON)/python built from devtools/huge_python.
### These macros are similar: RUN_PROGRAM, LUA, PYTHON.
@@ -7037,76 +7037,76 @@ macro LUA(ScriptPath, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{too
###
### For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or
### ${CURDIR} and ${BINDIR} which are expanded where the outputs are used.
-macro PYTHON(ScriptPath, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], IN_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], REQUIREMENTS[], Args...) {
- .CMD=${cwd:CWD} ${env:ENV} $YMAKE_PYTHON ${input:ScriptPath} $Args ${input;hide:IN} ${input;hide:IN_DEPS} ${output_include;hide:OUTPUT_INCLUDES} ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+macro PYTHON(ScriptPath, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], IN_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], REQUIREMENTS[], Args...) {
+ .CMD=${cwd:CWD} ${env:ENV} $YMAKE_PYTHON ${input:ScriptPath} $Args ${input;hide:IN} ${input;hide:IN_DEPS} ${output_include;hide:OUTPUT_INCLUDES} ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:restricted"} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
}
# tag:java-specific
-macro _RUN_JAVA(IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], TOOL[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], HIDE_OUTPUT?"stderr2stdout":"stdout2stderr", REQUIREMENTS[], Args...) {
+macro _RUN_JAVA(IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], TOOL[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], HIDE_OUTPUT?"stderr2stdout":"stdout2stderr", REQUIREMENTS[], Args...) {
PEERDIR(build/platform/java/jdk $JDK_RESOURCE_PEERDIR)
- .CMD=${cwd:CWD} ${env:ENV} $YMAKE_PYTHON ${input;pre=build/scripts/:HIDE_OUTPUT.py} $JDK_RESOURCE/bin/java $Args ${tool;hide:TOOL} ${input;hide:IN} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+ .CMD=${cwd:CWD} ${env:ENV} $YMAKE_PYTHON ${input;pre=build/scripts/:HIDE_OUTPUT.py} $JDK_RESOURCE/bin/java $Args ${tool;hide:TOOL} ${input;hide:IN} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
}
-### @usage: FROM_SANDBOX([FILE] resource_id [AUTOUPDATED script] [RENAME <resource files>] OUT_[NOAUTO] <output files> [EXECUTABLE] [OUTPUT_INCLUDES <include files>])
-###
+### @usage: FROM_SANDBOX([FILE] resource_id [AUTOUPDATED script] [RENAME <resource files>] OUT_[NOAUTO] <output files> [EXECUTABLE] [OUTPUT_INCLUDES <include files>])
+###
### Download the resource from the Sandbox, unpack (if not explicitly specified word FILE) and add OUT files to the build. EXECUTABLE makes them executable.
### You may specify extra dependencies that output files bring using OUTPUT_INCLUDES. The change of these may e.g. lead to recompilation of .cpp files extracted from resource.
-### If there is no default processing for OUT files or you need process them specially use OUT_NOAUTO instead of OUT.
-###
-### It is disallowed to specify directory as OUT/OUT_NOAUTO since all outputs of commands shall be known to build system.
-###
+### If there is no default processing for OUT files or you need process them specially use OUT_NOAUTO instead of OUT.
+###
+### It is disallowed to specify directory as OUT/OUT_NOAUTO since all outputs of commands shall be known to build system.
+###
### RENAME renames files to the corresponding OUT and OUT_NOAUTO outputs:
### FROM_SANDBOX(resource_id RENAME in_file1 in_file2 OUT out_file1 out_file2 out_file3)
### FROM_SANDBOX(resource_id RENAME in_file1 OUT out_file1 RENAME in_file2 OUT out_file2)
### FROM_SANDBOX(FILE resource_id RENAME resource_file OUT out_name)
###
-### RENAME RESOURCE allows to rename the resource without specifying its file name.
-###
-### If AUTOUPDATED is specified than macro will be regularly updated according to autoupdate script. The dedicated Sandbox task scans the arcadia and
+### RENAME RESOURCE allows to rename the resource without specifying its file name.
+###
+### If AUTOUPDATED is specified than macro will be regularly updated according to autoupdate script. The dedicated Sandbox task scans the arcadia and
### changes resource_ids in such macros if newer resource of specified type is available. Note that the task seeks AUTOUPDATED in specific position,
-### so you shall place it immediately after resource_id.
-macro FROM_SANDBOX(Id, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], FILE?"--copy-to-dir":"--untar-to", AUTOUPDATED="", PREFIX=".", RENAME[], EXECUTABLE?"--executable":"", SBR="sbr:", REQUIREMENTS[]) {
- .CMD=${hide:SANDBOX_FAKEID} ${cwd:BINDIR} ${resource;pre=$SBR:Id} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_sandbox.py"} --resource-file $(RESOURCE_ROOT)/sbr/$Id/resource --resource-id $Id $FILE $PREFIX ${pre=--rename :RENAME} $EXECUTABLE -- $OUT $OUT_NOAUTO ${input;hide:"build/scripts/fetch_from.py"} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:full"} ${kv;hide:"p SB"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
- ADD_CHECK(check.resource $Id)
+### so you shall place it immediately after resource_id.
+macro FROM_SANDBOX(Id, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], FILE?"--copy-to-dir":"--untar-to", AUTOUPDATED="", PREFIX=".", RENAME[], EXECUTABLE?"--executable":"", SBR="sbr:", REQUIREMENTS[]) {
+ .CMD=${hide:SANDBOX_FAKEID} ${cwd:BINDIR} ${resource;pre=$SBR:Id} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_sandbox.py"} --resource-file $(RESOURCE_ROOT)/sbr/$Id/resource --resource-id $Id $FILE $PREFIX ${pre=--rename :RENAME} $EXECUTABLE -- $OUT $OUT_NOAUTO ${input;hide:"build/scripts/fetch_from.py"} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${requirements;hide:REQUIREMENTS} ${requirements;hide:"network:full"} ${kv;hide:"p SB"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+ ADD_CHECK(check.resource $Id)
}
### @usage: FROM_MDS([FILE] key [RENAME <resource files>] OUT_[NOAUTO] <output files> [EXECUTABLE])
-###
+###
### Download resource from MDS with the specified key and process like [FROM_SANDBOX()](#macro_FROM_SANDBOX).
macro FROM_MDS(Key, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], FILE?"--copy-to-dir":"--untar-to", PREFIX=".", RENAME[], EXECUTABLE?"--executable":"") {
.CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_mds.py"} --key $Key $FILE $PREFIX ${pre=--rename :RENAME} $EXECUTABLE -- $OUT $OUT_NOAUTO ${input;hide:"build/scripts/fetch_from.py"} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${requirements;hide:"network:full"} ${kv;hide:"p MD"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
- ADD_CHECK(check.mds $Key)
+ ADD_CHECK(check.mds $Key)
}
# tag:internal
-### @usage: _FROM_EXTERNAL(ExtFile [AUTOUPDATED script] [RENAME <resource files>] OUT_[NOAUTO] <output files> [EXECUTABLE]) #internal
-###requirements;hide
-### Use resource described as .external file as [FROM_SANDBOX()](#macro_FROM_SANDBOX)/[FROM_MDS()](#macro_FROM_MDS).
-macro _FROM_EXTERNAL(File, OutFile, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], AUTOUPDATED="", PREFIX=".", RENAME[], EXECUTABLE?"--executable":"", EXT="ext:") {
+### @usage: _FROM_EXTERNAL(ExtFile [AUTOUPDATED script] [RENAME <resource files>] OUT_[NOAUTO] <output files> [EXECUTABLE]) #internal
+###requirements;hide
+### Use resource described as .external file as [FROM_SANDBOX()](#macro_FROM_SANDBOX)/[FROM_MDS()](#macro_FROM_MDS).
+macro _FROM_EXTERNAL(File, OutFile, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], AUTOUPDATED="", PREFIX=".", RENAME[], EXECUTABLE?"--executable":"", EXT="ext:") {
.CMD=${hide:SANDBOX_FAKEID} ${cwd:BINDIR} ${resource;pre=$EXT;suf=.external:OutFile} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_external.py"} --external-file ${input:File} --resource-file $(RESOURCE_ROOT)/ext/$OutFile --copy-to-dir $PREFIX ${pre=--rename :RENAME} $EXECUTABLE -- $OUT $OUT_NOAUTO ${input;hide:"build/scripts/fetch_from.py"} ${input;hide:"build/scripts/fetch_from_sandbox.py"} ${input;hide:"build/scripts/fetch_from_mds.py"} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${requirements;hide:"network:full"} ${kv;hide:"p XT"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
-
+
#FIXME: add '${resource;pre=$EXT:OutFile}' when support of the scheme is added to executors
-#FIXME: add 'ADD_CHECK(check.external $File)' when proper testing is implemented
-}
-
+#FIXME: add 'ADD_CHECK(check.external $File)' when proper testing is implemented
+}
+
### @usage LARGE_FILES([AUTOUPDATED] Files...)
-###
+###
### Use large file ether from working copy or from remote storage via placeholder <File>.external
### If <File> is present locally (and not a symlink!) it will be copied to build directory.
### Otherwise macro will try to locate <File>.external, parse it retrieve ot during build phase.
macro LARGE_FILES(AUTOUPDATED?, Files...) {
- # This is needed to correctly switch between remote and local modes
- _GLOB($LF $Files)
-}
-
-
-### @usage: FROM_ARCHIVE(Src [RENAME <resource files>] OUT_[NOAUTO] <output files> [EXECUTABLE])
-###
-### Process file archive as [FROM_SANDBOX()](#macro_FROM_SANDBOX).
-macro FROM_ARCHIVE(Src, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], PREFIX=".", RENAME[], EXECUTABLE?"--executable":"") {
- .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_archive.py"} "--archive" ${input:Src} "--file-name" ${suf=-:Src} "--untar-to" $PREFIX ${pre=--rename :RENAME} $EXECUTABLE -- $OUT $OUT_NOAUTO ${input;hide:"build/scripts/fetch_from.py"} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${kv;hide:"p FA"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
-}
-
+ # This is needed to correctly switch between remote and local modes
+ _GLOB($LF $Files)
+}
+
+
+### @usage: FROM_ARCHIVE(Src [RENAME <resource files>] OUT_[NOAUTO] <output files> [EXECUTABLE])
+###
+### Process file archive as [FROM_SANDBOX()](#macro_FROM_SANDBOX).
+macro FROM_ARCHIVE(Src, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], PREFIX=".", RENAME[], EXECUTABLE?"--executable":"") {
+ .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_archive.py"} "--archive" ${input:Src} "--file-name" ${suf=-:Src} "--untar-to" $PREFIX ${pre=--rename :RENAME} $EXECUTABLE -- $OUT $OUT_NOAUTO ${input;hide:"build/scripts/fetch_from.py"} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${kv;hide:"p FA"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
+}
+
when ($MSVC == "yes") {
C_AS_CXX_FLAGS=/TP /std:c++17
}
@@ -7115,25 +7115,25 @@ otherwise {
}
# tag:cpp-specific
-### @usage: COMPILE_C_AS_CXX()
-###
-### Compile .c files as .cpp ones within a module.
+### @usage: COMPILE_C_AS_CXX()
+###
+### Compile .c files as .cpp ones within a module.
macro COMPILE_C_AS_CXX() {
SET(EXTRA_C_FLAGS $C_AS_CXX_FLAGS)
}
-### @usage: NO_DEBUG_INFO()
-###
-### Compile files without debug info collection.
+### @usage: NO_DEBUG_INFO()
+###
+### Compile files without debug info collection.
macro NO_DEBUG_INFO() {
SET(NO_DEBUGINFO yes)
}
-### @usage: CTEMPLATE_VARNAMES(File)
-###
-### Generate File.varnames.h using contrib/libs/ctemplate/make_tpl_varnames_h
-###
-### Documentation: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/ctemplate/README.md
+### @usage: CTEMPLATE_VARNAMES(File)
+###
+### Generate File.varnames.h using contrib/libs/ctemplate/make_tpl_varnames_h
+###
+### Documentation: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/ctemplate/README.md
macro CTEMPLATE_VARNAMES(File) {
.CMD=${tool:"contrib/libs/ctemplate/make_tpl_varnames_h"} -f ${output;addincl;nopath;noallext:File.varnames.h} ${input:File}
}
@@ -7143,8 +7143,8 @@ CLANG_ROOT=$CLANG_RESOURCE_GLOBAL
### @usage: GENERATED_SRCS(srcs... PARSE_META_FROM cpp_srcs... [OUTPUT_INCLUDES output_includes...] [OPTIONS])
###
-### Generate sources using Jinja 2 template engine.
-###
+### Generate sources using Jinja 2 template engine.
+###
### srcs... - list of text files which will be generated during build time by templates. Each template must be
### placed to the place in source tree where corresponding source file should be generated. Name of
### template must be "<name_of_src_file>.markettemplate". For example if you want to generate file "example.cpp"
@@ -7168,28 +7168,28 @@ macro GENERATED_SRCS(PARSE_META_FROM{input}[], OUTPUT_INCLUDES[], OPTIONS[], TEM
PEERDIR(build/platform/clang)
}
-### @usage: CLANG_EMIT_AST_CXX(Input Output Opts...)
-###
+### @usage: CLANG_EMIT_AST_CXX(Input Output Opts...)
+###
### Emit Clang AST from .cpp file. CXXFLAGS and LLVM_OPTS are passed in, while CFLAGS and C_FLAGS_PLATFORM are not.
-### Note: Output name is used as is, no extension added.
-macro CLANG_EMIT_AST_CXX(Input, Output, Opts...) {
+### Note: Output name is used as is, no extension added.
+macro CLANG_EMIT_AST_CXX(Input, Output, Opts...) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_ROOT/bin/clang++ ${pre=-I:_C__INCLUDE} $CXXFLAGS -Wno-unknown-warning-option $LLVM_OPTS -std=c++17 -fno-lto -emit-ast -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p ST"} ${kv;hide:"pc light-green"}
PEERDIR(build/platform/clang)
-}
-
-### @usage: LLVM_COMPILE_CXX(Input Output Opts...)
-###
+}
+
+### @usage: LLVM_COMPILE_CXX(Input Output Opts...)
+###
### Emit LLVM bytecode from .cpp file. BC_CXXFLAGS, LLVM_OPTS and C_FLAGS_PLATFORM are passed in, while CFLAGS are not.
-### Note: Output name is used as is, no extension added.
+### Note: Output name is used as is, no extension added.
macro LLVM_COMPILE_CXX(Input, Output, Opts...) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_ROOT/bin/clang++ ${pre=-I:_C__INCLUDE} $BC_CXXFLAGS $C_FLAGS_PLATFORM -Wno-unknown-warning-option $LLVM_OPTS -std=c++17 -fno-lto -emit-llvm -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
PEERDIR(build/platform/clang)
}
-### @usage: LLVM_COMPILE_C(Input Output Opts...)
-###
+### @usage: LLVM_COMPILE_C(Input Output Opts...)
+###
### Emit LLVM bytecode from .c file. BC_CFLAGS, LLVM_OPTS and C_FLAGS_PLATFORM are passed in, while CFLAGS are not.
-### Note: Output name is used as is, no extension added.
+### Note: Output name is used as is, no extension added.
macro LLVM_COMPILE_C(Input, Output, Opts...) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_ROOT/bin/clang ${pre=-I:_C__INCLUDE} $BC_CFLAGS $C_FLAGS_PLATFORM $LLVM_OPTS -fno-lto -emit-llvm -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
PEERDIR(build/platform/clang)
@@ -7213,28 +7213,28 @@ macro BPF_STATIC(Input, Output, Opts...) {
PEERDIR(build/platform/clang build/platform/lld)
}
-### @usage: LLVM_COMPILE_LL(Input Output Opts...)
-###
-### Compile LLVM bytecode to object representation.
-### Note: Output name is used as is, no extension added.
+### @usage: LLVM_COMPILE_LL(Input Output Opts...)
+###
+### Compile LLVM bytecode to object representation.
+### Note: Output name is used as is, no extension added.
macro LLVM_COMPILE_LL(Input, Output, Opts...) {
.CMD=$CLANG_ROOT/bin/llvm-as ${input:Input} -o ${output;noauto:Output} ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
PEERDIR(build/platform/clang)
}
-### @usage: LLVM_LINK(Output Inputs...)
-###
-### Call llvm-link on set of Inputs to produce Output.
-### Note: Unlike many other macros output argument goes first. Output name is used as is, no extension added.
+### @usage: LLVM_LINK(Output Inputs...)
+###
+### Call llvm-link on set of Inputs to produce Output.
+### Note: Unlike many other macros output argument goes first. Output name is used as is, no extension added.
macro LLVM_LINK(Output, Inputs...) {
- .CMD=$CLANG_ROOT/bin/llvm-link ${input:Inputs} -o ${output;noauto:Output} ${kv;hide:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-red"}
+ .CMD=$CLANG_ROOT/bin/llvm-link ${input:Inputs} -o ${output;noauto:Output} ${kv;hide:"p LD"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-red"}
PEERDIR(build/platform/clang)
}
-### @usage: LLVM_OPT(Input Output Opts...)
-###
-### Call llvm-opt with set of Opts on Input to produce Output.
-### Note: Output name is used as is, no extension added.
+### @usage: LLVM_OPT(Input Output Opts...)
+###
+### Call llvm-opt with set of Opts on Input to produce Output.
+### Note: Output name is used as is, no extension added.
macro LLVM_OPT(Input, Output, Opts...) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/llvm_opt_wrapper.py"} $CLANG_ROOT/bin/opt ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p OP"} ${kv;hide:"pc yellow"}
PEERDIR(build/platform/clang)
@@ -7250,17 +7250,17 @@ when ($CLANG && $DEBUGINFO_LINES_ONLY == "yes" && $NO_DEBUGINFO != "yes") {
# TODO: configurable tar and touch
PACK_TGZ=${cwd:ARCADIA_BUILD_ROOT} tar -czf ${rootrel:OUTPUT} ${rootrel:INPUT} ${kv;hide:"p AR"} ${kv;hide:"pc light-red"}
-
+
# tag:internal
-### @usage TOUCH(Outputs...) # internal
+### @usage TOUCH(Outputs...) # internal
### Just introduce outputs
macro TOUCH(Outputs...) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${output:Outputs}
}
TOUCH_UNIT=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"p UN"} ${kv;hide:"pc light-cyan"} $TARGET
-TOUCH_PACKAGE=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"pc light-red"} $TARGET && $YMAKE_PYTHON ${input:"build/scripts/copy_to_dir.py"} --dest-dir $BINDIR --build-root $ARCADIA_BUILD_ROOT $PACKED_PACKAGE_ARGS $SRCS_GLOBAL $PEERS
-_P_PK=${kv;hide:"p PK"}
-TOUCH_PACKAGE_MF=$GENERATE_MF && $TOUCH_PACKAGE $_P_PK
+TOUCH_PACKAGE=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"pc light-red"} $TARGET && $YMAKE_PYTHON ${input:"build/scripts/copy_to_dir.py"} --dest-dir $BINDIR --build-root $ARCADIA_BUILD_ROOT $PACKED_PACKAGE_ARGS $SRCS_GLOBAL $PEERS
+_P_PK=${kv;hide:"p PK"}
+TOUCH_PACKAGE_MF=$GENERATE_MF && $TOUCH_PACKAGE $_P_PK
TOUCH_JAVA_UNIT=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"java $CURDIR"} $TARGET
NO_CHECK_IMPORTS_FOR_VALUE=None
@@ -7272,7 +7272,7 @@ macro NO_CHECK_IMPORTS(Masks...) {
SET(NO_CHECK_IMPORTS_FOR_VALUE $Masks)
}
-
+
# tag:yasm-specific
_YASM_FMT_VALUE=
_YASM_PLATFORM_FLAGS_VALUE=
@@ -7308,21 +7308,21 @@ YASM_PREINCLUDES_VALUE=
# tag:yasm-specific
macro _SRC_yasm(SRC, PREINCLUDES[], SRCFLAGS...) {
- .CMD=${tool:"contrib/tools/yasm"} -f ${_YASM_FMT_VALUE}${HARDWARE_ARCH} $_YASM_PLATFORM_FLAGS_VALUE $YASM_DEBUG_INFO $YASM_DEBUG_INFO_DISABLE_CACHE__NO_UID__ -D ${pre=_;suf=_:HARDWARE_TYPE} -D_YASM_ $ASM_PREFIX_VALUE $_YASM_PREDEFINED_FLAGS_VALUE $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS -o ${output;noext;suf=${OBJECT_SUF}:SRC} ${pre=-P :PREINCLUDES} ${input;hide:PREINCLUDES} ${input:SRC} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p AS"} ${kv;hide:"pc light-green"}
+ .CMD=${tool:"contrib/tools/yasm"} -f ${_YASM_FMT_VALUE}${HARDWARE_ARCH} $_YASM_PLATFORM_FLAGS_VALUE $YASM_DEBUG_INFO $YASM_DEBUG_INFO_DISABLE_CACHE__NO_UID__ -D ${pre=_;suf=_:HARDWARE_TYPE} -D_YASM_ $ASM_PREFIX_VALUE $_YASM_PREDEFINED_FLAGS_VALUE $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS -o ${output;noext;suf=${OBJECT_SUF}:SRC} ${pre=-P :PREINCLUDES} ${input;hide:PREINCLUDES} ${input:SRC} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p AS"} ${kv;hide:"pc light-green"}
}
-
-### @usage: ASM_PREINCLUDE(AsmFiles...)
-###
-### Supply additional .asm files to all assembler calls within a module
+
+### @usage: ASM_PREINCLUDE(AsmFiles...)
+###
+### Supply additional .asm files to all assembler calls within a module
macro ASM_PREINCLUDE(PREINCLUDES...) {
SET_APPEND(YASM_PREINCLUDES_VALUE $PREINCLUDES)
}
# tag:python-specific
-### @usage: RUN_PYTHON(Args...)
-###
-### Version of RUN() macro to invoke Python scripts
-### @see: [RUN()](#macro_RUN)
+### @usage: RUN_PYTHON(Args...)
+###
+### Version of RUN() macro to invoke Python scripts
+### @see: [RUN()](#macro_RUN)
macro RUN_PYTHON(Args...) {
SETUP_RUN_PYTHON()
RUN(${PYTHON_BIN} $Args)
@@ -7331,17 +7331,17 @@ macro RUN_PYTHON(Args...) {
### @usage: RUN_ANTLR(Args...)
###
### Macro to invoke ANTLR3 generator (general case)
-macro RUN_ANTLR(IN[], OUT[], OUT_NOAUTO[], OUTPUT_INCLUDES[], REQUIREMENTS[], CWD="", Args...) {
+macro RUN_ANTLR(IN[], OUT[], OUT_NOAUTO[], OUTPUT_INCLUDES[], REQUIREMENTS[], CWD="", Args...) {
PEERDIR(build/external_resources/antlr3)
- _RUN_JAVA(-jar $ANTLR3_RESOURCE_GLOBAL/antlr-3.5.2-complete-no-st3.jar $Args IN $IN OUT $OUT OUT_NOAUTO $OUT_NOAUTO OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS ${pre=CWD :CWD})
+ _RUN_JAVA(-jar $ANTLR3_RESOURCE_GLOBAL/antlr-3.5.2-complete-no-st3.jar $Args IN $IN OUT $OUT OUT_NOAUTO $OUT_NOAUTO OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS ${pre=CWD :CWD})
}
### @usage: RUN_ANTLR4(Args...)
###
### Macro to invoke ANTLR4 generator (general case)
-macro RUN_ANTLR4(IN[], OUT[], OUT_NOAUTO[], OUTPUT_INCLUDES[], REQUIREMENTS[], CWD="", Args...) {
+macro RUN_ANTLR4(IN[], OUT[], OUT_NOAUTO[], OUTPUT_INCLUDES[], REQUIREMENTS[], CWD="", Args...) {
PEERDIR(build/external_resources/antlr4)
- _RUN_JAVA(-jar $ANTLR4_RESOURCE_GLOBAL/antlr-4.9-complete.jar $Args IN $IN OUT $OUT OUT_NOAUTO $OUT_NOAUTO OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS ${pre=CWD :CWD})
+ _RUN_JAVA(-jar $ANTLR4_RESOURCE_GLOBAL/antlr-4.9-complete.jar $Args IN $IN OUT $OUT OUT_NOAUTO $OUT_NOAUTO OUTPUT_INCLUDES $OUTPUT_INCLUDES REQUIREMENTS $REQUIREMENTS ${pre=CWD :CWD})
}
_ANTLR4_LISTENER_GRAMMAR=-listener
@@ -7384,10 +7384,10 @@ macro TASKLET() {
PEERDIR(tasklet/api)
# CPP
- CPP_PROTO_PLUGIN(tasklet_cpp tasklet/gen/cpp .tasklet.h)
+ CPP_PROTO_PLUGIN(tasklet_cpp tasklet/gen/cpp .tasklet.h)
# Python
- PY_PROTO_PLUGIN2(tasklet_py _tasklet.py _sbtask.py tasklet/gen/python DEPS tasklet/domain/sandbox tasklet/runtime sandbox/sdk2)
+ PY_PROTO_PLUGIN2(tasklet_py _tasklet.py _sbtask.py tasklet/gen/python DEPS tasklet/domain/sandbox tasklet/runtime sandbox/sdk2)
#Java
JAVA_PROTO_PLUGIN(tasket_java tasklet/gen/java DEPS tasklet/runtime/java/lib $JAVA_GRPC_STUB $JAVA_GRPC_PROTOBUF)
@@ -7444,51 +7444,51 @@ macro EXPOSE(Args...) {
.CMD=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${output;suf=$_HASH_HELPER($Args).cpp:"empty_"} ${input;hide:Args}
}
-
+
# tag:proto
-macro _PROTO_DESC_CMD(File) {
- .CMD=${cwd;rootdir;input:File} $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --descriptor_set_out=${output;suf=.desc:File} --include_source_info ${input;rootrel:File}
-}
-
-_PROTO_DESC_MERGE_CMD=$YMAKE_PYTHON ${input:"build/scripts/merge_files.py"} $TARGET $AUTO_INPUT ${kv;hide:"p PD"} ${kv;hide:"pc light-cyan"}
-_PROTO_DESC_MERGE_PEERS_CMD=$YMAKE_PYTHON ${input:"build/scripts/merge_files.py"} $TARGET $PEERS $SRCS_GLOBAL ${kv;hide:"p PD"} ${kv;hide:"pc light-cyan"}
-
-NEED_GOOGLE_PROTO_PEERDIRS=yes
-
+macro _PROTO_DESC_CMD(File) {
+ .CMD=${cwd;rootdir;input:File} $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --descriptor_set_out=${output;suf=.desc:File} --include_source_info ${input;rootrel:File}
+}
+
+_PROTO_DESC_MERGE_CMD=$YMAKE_PYTHON ${input:"build/scripts/merge_files.py"} $TARGET $AUTO_INPUT ${kv;hide:"p PD"} ${kv;hide:"pc light-cyan"}
+_PROTO_DESC_MERGE_PEERS_CMD=$YMAKE_PYTHON ${input:"build/scripts/merge_files.py"} $TARGET $PEERS $SRCS_GLOBAL ${kv;hide:"p PD"} ${kv;hide:"pc light-cyan"}
+
+NEED_GOOGLE_PROTO_PEERDIRS=yes
+
PROTO_LIBRARY_SEM=$CPP_LIBRARY_SEM && target_proto_plugin cpp_styleguide ${tool:"contrib/tools/protoc/plugins/cpp_styleguide"}
-# tag:proto
-### @usage: PROTO_LIBRARY()
-###
-### Build some varian of protocol buffers library.
-###
-### The particular variant is selected based on where PEERDIR to PROTO_LIBRARY comes from.
-###
-### Now supported 5 variants: C++, Java, Python 2.x, Python 3.x and Go.
-### When PEERDIR comes from module for particular language appropriate variant is selected.
-### PROTO_LIBRARY also supports emission of GRPC code if GRPC() macro is specified.
-### Notes:
-### - Python versions emit C++ code in addition to Python as optimization.
-### - In some PROTO_LIBRARY-es Java or Python versions are excluded via EXCLUDE_TAGS macros due to incompatibilities.
-### - Use from DEPENDS or BUNDLE is not allowed
-###
-### Documentation: https://wiki.yandex-team.ru/yatool/proto_library/
-###
-### See: [GRPC()](#macro_GRPC), [OPTIMIZE_PY_PROTOS()](#macro_OPTIMIZE_PY_PROTOS), [INCLUDE_TAGS()](#macro_INCLUDE_TAGS), [EXCLUDE_TAGS()](#macro_EXCLUDE_TAGS)
-multimodule PROTO_LIBRARY {
- module CPP_PROTO : LIBRARY {
+# tag:proto
+### @usage: PROTO_LIBRARY()
+###
+### Build some varian of protocol buffers library.
+###
+### The particular variant is selected based on where PEERDIR to PROTO_LIBRARY comes from.
+###
+### Now supported 5 variants: C++, Java, Python 2.x, Python 3.x and Go.
+### When PEERDIR comes from module for particular language appropriate variant is selected.
+### PROTO_LIBRARY also supports emission of GRPC code if GRPC() macro is specified.
+### Notes:
+### - Python versions emit C++ code in addition to Python as optimization.
+### - In some PROTO_LIBRARY-es Java or Python versions are excluded via EXCLUDE_TAGS macros due to incompatibilities.
+### - Use from DEPENDS or BUNDLE is not allowed
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/proto_library/
+###
+### See: [GRPC()](#macro_GRPC), [OPTIMIZE_PY_PROTOS()](#macro_OPTIMIZE_PY_PROTOS), [INCLUDE_TAGS()](#macro_INCLUDE_TAGS), [EXCLUDE_TAGS()](#macro_EXCLUDE_TAGS)
+multimodule PROTO_LIBRARY {
+ module CPP_PROTO : LIBRARY {
.ALLOWED=EXPOSE
# TODO(svidyuk): think about marker which forces semantics inheritance
.SEM=PROTO_LIBRARY_SEM
ENABLE(CPP_PROTO)
ENABLE(GEN_PROTO)
NO_CLANG_TIDY()
- SET(PEERDIR_TAGS CPP_PROTO)
-
- when ($BUILD_PROTO_AS_EVLOG == "yes" && $USE_VANILLA_PROTOC == "yes") {
- _OK=no
- }
- ASSERT(_OK BUILD_PROTO_AS_EVLOG and USE_VANILLA_PROTOC are incompatible yet)
+ SET(PEERDIR_TAGS CPP_PROTO)
+
+ when ($BUILD_PROTO_AS_EVLOG == "yes" && $USE_VANILLA_PROTOC == "yes") {
+ _OK=no
+ }
+ ASSERT(_OK BUILD_PROTO_AS_EVLOG and USE_VANILLA_PROTOC are incompatible yet)
MODULE_SUFFIX=$_CPP_PROTO_MODULE_SUFFIX
MODULE_PREFIX=$_CPP_PROTO_MODULE_PREFIX
@@ -7496,31 +7496,31 @@ multimodule PROTO_LIBRARY {
when ($_COMMON_GOOGLE_APIS != "None") {
PEERDIR += contrib/libs/googleapis-common-protos
}
- }
-
- module JAVA_PROTO: EXTERNAL_JAVA_LIBRARY {
- .EXTS=.jsrc
- .ALLOWED=GRPC
+ }
+
+ module JAVA_PROTO: EXTERNAL_JAVA_LIBRARY {
+ .EXTS=.jsrc
+ .ALLOWED=GRPC
.SEM=ignored
- SET(PEERDIR_TAGS JAVA_PROTO)
+ SET(PEERDIR_TAGS JAVA_PROTO)
ENABLE(JAVA_PROTO)
PEERDIR+=$JAVA_PROTOBUF_PEERS contrib/java/javax/annotation/javax.annotation-api/1.3.1
.IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_SKIFF CPP_PROTO_PLUGIN2 PY_PROTO_PLUGIN YMAPS_SPROTO RESOURCE
- ADDINCL(FOR proto $PROTOBUF_PATH)
+ ADDINCL(FOR proto $PROTOBUF_PATH)
when ($_COMMON_GOOGLE_APIS != "None") {
PEERDIR += contrib/java/com/google/api/grpc/proto-google-common-protos/${JAVA_PROTO_COMMON_VERSION}
ADDINCL += FOR proto ${ARCADIA_ROOT}/contrib/libs/googleapis-common-protos
}
- }
-
+ }
+
module PY_PROTO: PY2_LIBRARY {
- .ALIASES=SRCS=PY_SRCS
+ .ALIASES=SRCS=PY_SRCS
.ALLOWED=OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
.PEERDIRSELF=CPP_PROTO
.SEM=ignored
- SET(PEERDIR_TAGS PY2 PY_PROTO)
+ SET(PEERDIR_TAGS PY2 PY_PROTO)
ENABLE(PY_PROTO)
OPTIMIZE_PY_PROTOS()
OBJ_SUF=.py2
@@ -7537,22 +7537,22 @@ multimodule PROTO_LIBRARY {
_IGNORE_PEERDIRSELF=CPP_PROTO
}
SET_APPEND(_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL $_CPP_PROTO_LIBRARY)
- }
-
- module PY3_PROTO: PY3_LIBRARY {
+ }
+
+ module PY3_PROTO: PY3_LIBRARY {
.ALIASES=SRCS=PY_SRCS
.ALLOWED=OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS
.PEERDIRSELF=CPP_PROTO
.SEM=ignored
- SET(PEERDIR_TAGS PY3 PY3_PROTO)
+ SET(PEERDIR_TAGS PY3 PY3_PROTO)
ENABLE(PY3_PROTO)
OPTIMIZE_PY_PROTOS()
- when ($MSVC == "yes" || $CYGWIN == "yes") {
- MODULE_PREFIX=py3
- }
- otherwise {
- MODULE_PREFIX=libpy3
- }
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_PREFIX=py3
+ }
+ otherwise {
+ MODULE_PREFIX=libpy3
+ }
OBJ_SUF=.py3
# Can not use NO_LINT(), because is not allowed outside of contrib directory
SET(LINT_LEVEL_VALUE none_internal)
@@ -7567,10 +7567,10 @@ multimodule PROTO_LIBRARY {
_IGNORE_PEERDIRSELF=CPP_PROTO
}
SET_APPEND(_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL $_CPP_PROTO_LIBRARY)
- }
+ }
module GO_PROTO: GO_LIBRARY {
- .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER YMAPS_SPROTO
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER YMAPS_SPROTO
.SEM=ignored
SET(PEERDIR_TAGS GO GO_PROTO)
ENABLE(GO_PROTO)
@@ -7587,7 +7587,7 @@ multimodule PROTO_LIBRARY {
}
}
- module EXT_PROTO: _BARE_UNIT {
+ module EXT_PROTO: _BARE_UNIT {
.ALIASES=SRCS=_RAW_PROTO_SRCS
.CMD=TOUCH_UNIT_MF
.SEM=ignored
@@ -7605,35 +7605,35 @@ multimodule PROTO_LIBRARY {
SET(CREDITS_FILE_EXTRA_EXT .ext_proto)
}
- module DESC_PROTO: _BARE_UNIT {
- .CMD=_PROTO_DESC_MERGE_CMD
+ module DESC_PROTO: _BARE_UNIT {
+ .CMD=_PROTO_DESC_MERGE_CMD
.SEM=ignored
- .EXTS=.desc
- .NODE_TYPE=Library
- .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER YMAPS_SPROTO RESOURCE GO_PROTO_PLUGIN GRPC
-
- SET(PEERDIR_TAGS DESC_PROTO)
- ENABLE(DESC_PROTO)
- MODULE_SUFFIX=.self.protodesc
- SET(MODULE_TYPE LIBRARY)
-
- MACRO_ALIAS(EVLOG_CMD _PROTO_DESC_CMD)
- MACRO_ALIAS(PROTO_CMD _PROTO_DESC_CMD)
-
- when ($_COMMON_GOOGLE_APIS != "None") {
- PEERDIR += contrib/libs/googleapis-common-protos
- }
-
- when ($NEED_GOOGLE_PROTO_PEERDIRS == "yes") {
- when ($USE_VANILLA_PROTOC == "yes") {
- PEERDIR += contrib/libs/protobuf_std/builtin_proto/protos_from_protobuf
- }
- otherwise {
- PEERDIR += contrib/libs/protobuf/builtin_proto/protos_from_protoc
- }
- }
- }
-
+ .EXTS=.desc
+ .NODE_TYPE=Library
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER YMAPS_SPROTO RESOURCE GO_PROTO_PLUGIN GRPC
+
+ SET(PEERDIR_TAGS DESC_PROTO)
+ ENABLE(DESC_PROTO)
+ MODULE_SUFFIX=.self.protodesc
+ SET(MODULE_TYPE LIBRARY)
+
+ MACRO_ALIAS(EVLOG_CMD _PROTO_DESC_CMD)
+ MACRO_ALIAS(PROTO_CMD _PROTO_DESC_CMD)
+
+ when ($_COMMON_GOOGLE_APIS != "None") {
+ PEERDIR += contrib/libs/googleapis-common-protos
+ }
+
+ when ($NEED_GOOGLE_PROTO_PEERDIRS == "yes") {
+ when ($USE_VANILLA_PROTOC == "yes") {
+ PEERDIR += contrib/libs/protobuf_std/builtin_proto/protos_from_protobuf
+ }
+ otherwise {
+ PEERDIR += contrib/libs/protobuf/builtin_proto/protos_from_protoc
+ }
+ }
+ }
+
module PB_PY_PROTO: _PY_PACKAGE {
.INCLUDE_TAG=no
.PROXY=yes
@@ -7645,7 +7645,7 @@ multimodule PROTO_LIBRARY {
# _COMMON_GOOGLE_APIS aren't handled intentionally.
# PB_PY_PROTO is a legacy module type, stop using it.
}
-}
+}
# tag:proto
_EXT_PROTO_DIR=_RAW_
@@ -7681,21 +7681,21 @@ macro _RAW_PROTO_SRCS(FILES...) {
}
module PROTO_DESCRIPTIONS: _BARE_UNIT {
- .CMD=_PROTO_DESC_MERGE_PEERS_CMD
- .PEERDIR_POLICY=as_build_from
- .NODE_TYPE=Library
- .RESTRICTED=SRCS
- .FINAL_TARGET=yes
-
- SET(PEERDIR_TAGS DESC_PROTO)
- SET(MODULE_SUFFIX .protodesc)
+ .CMD=_PROTO_DESC_MERGE_PEERS_CMD
+ .PEERDIR_POLICY=as_build_from
+ .NODE_TYPE=Library
+ .RESTRICTED=SRCS
+ .FINAL_TARGET=yes
+
+ SET(PEERDIR_TAGS DESC_PROTO)
+ SET(MODULE_SUFFIX .protodesc)
SET(MODULE_TYPE PROTO_DESCRIPTIONS)
}
module PROTO_REGISTRY: PROTO_DESCRIPTIONS {
- SET(MODULE_TYPE PROTO_REGISTRY)
-}
-
+ SET(MODULE_TYPE PROTO_REGISTRY)
+}
+
# tag:fbs
_FBS_NAMESPACE_MAP_GLOBAL=
@@ -7768,14 +7768,14 @@ multimodule FBS_LIBRARY {
}
# tag:java-specific
-_COMPILE_JSRC=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/compile_jsrc.py"} --input $AUTO_INPUT --output $TARGET --prefix $BINDIR ${requirements;hide:JAVA_REQUIREMENTS} ${kv;hide:"p JC"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+_COMPILE_JSRC=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/compile_jsrc.py"} --input $AUTO_INPUT --output $TARGET --prefix $BINDIR ${requirements;hide:JAVA_REQUIREMENTS} ${kv;hide:"p JC"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
# tag:java-specific
COMPILE_JSRC_MF=$_COMPILE_JSRC && $GENERATE_MF
# tag:java-specific tag:internal
### @usage: JSRC_LIBRARY() # internal
-module JSRC_LIBRARY: _BARE_UNIT {
+module JSRC_LIBRARY: _BARE_UNIT {
.CMD=COMPILE_JSRC_MF
.EXTS=.java
.ALL_INS_TO_OUT=no
@@ -7836,7 +7836,7 @@ module DLL_PROXY_LIBRARY: _PROXY_LIBRARY {
.CMD=_DLL_PROXY_LIBRARY_CMD
}
-_PREBUILT_PROGRAM_CMD=$GENERATE_MF && $COPY_CMD $_PRIMARY_OUTPUT_VALUE ${TARGET} ${kv;hide:"p ld"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+_PREBUILT_PROGRAM_CMD=$GENERATE_MF && $COPY_CMD $_PRIMARY_OUTPUT_VALUE ${TARGET} ${kv;hide:"p ld"} ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
# tag:internal
### @usage: PREBUILT_PROGRAM([programname]) # internal
@@ -8057,30 +8057,30 @@ macro _GO_COMPILE_SYMABIS(FLAGS[], ASM_FILES...) {
}
# tag:go-specific
-macro _GO_COMPILE_CGO1(NAME, FLAGS[], FILES...) {
+macro _GO_COMPILE_CGO1(NAME, FLAGS[], FILES...) {
.CMD=${hide:_GO_FAKEID} ${cwd:ARCADIA_ROOT} $YMAKE_PYTHON ${input:"build/scripts/cgo1_wrapper.py"} $_GO_CGO1_WRAPPER_FLAGS --build-root ${ARCADIA_BUILD_ROOT} --source-root ${ARCADIA_ROOT} --cgo1-files ${output;noext:FILES.cgo1.go} --cgo2-files ${output;noauto;noext:FILES.cgo2.c} -- ${GO_TOOLS_ROOT}/pkg/tool/${GO_HOST_OS}_${GO_HOST_ARCH}/cgo -objdir $BINDIR -importpath $NAME $GO_CGO1_FLAGS_VALUE $FLAGS -- $C_FLAGS_PLATFORM ${pre=-I:_C__INCLUDE} ${CGO_CFLAGS_VALUE} ${input:FILES} ${output;hide:"_cgo_export.h"} ${output;hide:"_cgo_export.c"} ${output;hide:"_cgo_gotypes.go"} ${output;noauto;hide:"_cgo_main.c"} ${output;noauto;hide:"_cgo_flags"} $GO_TOOLCHAIN_ENV ${kv;hide:"p go"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
}
# tag:go-specific
macro _GO_COMPILE_CGO2(NAME, C_FILES[], S_FILES[], OBJ_FILES[], FILES...) {
- .CMD=${hide:_GO_FAKEID} $C_COMPILER $C_FLAGS_PLATFORM ${pre=-I:_C__INCLUDE} $CGO_CFLAGS_VALUE ${input;tobindir:"_cgo_main.c"} -c -o ${tmp;noauto;suf=${OBJECT_SUF}:"_cgo_main.c"} && $C_COMPILER $C_FLAGS_PLATFORM ${pre=-I:_C__INCLUDE} -o ${tmp;noauto;suf=${OBJECT_SUF}:"_cgo_"} $LDFLAGS $LDFLAGS_GLOBAL $CGO2_LDFLAGS_VALUE ${input;hide:"_cgo_export.h"} ${tmp;noauto;suf=${OBJECT_SUF}:"_cgo_main.c"} ${input;suf=${OBJECT_SUF}:"_cgo_export.c"} ${input;nopath;noext;suf=.cgo2.c${OBJECT_SUF}:FILES} ${input;suf=${OBJECT_SUF}:C_FILES} ${input;suf=.o:S_FILES} ${input:OBJ_FILES} $CGO_LDFLAGS_VALUE && ${GO_TOOLS_ROOT}/pkg/tool/${GO_HOST_OS}_${GO_HOST_ARCH}/cgo -dynpackage $NAME -dynimport ${tmp;noauto;suf=${OBJECT_SUF}:"_cgo_"} -dynout ${output:"_cgo_import.go"} -dynlinker $GO_CGO2_FLAGS_VALUE $GO_TOOLCHAIN_ENV ${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p go"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
+ .CMD=${hide:_GO_FAKEID} $C_COMPILER $C_FLAGS_PLATFORM ${pre=-I:_C__INCLUDE} $CGO_CFLAGS_VALUE ${input;tobindir:"_cgo_main.c"} -c -o ${tmp;noauto;suf=${OBJECT_SUF}:"_cgo_main.c"} && $C_COMPILER $C_FLAGS_PLATFORM ${pre=-I:_C__INCLUDE} -o ${tmp;noauto;suf=${OBJECT_SUF}:"_cgo_"} $LDFLAGS $LDFLAGS_GLOBAL $CGO2_LDFLAGS_VALUE ${input;hide:"_cgo_export.h"} ${tmp;noauto;suf=${OBJECT_SUF}:"_cgo_main.c"} ${input;suf=${OBJECT_SUF}:"_cgo_export.c"} ${input;nopath;noext;suf=.cgo2.c${OBJECT_SUF}:FILES} ${input;suf=${OBJECT_SUF}:C_FILES} ${input;suf=.o:S_FILES} ${input:OBJ_FILES} $CGO_LDFLAGS_VALUE && ${GO_TOOLS_ROOT}/pkg/tool/${GO_HOST_OS}_${GO_HOST_ARCH}/cgo -dynpackage $NAME -dynimport ${tmp;noauto;suf=${OBJECT_SUF}:"_cgo_"} -dynout ${output:"_cgo_import.go"} -dynlinker $GO_CGO2_FLAGS_VALUE $GO_TOOLCHAIN_ENV ${requirements;hide:CC_REQUIREMENTS} ${kv;hide:"p go"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
_USE_LINKER()
}
# tag:go-specific
macro _GO_LINK_LIB_IMPL(CGO_FILES[], EXTRA_INPUTS[], GO_FILES...) {
- .CMD=${hide:_GO_FAKEID} $YMAKE_PYTHON ${input:"build/scripts/go_tool.py"} ${hide;input:EXTRA_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_FBS:PEERS} --ya-end-command-file ${requirements;hide:LIB_REQUIREMENTS} ${kv;hide:"p GO"} ${kv;hide:"pc light-red"} ${kv;hide:"show_out"}
+ .CMD=${hide:_GO_FAKEID} $YMAKE_PYTHON ${input:"build/scripts/go_tool.py"} ${hide;input:EXTRA_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_FBS:PEERS} --ya-end-command-file ${requirements;hide:LIB_REQUIREMENTS} ${kv;hide:"p GO"} ${kv;hide:"pc light-red"} ${kv;hide:"show_out"}
}
# tag:go-specific
macro _GO_LINK_EXE_IMPL(CGO_FILES[], EXTRA_INPUTS[], GO_FILES...) {
- .CMD=${hide:_GO_FAKEID} $YMAKE_PYTHON ${input:"build/scripts/go_tool.py"} ${hide;input:EXTRA_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++vcs $VCS_GO $GO_WITH_MUSL $GO_EXTLD ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_FBS:PEERS} ++non-local-peers ${rootrel;tags_in=GO|GO_PROTO|GO_FBS;tags_out=local:PEERS} ++cgo-peers ${VCS_C_OBJ_RR} ${rootrel;tags_out=GO|GO_PROTO|GO_FBS:PEERS} --ya-end-command-file ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"p LD"} ${kv;hide:"pc light-red"} ${kv;hide:"show_out"} $_GO_LINK_EXE_EXT_CMD
+ .CMD=${hide:_GO_FAKEID} $YMAKE_PYTHON ${input:"build/scripts/go_tool.py"} ${hide;input:EXTRA_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++vcs $VCS_GO $GO_WITH_MUSL $GO_EXTLD ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_FBS:PEERS} ++non-local-peers ${rootrel;tags_in=GO|GO_PROTO|GO_FBS;tags_out=local:PEERS} ++cgo-peers ${VCS_C_OBJ_RR} ${rootrel;tags_out=GO|GO_PROTO|GO_FBS:PEERS} --ya-end-command-file ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"p LD"} ${kv;hide:"pc light-red"} ${kv;hide:"show_out"} $_GO_LINK_EXE_EXT_CMD
}
# tag:go-specific
macro _GO_LINK_TEST_IMPL(CGO_FILES[], EXTRA_INPUTS[], GO_TEST_FILES[], GO_XTEST_FILES[], GO_FILES...) {
- .CMD=${hide:_GO_FAKEID} $YMAKE_PYTHON ${input:"build/scripts/go_tool.py"} ${hide;input:EXTRA_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++vcs $VCS_GO $GO_WITH_MUSL $GO_EXTLD ++test-miner $GO_TEST_MINER ++test-import-path $GO_TEST_IMPORT_PATH ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_FBS:PEERS} ++non-local-peers ${rootrel;tags_in=GO|GO_PROTO|GO_FBS;tags_out=local:PEERS} ++cgo-peers ${VCS_C_OBJ_RR} ${rootrel;tags_out=GO|GO_PROTO|GO_FBS:PEERS} ++test_srcs ${input:GO_TEST_FILES} ++xtest_srcs ${input:GO_XTEST_FILES} ++cover_info $GO_COVER_INFO_VALUE ++skip-tests $_GO_SKIP_TEST_VALUE --ya-end-command-file ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"p GO"} ${kv;hide:"pc light-red"} ${kv;hide:"show_out"}
+ .CMD=${hide:_GO_FAKEID} $YMAKE_PYTHON ${input:"build/scripts/go_tool.py"} ${hide;input:EXTRA_INPUTS} --ya-start-command-file $_GO_TOOL_COMMON_FLAGS ++vcs $VCS_GO $GO_WITH_MUSL $GO_EXTLD ++test-miner $GO_TEST_MINER ++test-import-path $GO_TEST_IMPORT_PATH ++peers ${rootrel;tags_in=local,GO|local,GO_PROTO|local,GO_FBS:PEERS} ++non-local-peers ${rootrel;tags_in=GO|GO_PROTO|GO_FBS;tags_out=local:PEERS} ++cgo-peers ${VCS_C_OBJ_RR} ${rootrel;tags_out=GO|GO_PROTO|GO_FBS:PEERS} ++test_srcs ${input:GO_TEST_FILES} ++xtest_srcs ${input:GO_XTEST_FILES} ++cover_info $GO_COVER_INFO_VALUE ++skip-tests $_GO_SKIP_TEST_VALUE --ya-end-command-file ${requirements;hide:LD_REQUIREMENTS} ${kv;hide:"p GO"} ${kv;hide:"pc light-red"} ${kv;hide:"show_out"}
}
# tag:go-specific
@@ -8097,8 +8097,8 @@ when ($OS_WINDOWS == "yes" || $SANITIZER_TYPE && $SANITIZER_TYPE != "no") {
# tag:go-specific
GO_PACKAGE_VALUE=
-### @usage: GO_PACKAGE_NAME(Name)
-### Override name of a Go package.
+### @usage: GO_PACKAGE_NAME(Name)
+### Override name of a Go package.
macro GO_PACKAGE_NAME(NAME) {
SET(GO_PACKAGE_VALUE $NAME)
}
@@ -8106,40 +8106,40 @@ macro GO_PACKAGE_NAME(NAME) {
# tag:go-specific tag:internal
_GO_SRCS_VALUE=
### @usage: _GO_SRCS(Files...) # internal
-### This macro shouldn't be used in ya.make files, use SRCS() instead.
-### This is internal macro collecting .go sources for processing within Go modules (GO_PROGRAM and GO_LIBRARY)
+### This macro shouldn't be used in ya.make files, use SRCS() instead.
+### This is internal macro collecting .go sources for processing within Go modules (GO_PROGRAM and GO_LIBRARY)
macro _GO_SRCS(FILES...) {
- GO_FAKE_OUTPUT($FILES)
+ GO_FAKE_OUTPUT($FILES)
SET_APPEND(_GO_SRCS_VALUE $FILES)
}
# tag:go-specific
_GO_TEST_SRCS_VALUE=
-### @usage: GO_TEST_SRCS(Files...)
-### .go sources for internal tests of a module
+### @usage: GO_TEST_SRCS(Files...)
+### .go sources for internal tests of a module
macro GO_TEST_SRCS(FILES...) {
- GO_FAKE_OUTPUT($FILES)
+ GO_FAKE_OUTPUT($FILES)
SET_APPEND(_GO_TEST_SRCS_VALUE $FILES)
}
# tag:go-specific
_GO_XTEST_SRCS_VALUE=
-### @usage: GO_XTEST_SRCS(Files...)
-### .go sources for external tests of a module
+### @usage: GO_XTEST_SRCS(Files...)
+### .go sources for external tests of a module
macro GO_XTEST_SRCS(FILES...) {
- GO_FAKE_OUTPUT($FILES)
+ GO_FAKE_OUTPUT($FILES)
SET_APPEND(_GO_XTEST_SRCS_VALUE $FILES)
}
# tag:go-specific
-macro _GO_UNUSED_SRCS(FLAGS...) {
+macro _GO_UNUSED_SRCS(FLAGS...) {
ENABLE(UNUSED_MACRO)
}
# tag:go-specific
_CGO_SRCS_VALUE=
-### @usage: CGO_SRCS(Files...)
-### .go sources to be built with CGO
+### @usage: CGO_SRCS(Files...)
+### .go sources to be built with CGO
macro CGO_SRCS(FILES...) {
SET_APPEND(_CGO_SRCS_VALUE $FILES)
PEERDIR(${GOSTD}/syscall)
@@ -8147,16 +8147,16 @@ macro CGO_SRCS(FILES...) {
# tag:go-specific
GO_LDFLAGS_GLOBAL=
-### @usage: GO_LDFLAGS(Flags...)
-### Link flags for GO_PROGRAM linking from .go sources
+### @usage: GO_LDFLAGS(Flags...)
+### Link flags for GO_PROGRAM linking from .go sources
macro GO_LDFLAGS(FLAGS...) {
SET_APPEND(GO_LDFLAGS_GLOBAL $FLAGS)
}
# tag:go-specific
CGO_CFLAGS_VALUE=
-### @usage: CGO_CFLAGS(Flags...)
-### Compiler flags specific to CGO compilation
+### @usage: CGO_CFLAGS(Flags...)
+### Compiler flags specific to CGO compilation
macro CGO_CFLAGS(FLAGS...) {
SET_APPEND(CGO_CFLAGS_VALUE $FLAGS)
CFLAGS($FLAGS)
@@ -8164,8 +8164,8 @@ macro CGO_CFLAGS(FLAGS...) {
# tag:go-specific
CGO_LDFLAGS_VALUE=
-### @usage: CGO_LDFLAGS(Files...)
-### Linker flags specific to CGO linking
+### @usage: CGO_LDFLAGS(Files...)
+### Linker flags specific to CGO linking
macro CGO_LDFLAGS(FLAGS...) {
SET_APPEND(CGO_LDFLAGS_VALUE $FLAGS)
GO_LDFLAGS($FLAGS)
@@ -8293,13 +8293,13 @@ _GO_GRPC_WELLKNOWN=\
vendor/google.golang.org/grpc/status
# tag:go-specific
-macro _GO_GRPC() {
+macro _GO_GRPC() {
SET(GO_PROTO_GEN_PLUGINS grpc)
PEERDIR(${GOSTD}/context ${_GO_GRPC_WELLKNOWN})
}
# tag:go-specific
-### @usage: GO_GRPC_GATEWAY_SRCS()
+### @usage: GO_GRPC_GATEWAY_SRCS()
###
### Use of grpc-gateway plugin (Supported for Go only).
macro GO_GRPC_GATEWAY_SRCS(FILE...) {
@@ -8307,21 +8307,21 @@ macro GO_GRPC_GATEWAY_SRCS(FILE...) {
}
# tag:go-specific
-### @usage: GO_GRPC_GATEWAY_SWAGGER_SRCS()
-###
-### Use of grpc-gateway plugin w/ swagger emission (Supported for Go only).
-macro GO_GRPC_GATEWAY_SWAGGER_SRCS(FILE...) {
- PEERDIR(vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options)
-}
-
+### @usage: GO_GRPC_GATEWAY_SWAGGER_SRCS()
+###
+### Use of grpc-gateway plugin w/ swagger emission (Supported for Go only).
+macro GO_GRPC_GATEWAY_SWAGGER_SRCS(FILE...) {
+ PEERDIR(vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options)
+}
+
# tag:go-specific
_GO_PROTO_GRPC_GATEWAY_OPTS=
_GO_PROTO_GRPC_GATEWAY_OUTS=
# tag:go-specific
-macro _GO_GRPC_GATEWAY_SRCS_IMPL(Files...) {
+macro _GO_GRPC_GATEWAY_SRCS_IMPL(Files...) {
foreach (File : $Files) {
- [.proto]=$_GO_PROTO_CMD_IMPL($File OPTS $_GO_PROTO_GRPC_GATEWAY_OPTS OUTS $_GO_PROTO_GRPC_GATEWAY_OUTS)
+ [.proto]=$_GO_PROTO_CMD_IMPL($File OPTS $_GO_PROTO_GRPC_GATEWAY_OPTS OUTS $_GO_PROTO_GRPC_GATEWAY_OUTS)
}
PEERDIR(${GOSTD}/context ${GOSTD}/io ${GOSTD}/net/http)
@@ -8332,27 +8332,27 @@ macro _GO_GRPC_GATEWAY_SRCS_IMPL(Files...) {
}
# tag:go-specific
-macro _SETUP_GO_GRPC_GATEWAY() {
+macro _SETUP_GO_GRPC_GATEWAY() {
SET(_GO_PROTO_GRPC_GATEWAY_OPTS $_PROTO_PLUGIN_ARGS_BASE(go_grpc_gw vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway allow_repeated_fields_in_body=true:))
- SET(_GO_PROTO_GRPC_GATEWAY_OUTS \${output;hide;norel;nopath;noext;suf=.pb.gw.go:File})
-}
-
+ SET(_GO_PROTO_GRPC_GATEWAY_OUTS \${output;hide;norel;nopath;noext;suf=.pb.gw.go:File})
+}
+
# tag:go-specific
-macro _GO_GRPC_GATEWAY_SRCS(Files...) {
- _SETUP_GO_GRPC_GATEWAY()
- _GO_GRPC_GATEWAY_SRCS_IMPL($Files)
-}
-
+macro _GO_GRPC_GATEWAY_SRCS(Files...) {
+ _SETUP_GO_GRPC_GATEWAY()
+ _GO_GRPC_GATEWAY_SRCS_IMPL($Files)
+}
+
# tag:go-specific
-macro _GO_GRPC_GATEWAY_SWAGGER_SRCS(Files...) {
- _SETUP_GO_GRPC_GATEWAY()
- SET_APPEND(_GO_PROTO_GRPC_GATEWAY_OPTS $_PROTO_PLUGIN_ARGS_BASE(swagger vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger logtostderr=true:))
- SET_APPEND(_GO_PROTO_GRPC_GATEWAY_OUTS \${output;hide;norel;noauto;nopath;noext;suf=.swagger.json:File})
-
- _GO_GRPC_GATEWAY_SRCS_IMPL($Files)
- PEERDIR(vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options)
-}
-
+macro _GO_GRPC_GATEWAY_SWAGGER_SRCS(Files...) {
+ _SETUP_GO_GRPC_GATEWAY()
+ SET_APPEND(_GO_PROTO_GRPC_GATEWAY_OPTS $_PROTO_PLUGIN_ARGS_BASE(swagger vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger logtostderr=true:))
+ SET_APPEND(_GO_PROTO_GRPC_GATEWAY_OUTS \${output;hide;norel;noauto;nopath;noext;suf=.swagger.json:File})
+
+ _GO_GRPC_GATEWAY_SRCS_IMPL($Files)
+ PEERDIR(vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options)
+}
+
# tag:go-specific
when ($MUSL == "yes") {
_GO_DEFAULT_ALLOCATOR=$DEFAULT_ALLOCATOR
@@ -8360,12 +8360,12 @@ when ($MUSL == "yes") {
otherwise {
_GO_DEFAULT_ALLOCATOR=FAKE
}
-
+
# tag:go-specific tag:internal
-### @usage _GO_BASE_UNIT # internal
-###
+### @usage _GO_BASE_UNIT # internal
+###
### The base module of all golang modules. Defines common properties, dependencies and rules for go build.
-module _GO_BASE_UNIT: _BASE_UNIT {
+module _GO_BASE_UNIT: _BASE_UNIT {
.EXTS=.go .gosrc .o .obj .a .symabis .mf
.CMD=TOUCH_UNIT
.NODE_TYPE=Bundle
@@ -8373,7 +8373,7 @@ module _GO_BASE_UNIT: _BASE_UNIT {
.PEERDIR_POLICY=as_build_from
.ALIASES=SRCS=_GO_SRCS RESOURCE=_GO_RESOURCE GO_TEST_SRCS=_GO_UNUSED_SRCS GO_XTEST_SRCS=_GO_UNUSED_SRCS GRPC=_GO_GRPC GO_GRPC_GATEWAY_SRCS=_GO_GRPC_GATEWAY_SRCS GO_GRPC_GATEWAY_SWAGGER_SRCS=_GO_GRPC_GATEWAY_SWAGGER_SRCS CFLAGS=CGO_CFLAGS GO_TEST_EMBED_PATTERN=_GO_UNUSED_SRCS GO_XTEST_EMBED_PATTERN=_GO_UNUSED_SRCS GO_TEST_EMBED_DIR=_GO_UNUSED_SRCS GO_XTEST_EMBED_DIR=_GO_UNUSED_SRCS
.ALLOWED=GO_PROTO_PLUGIN USE_CXX USE_UTIL RESOURCE_FILES
- .IGNORED=GO_SKIP_TESTS USE_SKIFF
+ .IGNORED=GO_SKIP_TESTS USE_SKIFF
ENABLE(_GO_MODULE)
SET(MODULE_TAG GO)
@@ -8524,16 +8524,16 @@ module _GO_BASE_UNIT: _BASE_UNIT {
}
# tag:go-specific
-### @usage: GO_LIBRARY([name])
-###
-### Go library module definition.
-### Compile Go module as a library suitable for PEERDIR from other Go modules.
-### Will select Go implementation on PEERDIR to PROTO_LIBRARY.
-module GO_LIBRARY: _GO_BASE_UNIT {
+### @usage: GO_LIBRARY([name])
+###
+### Go library module definition.
+### Compile Go module as a library suitable for PEERDIR from other Go modules.
+### Will select Go implementation on PEERDIR to PROTO_LIBRARY.
+module GO_LIBRARY: _GO_BASE_UNIT {
.CMD=GO_LINK_LIB
.NODE_TYPE=Bundle
- .FINAL_TARGET=no
- .ALIASES=GO_REQUIREMENTS=LIB_REQUIREMENTS
+ .FINAL_TARGET=no
+ .ALIASES=GO_REQUIREMENTS=LIB_REQUIREMENTS
SET(_GO_TOOL_MODE lib)
SET(MODULE_TYPE LIBRARY)
_REQUIRE_EXPLICIT_LICENSE(vendor)
@@ -8542,25 +8542,25 @@ module GO_LIBRARY: _GO_BASE_UNIT {
}
# tag:go-specific
-### @usage: GO_PROGRAM([name])
-###
-### Go program module definition.
-### Compile and link Go module to an executable program.
-### Will select Go implementation on PEERDIR to PROTO_LIBRARY.
-module GO_PROGRAM: _GO_BASE_UNIT {
+### @usage: GO_PROGRAM([name])
+###
+### Go program module definition.
+### Compile and link Go module to an executable program.
+### Will select Go implementation on PEERDIR to PROTO_LIBRARY.
+module GO_PROGRAM: _GO_BASE_UNIT {
.CMD=GO_LINK_EXE
.NODE_TYPE=Bundle
.SYMLINK_POLICY=EXE
.ALLOWED=INDUCED_DEPS
- .FINAL_TARGET=yes
- .ALIASES=GO_REQUIREMENTS=LD_REQUIREMENTS
+ .FINAL_TARGET=yes
+ .ALIASES=GO_REQUIREMENTS=LD_REQUIREMENTS
SET(_GO_TOOL_MODE exe)
SET(MODULE_TYPE PROGRAM)
SET(GO_VET_OUTPUT_INFO)
ALLOCATOR($_GO_DEFAULT_ALLOCATOR)
- _USE_LINKER()
+ _USE_LINKER()
ENABLE(COMMON_LINK_SETTINGS)
@@ -8640,17 +8640,17 @@ macro GO_BENCH_TIMEOUT(bench_timeout) {
}
# tag:go-specific tag:test
-### @usage: GO_TEST([name])
-###
-### Go test module definition.
-### Compile and link Go module as a test suitable for running with Arcadia testing support.
-### All usual testing support macros like DATA, DEPENDS, SIZE, REQUIREMENTS etc. are supported.
-### Will select Go implementation on PEERDIR to PROTO_LIBRARY.
+### @usage: GO_TEST([name])
+###
+### Go test module definition.
+### Compile and link Go module as a test suitable for running with Arcadia testing support.
+### All usual testing support macros like DATA, DEPENDS, SIZE, REQUIREMENTS etc. are supported.
+### Will select Go implementation on PEERDIR to PROTO_LIBRARY.
module GO_TEST: GO_PROGRAM {
.CMD=GO_LINK_TEST
.ALIASES=GO_TEST_SRCS=GO_TEST_SRCS GO_XTEST_SRCS=GO_XTEST_SRCS GO_TEST_EMBED_PATTERN=GO_TEST_EMBED_PATTERN GO_XTEST_EMBED_PATTERN=GO_XTEST_EMBED_PATTERN GO_TEST_EMBED_DIR=GO_TEST_EMBED_DIR GO_XTEST_EMBED_DIR=GO_XTEST_EMBED_DIR
.ALLOWED=GO_SKIP_TESTS YT_SPEC
- .FINAL_TARGET=no
+ .FINAL_TARGET=no
SET(_GO_TOOL_MODE test)
SET(MODULE_TYPE PROGRAM)
ENABLE(GO_TEST_MODULE)
@@ -8663,8 +8663,8 @@ module GO_TEST: GO_PROGRAM {
PEERDIR(${GOSTD}/testing/internal/testdeps)
PEERDIR(${GOSTD}/testing)
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME go.test)
- ADD_YTEST($MODULE_PREFIX$REALPRJNAME go.bench)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME go.test)
+ ADD_YTEST($MODULE_PREFIX$REALPRJNAME go.bench)
SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json)
}
@@ -8711,63 +8711,63 @@ macro JAVA_IGNORE_CLASSPATH_CLASH_FOR(Args...) {
}
# tag:python-specific
-### @usage: PY_SRCS({| CYTHON_C} { | TOP_LEVEL | NAMESPACE ns} Files...)
-###
+### @usage: PY_SRCS({| CYTHON_C} { | TOP_LEVEL | NAMESPACE ns} Files...)
+###
### Build specified Python sources according to Arcadia binary Python build. Basically creates precompiled and source resources keyed with module paths.
-### The resources eventually are linked into final program and can be accessed as regular Python modules.
+### The resources eventually are linked into final program and can be accessed as regular Python modules.
### This custom loader linked into the program will add them to sys.meta_path.
-###
-### PY_SRCS also support .proto, .ev, .pyx and .swg files. The .proto and .ev are compiled to .py-code by protoc and than handled as usual .py files.
-### .pyx and .swg lead to C/C++ Python extensions generation, that are automatically registered in Python as built-in modules.
-###
-### By default .pyx files are built as C++-extensions. Use CYTHON_C to build them as C (similar to BUILDWITH_CYTHON_C, but with the ability to specify namespace).
-###
-### __init__.py never required, but if present (and specified in PY_SRCS), it will be imported when you import package modules with __init__.py Oh.
-###
-### @example
-###
+###
+### PY_SRCS also support .proto, .ev, .pyx and .swg files. The .proto and .ev are compiled to .py-code by protoc and than handled as usual .py files.
+### .pyx and .swg lead to C/C++ Python extensions generation, that are automatically registered in Python as built-in modules.
+###
+### By default .pyx files are built as C++-extensions. Use CYTHON_C to build them as C (similar to BUILDWITH_CYTHON_C, but with the ability to specify namespace).
+###
+### __init__.py never required, but if present (and specified in PY_SRCS), it will be imported when you import package modules with __init__.py Oh.
+###
+### @example
+###
### PY2_LIBRARY(mymodule)
-### PY_SRCS(a.py sub/dir/b.py e.proto sub/dir/f.proto c.pyx sub/dir/d.pyx g.swg sub/dir/h.swg)
-### END()
-###
-### PY_SRCS honors Python2 and Python3 differences and adjusts itself to Python version of a current module.
+### PY_SRCS(a.py sub/dir/b.py e.proto sub/dir/f.proto c.pyx sub/dir/d.pyx g.swg sub/dir/h.swg)
+### END()
+###
+### PY_SRCS honors Python2 and Python3 differences and adjusts itself to Python version of a current module.
### PY_SRCS can be used in any Arcadia Python build modules like PY*_LIBRARY, PY*_PROGRAM, PY*TEST.
### PY_SRCS in LIBRARY or PROGRAM effectively converts these into PY2_LIBRARY and PY2_PROGRAM respectively.
-### It is strongly advised to make this conversion explicit. Never use PY_SRCS in a LIBRARY if you plan to use it from external Python extension module.
-###
-### Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipylibrarypy3libraryimakrospysrcs
-macro PY_SRCS() {
- DEFAULT(MODULE_TAG PY2)
- DEFAULT(PYTHON2 yes)
- DEFAULT(PYTHON3 no)
-}
-
+### It is strongly advised to make this conversion explicit. Never use PY_SRCS in a LIBRARY if you plan to use it from external Python extension module.
+###
+### Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipylibrarypy3libraryimakrospysrcs
+macro PY_SRCS() {
+ DEFAULT(MODULE_TAG PY2)
+ DEFAULT(PYTHON2 yes)
+ DEFAULT(PYTHON3 no)
+}
+
# tag:python-specific
-_ALL_PY_FILES=
-
+_ALL_PY_FILES=
+
# tag:python-specific
-macro _ALL_PY_SRCS2(TOP_LEVEL?"TOP_LEVEL":"", RECURSIVE?"/**":"", NAMESPACE[], REST[]) {
- _GLOB(_ALL_PY_FILES ${suf=${RECURSIVE}/*.py:REST} ${suf=${RECURSIVE}/ya.make:REST} EXCLUDE ya.make)
- PY_SRCS(_MR ${pre=NAMESPACE :NAMESPACE} ${TOP_LEVEL} $_ALL_PY_FILES)
-}
-
+macro _ALL_PY_SRCS2(TOP_LEVEL?"TOP_LEVEL":"", RECURSIVE?"/**":"", NAMESPACE[], REST[]) {
+ _GLOB(_ALL_PY_FILES ${suf=${RECURSIVE}/*.py:REST} ${suf=${RECURSIVE}/ya.make:REST} EXCLUDE ya.make)
+ PY_SRCS(_MR ${pre=NAMESPACE :NAMESPACE} ${TOP_LEVEL} $_ALL_PY_FILES)
+}
+
# tag:python-specific
-### @usage: ALL_PY_SRCS([RECURSIVE] { | TOP_LEVEL | NAMESPACE ns} [Dirs...])
-###
-### Puts all .py-files from given Dirs (relative to projects') into PY_SRCS of the current module.
-### If Dirs is ommitted project directory is used
-###
-### `RECURSIVE` makes lookup recursive with resprect to Dirs
-### `TOP_LEVEL` and `NAMESPACE` are forwarded to `PY_SRCS`
-###
-### Note: Only one such macro per module is allowed
-### Note: Macro is designed to reject any ya.make files in Dirs except current one
-###
-### @see [PY_SRCS()](#macro_PY_SRCS)
-macro ALL_PY_SRCS(TOP_LEVEL?"TOP_LEVEL":"", NAMESPACE="", RECURSIVE?"RECURSIVE":"", Files...) {
- _ALL_PY_SRCS2(${pre=NAMESPACE :NAMESPACE} ${TOP_LEVEL} ${RECURSIVE} REST .${pre=/:Files})
-}
-
+### @usage: ALL_PY_SRCS([RECURSIVE] { | TOP_LEVEL | NAMESPACE ns} [Dirs...])
+###
+### Puts all .py-files from given Dirs (relative to projects') into PY_SRCS of the current module.
+### If Dirs is ommitted project directory is used
+###
+### `RECURSIVE` makes lookup recursive with resprect to Dirs
+### `TOP_LEVEL` and `NAMESPACE` are forwarded to `PY_SRCS`
+###
+### Note: Only one such macro per module is allowed
+### Note: Macro is designed to reject any ya.make files in Dirs except current one
+###
+### @see [PY_SRCS()](#macro_PY_SRCS)
+macro ALL_PY_SRCS(TOP_LEVEL?"TOP_LEVEL":"", NAMESPACE="", RECURSIVE?"RECURSIVE":"", Files...) {
+ _ALL_PY_SRCS2(${pre=NAMESPACE :NAMESPACE} ${TOP_LEVEL} ${RECURSIVE} REST .${pre=/:Files})
+}
+
# tag:python-specific
_PY_EXTRA_LINT_FILES_VALUE=
### @usage: PY_EXTRA_LINT_FILES(files...)
@@ -8779,46 +8779,46 @@ macro PY_EXTRA_LINT_FILES(FILES...) {
}
# tag:python-specific
-### @usage: PY23_LIBRARY([name])
-###
+### @usage: PY23_LIBRARY([name])
+###
### Build PY2_LIBRARY or PY3_LIBRARY depending on incoming PEERDIR.
-### Direct build or build by RECURSE creates both variants.
-### This multimodule doesn't define any final targets, so use from DEPENDS or BUNDLE is not allowed.
-###
-### Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs
-multimodule PY23_LIBRARY {
+### Direct build or build by RECURSE creates both variants.
+### This multimodule doesn't define any final targets, so use from DEPENDS or BUNDLE is not allowed.
+###
+### Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs
+multimodule PY23_LIBRARY {
module PY2: PY2_LIBRARY {
- OBJ_SUF=.py2
+ OBJ_SUF=.py2
RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
- }
- module PY3: PY3_LIBRARY {
+ }
+ module PY3: PY3_LIBRARY {
RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
- when ($MSVC == "yes" || $CYGWIN == "yes") {
- MODULE_PREFIX=py3
- }
- otherwise {
- MODULE_PREFIX=libpy3
- }
- OBJ_SUF=.py3
- }
-}
+ when ($MSVC == "yes" || $CYGWIN == "yes") {
+ MODULE_PREFIX=py3
+ }
+ otherwise {
+ MODULE_PREFIX=libpy3
+ }
+ OBJ_SUF=.py3
+ }
+}
# tag:python-specific
-### @usage: PY23_NATIVE_LIBRARY([name])
-###
+### @usage: PY23_NATIVE_LIBRARY([name])
+###
### Build LIBRARY compatible with either Python 2.x or Python 3.x depending on incoming PEERDIR.
-###
+###
### This multimodule doesn't depend on Arcadia Python binary build. It is intended only for C++ code and cannot contain PY_SRCS and USE_PYTHON2 macros.
### Use these multimodule instead of PY23_LIBRARY if the C++ extension defined in it will be used in PY2MODULE.
### While it doesn't bring Arcadia Python dependency itself, it is still compatible with Arcadia Python build and can be PEERDIR-ed from PY2_LIBRARY and alikes.
-### Proper version will be selected according to Python version of the module PEERDIR comes from.
-###
-### This mulrtimodule doesn't define any final targets so cannot be used from DEPENDS or BUNDLE macros.
-###
-### For more information read https://wiki.yandex-team.ru/arcadia/python/pysrcs/#pysrcssrcsipy23nativelibrary
-###
+### Proper version will be selected according to Python version of the module PEERDIR comes from.
+###
+### This mulrtimodule doesn't define any final targets so cannot be used from DEPENDS or BUNDLE macros.
+###
+### For more information read https://wiki.yandex-team.ru/arcadia/python/pysrcs/#pysrcssrcsipy23nativelibrary
+###
### @see [LIBRARY()](#module_LIBRARY), [PY2MODULE()](#module_PY2MODULE)
-multimodule PY23_NATIVE_LIBRARY {
+multimodule PY23_NATIVE_LIBRARY {
module PY2: LIBRARY {
.RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3 PYTHON3_ADDINCL
OBJ_SUF=.py2
@@ -8854,7 +8854,7 @@ macro _SRC("xib", SRC, SRCFLAGS...) {
ACTOOL_PATH=$XCODE_TOOLS_ROOT_RESOURCE_GLOBAL/Xcode/Contents/Developer/usr/bin/ibtool
# tag:ios-specific
-ASSETS_FLAGS=--output-format human-readable-text --notices --warnings
+ASSETS_FLAGS=--output-format human-readable-text --notices --warnings
macro _IOS_ASSETS(AssetsDir, Content...) {
.CMD=$FS_TOOLS md $BINDIR/$REALPRJNAME && $ACTOOL_PATH $ASSETS_FLAGS --export-dependency-info $BINDIR/assetcatalog_dependencies --output-partial-info-plist ${output:"assetcatalog_generated_info.partial_plist"} --product-type com.apple.product-type.application --compile $BINDIR/$REALPRJNAME $AssetsDir ${input;hide:Content} && ${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/tar_directory.py"} ${output;suf=_assetes.resource_tar:REALPRJNAME} $REALPRJNAME $REALPRJNAME
}
@@ -8883,7 +8883,7 @@ DELIM=__DELIM__
PACK_IOS_ARCHIVE=$GENERATE_MF && $YMAKE_PYTHON ${input:"build/scripts/ios_wrapper.py"} bin $IBTOOL_PATH $TARGET $REALPRJNAME $BINDIR $DELIM $AUTO_INPUT $DELIM $STORYBOARD_FLAGS
### @usage: IOS_INTERFACE()
### iOS GUI module definition
-module IOS_INTERFACE: _BARE_UNIT {
+module IOS_INTERFACE: _BARE_UNIT {
.CMD=PACK_IOS_ARCHIVE
.EXTS=.compiled_storyboard_tar .partial_plist .plist .xcent .nib .resource_tar .signed_resource_tar .strings_tar .plist_json
.NODE_TYPE=Library
@@ -8964,7 +8964,7 @@ otherwise {
###
### Recursively collect files with typical frontend extensions from Dir and save the result into variable Varname
macro COLLECT_FRONTEND_FILES(Varname, Dir) {
- _GLOB($Varname $Dir/**/*.(css|ejs|jpg|js|jsx|png|styl|svg|ts|tsx|json|html))
+ _GLOB($Varname $Dir/**/*.(css|ejs|jpg|js|jsx|png|styl|svg|ts|tsx|json|html))
}
# tag:java-specific
@@ -9016,7 +9016,7 @@ when ($OPENGL_REQUIRED) {
# tag:python-specific
multimodule PY23_TEST {
- module PY2 : PYTEST_BIN {
+ module PY2 : PYTEST_BIN {
MODULE_PREFIX=py2_
OBJ_SUF=.py2
CANONIZE_SUB_PATH=py2test
@@ -9029,7 +9029,7 @@ multimodule PY23_TEST {
RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
}
- module PY3TEST_LIBRARY: _PY3_LIBRARY {
+ module PY3TEST_LIBRARY: _PY3_LIBRARY {
PEERDIR+=library/python/pytest
_REQUIRE_EXPLICIT_LICENSE()
RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT
@@ -9146,14 +9146,14 @@ CONTAINER_LAYER_CMD=$YMAKE_PYTHON ${input:"devtools/experimental/solar/selfconta
CONTAINER_CMD=$YMAKE_PYTHON ${input:"devtools/experimental/solar/selfcontainer/scripts/make_container.py"} -o $TARGET ${rootrel:PEERS} ${cwd:ARCADIA_BUILD_ROOT} ${kv;hide:"p CN"} ${kv;hide:"pc blue"}
# tag:external-build
-module CONTAINER_LAYER: _BARE_UNIT {
+module CONTAINER_LAYER: _BARE_UNIT {
.CMD=CONTAINER_LAYER_CMD
MODULE_SUFFIX=.container_layer
}
# tag:external-build
-module CONTAINER: _BARE_UNIT {
+module CONTAINER: _BARE_UNIT {
.NODE_TYPE=Bundle
.PEERDIR_POLICY=as_build_from
.FINAL_TARGET=yes
@@ -9241,14 +9241,14 @@ MCU_LINK_EXE=$LINK_EXE && $_MCU_CONVERT($MODULE_PREFIX$REALPRJNAME)
module MCU_PROGRAM: PROGRAM {
.CMD=MCU_LINK_EXE
}
-
+
# tag:deprecated
-### @usage: METAQUERYFILES(filenames...) #deprecated
-###
-### This macro does nothing and will be removed
-macro METAQUERYFILES(Files...) {
- ENABLE(UNUSED_MACRO)
-}
+### @usage: METAQUERYFILES(filenames...) #deprecated
+###
+### This macro does nothing and will be removed
+macro METAQUERYFILES(Files...) {
+ ENABLE(UNUSED_MACRO)
+}
# tag:flags tag:internal tag:windows-specific
### @usage: _MSVC_FLAGS_WINDOWS_IMPL(target_platform compiler_flags) # internal
@@ -9266,13 +9266,13 @@ macro _MSVC_FLAGS_WINDOWS_IMPL(WINDOWS[], FLAGS...) {
macro MSVC_FLAGS(FLAGS...) {
_MSVC_FLAGS_WINDOWS_IMPL($TARGET_PLATFORM $FLAGS)
}
-
-### @usage: COLLECT_YDB_API_SPECS_LEGACY(VarName Paths...) #deprecated
-###
+
+### @usage: COLLECT_YDB_API_SPECS_LEGACY(VarName Paths...) #deprecated
+###
### This macro is ugly hack for legacy YDB go API codegen, any other uses are prohibited
-macro COLLECT_YDB_API_SPECS_LEGACY(FILES_VAR, PATHS...) {
- _GLOB($FILES_VAR ${suf=/*.proto:PATHS})
- RESTRICT_PATH(kikimr/public/sdk/go/ydb/api MSG This is ugly hack for legacy YDB go API codegen, any other uses are probibited)
-}
-
-
+macro COLLECT_YDB_API_SPECS_LEGACY(FILES_VAR, PATHS...) {
+ _GLOB($FILES_VAR ${suf=/*.proto:PATHS})
+ RESTRICT_PATH(kikimr/public/sdk/go/ydb/api MSG This is ugly hack for legacy YDB go API codegen, any other uses are probibited)
+}
+
+