diff options
author | v-korovin <v-korovin@yandex-team.ru> | 2022-02-10 16:46:20 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:20 +0300 |
commit | c4e0c5d2f245076d63ccff1004c755ca0cc5d27b (patch) | |
tree | 0c6b0402dc17d5d1beffbe9350d2d6802207e123 | |
parent | b86334f8eb651237aceaa035bebb519893d6d077 (diff) | |
download | ydb-c4e0c5d2f245076d63ccff1004c755ca0cc5d27b.tar.gz |
Restoring authorship annotation for <v-korovin@yandex-team.ru>. Commit 1 of 2.
63 files changed, 2081 insertions, 2081 deletions
diff --git a/build/conf/license.conf b/build/conf/license.conf index f2fb576b0d..12bab6225f 100644 --- a/build/conf/license.conf +++ b/build/conf/license.conf @@ -1,26 +1,26 @@ -LICENSE_EXPRESSION_IMPLICIT_OR=yes +LICENSE_EXPRESSION_IMPLICIT_OR=yes LICENSE_EXPRESSION_IMPLICIT_AND=yes -LICENSE_EXPRESSION= -LICENSE_NAMES= - -MODULE_LICENSES_RESTRICTIONS= -MODULE_LICENSES_RESTRICTION_EXCEPTIONS= -MODULE_LICENSES_RESTRICTION_TYPES= -DEFAULT_MODULE_LICENSE=YandexUncategorized -EXPLICIT_LICENSE_PREFIXES= - -# List of license properties which can be used to restrict transitive dependencies. There are three variables checked for each -# property: -# * LICENSES_<PROP_NAME>_STATIC: list of licenses which propagates this property when linking with code published by one of -# them statically. -# * LICENSES_<PROP_NAME>_DYNAMIC: list of licenses which propagates this property when linking with code published by one of -# them dyamically. -# * LICENSES_<PROP_NAME>: list of licenses which propagates this property regrdless of type of linking with code published by -# one of them. Putting some license into this list is equivalent to putting it into both -# LICENSES_<PROP_NAME>_STATIC and LICENSES_<PROP_NAME>_DYNAMIC lists. -LICENSE_PROPERTIES= \ +LICENSE_EXPRESSION= +LICENSE_NAMES= + +MODULE_LICENSES_RESTRICTIONS= +MODULE_LICENSES_RESTRICTION_EXCEPTIONS= +MODULE_LICENSES_RESTRICTION_TYPES= +DEFAULT_MODULE_LICENSE=YandexUncategorized +EXPLICIT_LICENSE_PREFIXES= + +# List of license properties which can be used to restrict transitive dependencies. There are three variables checked for each +# property: +# * LICENSES_<PROP_NAME>_STATIC: list of licenses which propagates this property when linking with code published by one of +# them statically. +# * LICENSES_<PROP_NAME>_DYNAMIC: list of licenses which propagates this property when linking with code published by one of +# them dyamically. +# * LICENSES_<PROP_NAME>: list of licenses which propagates this property regrdless of type of linking with code published by +# one of them. Putting some license into this list is equivalent to putting it into both +# LICENSES_<PROP_NAME>_STATIC and LICENSES_<PROP_NAME>_DYNAMIC lists. +LICENSE_PROPERTIES= \ FORBIDDEN NDA REQUIRE_DISCLOSURE PERMISSIVE REQUIRE_CITATION SERVICE - + LICENSES_UNATTRIBUTED= \ AFL-2.0 \ AML \ @@ -148,7 +148,7 @@ LICENSES_UNATTRIBUTED= \ Xfree86-1.0 \ Xnet \ jQuery-MIT - + LICENSES_PATCHES_FORBIDDEN= \ Unicode @@ -159,96 +159,96 @@ LICENSES_FORBIDDEN= \ Musl-Exception \ ${LICENSES_UNATTRIBUTED} -# Group for proprietary code licenses -LICENSES_NDA= \ +# Group for proprietary code licenses +LICENSES_NDA= \ Intel-NDA \ - mimepp \ - OracleOebs \ - Sophos-SDK \ - YandexUncategorized \ - YandexNDA - -# These licenses allow use with opensource code only -LICENSES_REQUIRE_DISCLOSURE= \ - CDDL-1.0 \ - CDDL-1.1 \ - CECILL-2.0 \ - CPL-1.0 \ - EPL-1.0 \ - EPL-2.0 \ - GPL \ + mimepp \ + OracleOebs \ + Sophos-SDK \ + YandexUncategorized \ + YandexNDA + +# These licenses allow use with opensource code only +LICENSES_REQUIRE_DISCLOSURE= \ + CDDL-1.0 \ + CDDL-1.1 \ + CECILL-2.0 \ + CPL-1.0 \ + EPL-1.0 \ + EPL-2.0 \ + GPL \ GPL-1.0-only \ GPL-1.0-or-later \ GPL-1.0-or-later WITH Linux-syscall-note \ GPL-1.1 \ - GPL-2.0 \ - GPL-2.0-only \ + GPL-2.0 \ + GPL-2.0-only \ GPL-2.0-only WITH GCC-exception-2.0 \ - GPL-2.0-only WITH Linux-syscall-note \ - GPL-2.0-or-later \ - GPL-2.0-or-later WITH GCC-exception-2.0 \ + GPL-2.0-only WITH Linux-syscall-note \ + GPL-2.0-or-later \ + GPL-2.0-or-later WITH GCC-exception-2.0 \ GPL-2.0-or-later WITH Linux-syscall-note \ - GPL-3.0-only \ + GPL-3.0-only \ GPL-3.0-or-later \ GPL-3.0-or-later WITH Bison-exception-2.2 - -LICENSES_REQUIRE_DISCLOSURE_STATIC= \ - LGPL \ + +LICENSES_REQUIRE_DISCLOSURE_STATIC= \ + LGPL \ LGPL-1.0-or-later \ - LGPL-2.0-only \ - LGPL-2.0-or-later \ + LGPL-2.0-only \ + LGPL-2.0-or-later \ LGPL-2.0-or-later WITH Libtool-exception \ LGPL-2.0-or-later WITH Linux-syscall-note \ - LGPL-2.1-only \ + LGPL-2.1-only \ LGPL-2.1-only WITH Linux-syscall-note \ - LGPL-2.1-or-later \ + LGPL-2.1-or-later \ LGPL-2.1-or-later WITH Linux-syscall-note \ - LGPL-3.0-only \ - LGPL-3.0-or-later - -# These licenses allows any kind of linkage with proprietary code -LICENSES_PERMISSIVE= \ + LGPL-3.0-only \ + LGPL-3.0-or-later + +# These licenses allows any kind of linkage with proprietary code +LICENSES_PERMISSIVE= \ 0BSD \ Apache-1.0 \ - Apache-1.1 \ - Apache-2.0 \ - Apache-2.0 WITH LLVM-exception \ - APSL-2.0 \ + Apache-1.1 \ + Apache-2.0 \ + Apache-2.0 WITH LLVM-exception \ + APSL-2.0 \ Beerware \ blessing \ - BSL-1.0 \ - BSD \ + BSL-1.0 \ + BSD \ BSD-1-Clause \ - BSD-2-Clause \ + BSD-2-Clause \ BSD-2-Clause-Patent \ - BSD-2-Clause-Views \ - BSD-3-Clause \ - BSD-4-Clause \ + BSD-2-Clause-Views \ + BSD-3-Clause \ + BSD-4-Clause \ BSD-4-Clause-UC \ - BSD-derived \ + BSD-derived \ BSD-ORIGINAL-UC-1986 \ BSD-Source-Code \ Bsd-Simplified-Darwin \ Bsd-Unchanged \ Bsd-Unmodified \ bzip2-1.0.6 \ - CC0-1.0 \ + CC0-1.0 \ CC-PDDC \ Cmu-Computing-Services \ - CUP-Parser \ - curl \ + CUP-Parser \ + curl \ Custom-Punycode \ - Facebook-SDK \ - FDK \ + Facebook-SDK \ + FDK \ FSFAP \ - FTL \ - H2 \ + FTL \ + H2 \ IBM-pibs \ - ICU \ + ICU \ Ietf \ - IJG \ + IJG \ Intel-Simplified \ - ISC \ + ISC \ JSON \ Khronos \ Libpbm \ @@ -256,128 +256,128 @@ LICENSES_PERMISSIVE= \ LicenseRef-scancode-ams-fonts \ Linux-OpenIB \ Libpng \ - libpng-2.0 \ - libtiff \ + libpng-2.0 \ + libtiff \ Martin-Birgmeier \ - MIT \ + MIT \ MIT-0 \ - MIT-CMU \ + MIT-CMU \ MIT-Modern-Variant \ MIT-Nagy \ MIT-open-group \ Mit-Old-Style \ Mit-Veillard-Variant \ - MPL-1.0 \ - MPL-1.1 \ - MPL-2.0 \ - Minpack \ - NCSA \ + MPL-1.0 \ + MPL-1.1 \ + MPL-2.0 \ + Minpack \ + NCSA \ NTP \ - Not-Applicable \ + Not-Applicable \ Nvidia \ - OGC-1.0 \ - OLDAP-2.8 \ - OML \ - OpenSSL \ - PayPal-SDK \ + OGC-1.0 \ + OLDAP-2.8 \ + OML \ + OpenSSL \ + PayPal-SDK \ PCRE \ - PD \ - Public-Domain \ + PD \ + Public-Domain \ Public-Domain-US-Govt \ - PHP-3.01 \ - PIL \ - Plexus \ - PostgreSQL \ + PHP-3.01 \ + PIL \ + Plexus \ + PostgreSQL \ Protobuf-License \ - PSF \ - PSF-2.0 \ - Python-2.0 \ - Qhull \ + PSF \ + PSF-2.0 \ + Python-2.0 \ + Qhull \ Red-Hat-Attribution \ - Repoze-public \ + Repoze-public \ RSA-MD \ RSA-MD4 \ RSA-1990 \ - Sleepycat \ + Sleepycat \ Snprintf \ - SGI-B-2.0 \ + SGI-B-2.0 \ SMLNJ \ SSH-short \ - SSLeay \ + SSLeay \ Sunpro \ - Unicode-DFS-2016 \ + Unicode-DFS-2016 \ Unicode-Icu-58 \ Unicode-Mappings \ - Unlicense \ - Unrar \ - UPL-1.0 \ - Vertica \ - W3C \ - WTFPL \ + Unlicense \ + Unrar \ + UPL-1.0 \ + Vertica \ + W3C \ + WTFPL \ X11 \ X11-Lucent \ - YandexOpen \ - Zlib \ - zlib-acknowledgement \ + YandexOpen \ + Zlib \ + zlib-acknowledgement \ ZPL-2.1 \ ${CUSTOM_LICENSE_MUSL_EXCEPTION} \ ${LICENSES_PATCHES_FORBIDDEN} - -LICENSES_PERMISSIVE_DYNAMIC= \ - LGPL \ - LGPL-2.0-only \ - LGPL-2.0-or-later \ - LGPL-2.1-only \ - LGPL-2.1-or-later \ - LGPL-3.0-only \ - LGPL-3.0-or-later - + +LICENSES_PERMISSIVE_DYNAMIC= \ + LGPL \ + LGPL-2.0-only \ + LGPL-2.0-or-later \ + LGPL-2.1-only \ + LGPL-2.1-or-later \ + LGPL-3.0-only \ + LGPL-3.0-or-later + # https://st.yandex-team.ru/ARCADIAWGSUP-34 CUSTOM_LICENSE_LIBSSH2_AGENT_WIN=Libssh2-Agent-Win # Permissive only in musllib CUSTOM_LICENSE_MUSL_EXCEPTION=Musl-Exception-in-Musllib -# TODO: this list is almost empty. needed for DEVRULES-151 +# TODO: this list is almost empty. needed for DEVRULES-151 LICENSES_REQUIRE_CITATION= \ Apache-2.0 \ Cmu-Computing-Services \ OpenSSL \ Spencer-94 \ ${CUSTOM_LICENSE_LIBSSH2_AGENT_WIN} - + LICENSES_SERVICE= \ Service-Dll-Harness \ Service-Prebuilt-Tool \ Service-Py23-Proxy -macro _REQUIRE_EXPLICIT_LICENSE(Prefix...) { - SET(EXPLICIT_LICENSE_PREFIXES ${Prefix}) -} - -### @usage: LICENSE(licenses...) -### -### Specify the licenses of the module, separated by spaces. Specifying multiple licenses interpreted as permission to use this -### library satisfying all conditions of any of the listed licenses. -### -### A license must be prescribed for contribs -macro LICENSE(Flags...) { - SET(LICENSE_EXPRESSION $Flags) - SET(LICENSE_NAMES $Flags) -} - -### @usage RESTRICT_LICENSES(ALLOW_ONLY|DENY LicenseProperty...) -### -### Restrict licenses of direct and indirect module dependencies. -### -### ALLOW_ONLY restriction type requires dependent module to have at leas one license without propertis not listed in restrictions -### list. -### -### DENY restriction type forbids dependency on module with no license without any listed propery from the list. -### -### Note: Can be used multiple times on the same module all specified constraints will be checked. -### All macro invocation for the same module must use same constraints type (DENY or ALLOW_ONLY) -macro RESTRICT_LICENSES(TYPE, EXCEPT[], RESTRICTIONS...) { - SET_APPEND(MODULE_LICENSES_RESTRICTION_TYPES $TYPE) - SET_APPEND(MODULE_LICENSES_RESTRICTIONS $RESTRICTIONS) - SET_APPEND(MODULE_LICENSES_RESTRICTION_EXCEPTIONS $EXCEPT) -} +macro _REQUIRE_EXPLICIT_LICENSE(Prefix...) { + SET(EXPLICIT_LICENSE_PREFIXES ${Prefix}) +} + +### @usage: LICENSE(licenses...) +### +### Specify the licenses of the module, separated by spaces. Specifying multiple licenses interpreted as permission to use this +### library satisfying all conditions of any of the listed licenses. +### +### A license must be prescribed for contribs +macro LICENSE(Flags...) { + SET(LICENSE_EXPRESSION $Flags) + SET(LICENSE_NAMES $Flags) +} + +### @usage RESTRICT_LICENSES(ALLOW_ONLY|DENY LicenseProperty...) +### +### Restrict licenses of direct and indirect module dependencies. +### +### ALLOW_ONLY restriction type requires dependent module to have at leas one license without propertis not listed in restrictions +### list. +### +### DENY restriction type forbids dependency on module with no license without any listed propery from the list. +### +### Note: Can be used multiple times on the same module all specified constraints will be checked. +### All macro invocation for the same module must use same constraints type (DENY or ALLOW_ONLY) +macro RESTRICT_LICENSES(TYPE, EXCEPT[], RESTRICTIONS...) { + SET_APPEND(MODULE_LICENSES_RESTRICTION_TYPES $TYPE) + SET_APPEND(MODULE_LICENSES_RESTRICTIONS $RESTRICTIONS) + SET_APPEND(MODULE_LICENSES_RESTRICTION_EXCEPTIONS $EXCEPT) +} diff --git a/build/conf/project_specific/maps/aar.conf b/build/conf/project_specific/maps/aar.conf index 780ff38984..67406773c3 100644 --- a/build/conf/project_specific/maps/aar.conf +++ b/build/conf/project_specific/maps/aar.conf @@ -1,350 +1,350 @@ - -_GRADLE_FLAGS_VALUE= -### @usage: GRADLE_FLAGS(flags...) # internal -### -### SEt additional flags for gradle -macro GRADLE_FLAGS(FLAGS...) { - SET_APPEND(_GRADLE_FLAGS_VALUE $FLAGS) -} - -### @usage: PROGURAD_RULES(ProguardRuleFiles...) -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro PROGUARD_RULES(RULES...) { - SET_APPEND(_PROGUARD_RULES_GLOBAL $RULES) -} - -### @usage: AARS(Aars...) -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro AARS(DEPS...) { - SET_APPEND(_AARS_GLOBAL $DEPS) -} - -### @usage: MOBILE_DLL() # internal -module MOBILE_DLL: DLL { - .CMD=LINK_MOBILE_DLL - - PEERDIR(build/external_resources/android_sdk) - PEERDIR(build/external_resources/gradle) - PEERDIR(build/platform/java/jdk) + +_GRADLE_FLAGS_VALUE= +### @usage: GRADLE_FLAGS(flags...) # internal +### +### SEt additional flags for gradle +macro GRADLE_FLAGS(FLAGS...) { + SET_APPEND(_GRADLE_FLAGS_VALUE $FLAGS) +} + +### @usage: PROGURAD_RULES(ProguardRuleFiles...) +### +### This macro is strictly prohibited to use outside of mapsmobi project +macro PROGUARD_RULES(RULES...) { + SET_APPEND(_PROGUARD_RULES_GLOBAL $RULES) +} + +### @usage: AARS(Aars...) +### +### This macro is strictly prohibited to use outside of mapsmobi project +macro AARS(DEPS...) { + SET_APPEND(_AARS_GLOBAL $DEPS) +} + +### @usage: MOBILE_DLL() # internal +module MOBILE_DLL: DLL { + .CMD=LINK_MOBILE_DLL + + PEERDIR(build/external_resources/android_sdk) + PEERDIR(build/external_resources/gradle) + PEERDIR(build/platform/java/jdk) PEERDIR($JDK_RESOURCE_PEERDIR) - - SET(BIN_AAR_DIR $BINDIR/aar) - SET(BIN_TMP_DIR $BINDIR/tmp) -} - -_MOBILE_TEST_APK_AAR_MANIFEST_VALUE= -### @usage: MOBILE_TEST_APK_AAR_MANIFEST(file) # internal -macro MOBILE_TEST_APK_AAR_MANIFEST(FILE) { - SET(_MOBILE_TEST_APK_AAR_MANIFEST_VALUE $FILE) -} - -_MOBILE_TEST_APK_AAR_PROGUARD_RULES_VALUE= -### @usage: MOBILE_TEST_APK_AAR_PROGUARD_RULES(file) # internal -macro MOBILE_TEST_APK_AAR_PROGUARD_RULES(FILE) { - SET(_MOBILE_TEST_APK_AAR_PROGUARD_RULES_VALUE $FILE) -} - -_MOBILE_TEST_APK_AAR_AARS_VALUE= -### @usage: MOBILE_TEST_APK_AAR_AARS(filenames...) # internal -macro MOBILE_TEST_APK_AAR_AARS(AARS...) { - SET_APPEND(_MOBILE_TEST_APK_AAR_AARS_VALUE $AARS) -} - -_MOBILE_TEST_APK_AAR_BUNDLES_VALUE= -### @usage: MOBILE_TEST_APK_AAR_BUNDLES(filenames...) # internal -macro MOBILE_TEST_APK_AAR_BUNDLES(BUNDLES...) { - SET_APPEND(_MOBILE_TEST_APK_AAR_BUNDLES_VALUE $BUNDLES) - BUNDLE_EXTRA_INPUTS($BUNDLES) -} - -_MOBILE_TEST_APK_TEMPLATE_DIR= -### @usage: MOBILE_TEST_APK_TEMPLATE(dir filenames...) # internal -macro MOBILE_TEST_APK_TEMPLATE(TEMPLATE_DIR, INPUTS...) { - SET(_MOBILE_TEST_APK_TEMPLATE_DIR $TEMPLATE_DIR) - BUNDLE_EXTRA_INPUTS(${pre=$TEMPLATE_DIR/:INPUTS}) -} - -_MOBILE_TEST_APK_CMDLINE=\ -$FS_TOOLS md $BIN_TMP_DIR \ -&& $FS_TOOLS md $BINDIR/.android \ -&& $COPY_CMD $GRADLE_DEBUG_STORE_RESOURCE_GLOBAL/debug.keystore $BINDIR/.android/debug.keystore \ -&& $FS_TOOLS md $BINDIR/jni_libs/$ARCH_NAME \ -&& $YMAKE_PYTHON ${input:"build/scripts/extract_asrc.py"} --output $BIN_TMP_DIR --input ${suf=.asrc:PEERS} \ -&& $MOVE_FILE $OUTPUT $BINDIR/jni_libs/$ARCH_NAME/${pre=lib;suf=.so:_MOBILE_TEST_APK_LIBRARY_NAME} \ -&& $FS_TOOLS md $BIN_AAR_DIR \ -&& $YMAKE_PYTHON ${input:"build/scripts/gen_aar_gradle_script.py"} \ -${input;hide:EXTRA_INPUTS} \ ---aidl-dirs $BIN_TMP_DIR/aidl \ ---assets-dirs $BIN_TMP_DIR/assets \ ---java-dirs $BIN_TMP_DIR/src \ ---jni-libs-dirs $BINDIR/jni_libs \ ---res-dirs $BIN_TMP_DIR/res \ ---manifest ${input:_MOBILE_TEST_APK_AAR_MANIFEST_VALUE} \ ---proguard-rules ${input:_MOBILE_TEST_APK_AAR_PROGUARD_RULES_VALUE} ${input:_PROGUARD_RULES_GLOBAL} \ ---aars $_MOBILE_TEST_APK_AAR_AARS_VALUE $_AARS_GLOBAL \ ---bundles $_MOBILE_TEST_APK_AAR_BUNDLES_VALUE \ ---output-dir $BIN_AAR_DIR \ ---bundle-name unittest \ ---maven-repos ${MAPSMOBI_MAVEN_REPO_RESOURCE_GLOBAL} \ + + SET(BIN_AAR_DIR $BINDIR/aar) + SET(BIN_TMP_DIR $BINDIR/tmp) +} + +_MOBILE_TEST_APK_AAR_MANIFEST_VALUE= +### @usage: MOBILE_TEST_APK_AAR_MANIFEST(file) # internal +macro MOBILE_TEST_APK_AAR_MANIFEST(FILE) { + SET(_MOBILE_TEST_APK_AAR_MANIFEST_VALUE $FILE) +} + +_MOBILE_TEST_APK_AAR_PROGUARD_RULES_VALUE= +### @usage: MOBILE_TEST_APK_AAR_PROGUARD_RULES(file) # internal +macro MOBILE_TEST_APK_AAR_PROGUARD_RULES(FILE) { + SET(_MOBILE_TEST_APK_AAR_PROGUARD_RULES_VALUE $FILE) +} + +_MOBILE_TEST_APK_AAR_AARS_VALUE= +### @usage: MOBILE_TEST_APK_AAR_AARS(filenames...) # internal +macro MOBILE_TEST_APK_AAR_AARS(AARS...) { + SET_APPEND(_MOBILE_TEST_APK_AAR_AARS_VALUE $AARS) +} + +_MOBILE_TEST_APK_AAR_BUNDLES_VALUE= +### @usage: MOBILE_TEST_APK_AAR_BUNDLES(filenames...) # internal +macro MOBILE_TEST_APK_AAR_BUNDLES(BUNDLES...) { + SET_APPEND(_MOBILE_TEST_APK_AAR_BUNDLES_VALUE $BUNDLES) + BUNDLE_EXTRA_INPUTS($BUNDLES) +} + +_MOBILE_TEST_APK_TEMPLATE_DIR= +### @usage: MOBILE_TEST_APK_TEMPLATE(dir filenames...) # internal +macro MOBILE_TEST_APK_TEMPLATE(TEMPLATE_DIR, INPUTS...) { + SET(_MOBILE_TEST_APK_TEMPLATE_DIR $TEMPLATE_DIR) + BUNDLE_EXTRA_INPUTS(${pre=$TEMPLATE_DIR/:INPUTS}) +} + +_MOBILE_TEST_APK_CMDLINE=\ +$FS_TOOLS md $BIN_TMP_DIR \ +&& $FS_TOOLS md $BINDIR/.android \ +&& $COPY_CMD $GRADLE_DEBUG_STORE_RESOURCE_GLOBAL/debug.keystore $BINDIR/.android/debug.keystore \ +&& $FS_TOOLS md $BINDIR/jni_libs/$ARCH_NAME \ +&& $YMAKE_PYTHON ${input:"build/scripts/extract_asrc.py"} --output $BIN_TMP_DIR --input ${suf=.asrc:PEERS} \ +&& $MOVE_FILE $OUTPUT $BINDIR/jni_libs/$ARCH_NAME/${pre=lib;suf=.so:_MOBILE_TEST_APK_LIBRARY_NAME} \ +&& $FS_TOOLS md $BIN_AAR_DIR \ +&& $YMAKE_PYTHON ${input:"build/scripts/gen_aar_gradle_script.py"} \ +${input;hide:EXTRA_INPUTS} \ +--aidl-dirs $BIN_TMP_DIR/aidl \ +--assets-dirs $BIN_TMP_DIR/assets \ +--java-dirs $BIN_TMP_DIR/src \ +--jni-libs-dirs $BINDIR/jni_libs \ +--res-dirs $BIN_TMP_DIR/res \ +--manifest ${input:_MOBILE_TEST_APK_AAR_MANIFEST_VALUE} \ +--proguard-rules ${input:_MOBILE_TEST_APK_AAR_PROGUARD_RULES_VALUE} ${input:_PROGUARD_RULES_GLOBAL} \ +--aars $_MOBILE_TEST_APK_AAR_AARS_VALUE $_AARS_GLOBAL \ +--bundles $_MOBILE_TEST_APK_AAR_BUNDLES_VALUE \ +--output-dir $BIN_AAR_DIR \ +--bundle-name unittest \ +--maven-repos ${MAPSMOBI_MAVEN_REPO_RESOURCE_GLOBAL} \ && ${cwd:BIN_AAR_DIR} ${GRADLE_RESOURCE_GLOBAL}/bin/gradle $_GRADLE_FLAGS_VALUE --no-daemon --offline -g $BIN_GRADLE_USER_HOME_DIR assemble${_BUNDLE_BUILD_TYPE} ${env:"ANDROID_HOME=$ANDROID_SDK_RESOURCE_GLOBAL/android_sdk"} ${env:"JAVA_HOME=$JDK_RESOURCE"} ${env:"ANDROID_SDK_HOME=$BINDIR"} \ -&& $FS_TOOLS md $BIN_APK_DIR \ -&& $FS_TOOLS md $BIN_APK_DIR/res \ -&& $COPY_CMD $_MOBILE_TEST_APK_TEMPLATE_DIR/Manifest.xml $BIN_APK_DIR/Manifest.xml \ -&& $YMAKE_PYTHON ${input:"build/scripts/gen_test_apk_gradle_script.py"} \ -${input;hide:EXTRA_INPUTS} \ ---app-id $REALPRJNAME \ ---assets-dirs $_MOBILE_TEST_APK_ASSETS_DIRS_VALUE \ ---java-dirs $_MOBILE_TEST_APK_TEMPLATE_DIR/java \ ---jni-libs-dirs \ ---res-dirs $BIN_APK_DIR/res $_MOBILE_TEST_APK_TEMPLATE_DIR/res $BIN_TMP_DIR/res \ ---manifest Manifest.xml \ ---aars \ ---output-dir $BIN_APK_DIR \ ---bundle-name $REALPRJNAME \ ---bundles $BIN_AAR_DIR/build/outputs/aar/unittest-${tolower:_BUNDLE_BUILD_TYPE}.aar $_MOBILE_TEST_APK_AAR_BUNDLES_VALUE \ ---library-name $_MOBILE_TEST_APK_LIBRARY_NAME \ ---maven-repos ${MAPSMOBI_MAVEN_REPO_RESOURCE_GLOBAL} \ +&& $FS_TOOLS md $BIN_APK_DIR \ +&& $FS_TOOLS md $BIN_APK_DIR/res \ +&& $COPY_CMD $_MOBILE_TEST_APK_TEMPLATE_DIR/Manifest.xml $BIN_APK_DIR/Manifest.xml \ +&& $YMAKE_PYTHON ${input:"build/scripts/gen_test_apk_gradle_script.py"} \ +${input;hide:EXTRA_INPUTS} \ +--app-id $REALPRJNAME \ +--assets-dirs $_MOBILE_TEST_APK_ASSETS_DIRS_VALUE \ +--java-dirs $_MOBILE_TEST_APK_TEMPLATE_DIR/java \ +--jni-libs-dirs \ +--res-dirs $BIN_APK_DIR/res $_MOBILE_TEST_APK_TEMPLATE_DIR/res $BIN_TMP_DIR/res \ +--manifest Manifest.xml \ +--aars \ +--output-dir $BIN_APK_DIR \ +--bundle-name $REALPRJNAME \ +--bundles $BIN_AAR_DIR/build/outputs/aar/unittest-${tolower:_BUNDLE_BUILD_TYPE}.aar $_MOBILE_TEST_APK_AAR_BUNDLES_VALUE \ +--library-name $_MOBILE_TEST_APK_LIBRARY_NAME \ +--maven-repos ${MAPSMOBI_MAVEN_REPO_RESOURCE_GLOBAL} \ && ${cwd:BIN_APK_DIR} ${GRADLE_RESOURCE_GLOBAL}/bin/gradle $_GRADLE_FLAGS_VALUE --no-daemon --offline -g $BIN_GRADLE_USER_HOME_DIR assembleDebug ${env:"ANDROID_HOME=$ANDROID_SDK_RESOURCE_GLOBAL/android_sdk"} ${env:"JAVA_HOME=$JDK_RESOURCE"} ${env:"ANDROID_SDK_HOME=$BINDIR"} \ -&& $COPY_CMD $BIN_APK_DIR/build/outputs/apk/${tolower:_BUNDLE_BUILD_TYPE}/$REALPRJNAME.apk ${OUTPUT} - -_MOBILE_TEST_APK_EXTRA_INPUTS_VALUE= - -macro _MOBILE_TEST_APK_CMD_IMPL(OUTPUT, EXTRA_INPUTS...) { - .CMD=$_MOBILE_TEST_APK_CMDLINE -} - -_MOBILE_TEST_APK_CMD=$_MOBILE_TEST_APK_CMD_IMPL($TARGET $_BUNDLE_EXTRA_INPUTS_VALUE) - -LINK_MOBILE_TEST_APK=$LINK_DYN_LIB && $_MOBILE_TEST_APK_CMD - -### @usage: MOBILE_TEST_APK() # internal -module MOBILE_TEST_APK: DLL { - .CMD=LINK_MOBILE_TEST_APK - .GLOBAL=_AARS _PROGUARD_RULES - - PEERDIR(build/external_resources/android_sdk) - PEERDIR(build/external_resources/gradle) - PEERDIR(build/platform/java/jdk) +&& $COPY_CMD $BIN_APK_DIR/build/outputs/apk/${tolower:_BUNDLE_BUILD_TYPE}/$REALPRJNAME.apk ${OUTPUT} + +_MOBILE_TEST_APK_EXTRA_INPUTS_VALUE= + +macro _MOBILE_TEST_APK_CMD_IMPL(OUTPUT, EXTRA_INPUTS...) { + .CMD=$_MOBILE_TEST_APK_CMDLINE +} + +_MOBILE_TEST_APK_CMD=$_MOBILE_TEST_APK_CMD_IMPL($TARGET $_BUNDLE_EXTRA_INPUTS_VALUE) + +LINK_MOBILE_TEST_APK=$LINK_DYN_LIB && $_MOBILE_TEST_APK_CMD + +### @usage: MOBILE_TEST_APK() # internal +module MOBILE_TEST_APK: DLL { + .CMD=LINK_MOBILE_TEST_APK + .GLOBAL=_AARS _PROGUARD_RULES + + PEERDIR(build/external_resources/android_sdk) + PEERDIR(build/external_resources/gradle) + PEERDIR(build/platform/java/jdk) PEERDIR($JDK_RESOURCE_PEERDIR) - - SET(MODULE_PREFIX) - SET(MODULE_SUFFIX .apk) - - SET(BIN_AAR_DIR $BINDIR/aar) - SET(BIN_APK_DIR $BINDIR/apk) - SET(BIN_TMP_DIR $BINDIR/tmp) - SET(BIN_GRADLE_USER_HOME_DIR $BINDIR/gradle) - - SET(_MOBILE_TEST_APK_LIBRARY_NAME unittests) - - when ($OS_ANDROID == "yes") { - when ($ARCH_ARM7 == "yes") { - ARCH_NAME=armeabi-v7a - } - elsewhen ($ARCH_ARM64 == "yes") { - ARCH_NAME=arm64-v8a - } - elsewhen ($ARCH_I386 == "yes") { - ARCH_NAME=x86 - } - elsewhen ($ARCH_X86_64 == "yes") { - ARCH_NAME=x86_64 - } - otherwise { - ARCH_NAME=unsupported - } - } -} - - -### @usage: MOBILE_BOOST_TEST_APK() # internal -module MOBILE_BOOST_TEST_APK: MOBILE_TEST_APK { - PEERDIR(devtools/dummy_arcadia/test/test_apk/template) - PEERDIR(build/external_resources/mapsmobi_maven_repo) + + SET(MODULE_PREFIX) + SET(MODULE_SUFFIX .apk) + + SET(BIN_AAR_DIR $BINDIR/aar) + SET(BIN_APK_DIR $BINDIR/apk) + SET(BIN_TMP_DIR $BINDIR/tmp) + SET(BIN_GRADLE_USER_HOME_DIR $BINDIR/gradle) + + SET(_MOBILE_TEST_APK_LIBRARY_NAME unittests) + + when ($OS_ANDROID == "yes") { + when ($ARCH_ARM7 == "yes") { + ARCH_NAME=armeabi-v7a + } + elsewhen ($ARCH_ARM64 == "yes") { + ARCH_NAME=arm64-v8a + } + elsewhen ($ARCH_I386 == "yes") { + ARCH_NAME=x86 + } + elsewhen ($ARCH_X86_64 == "yes") { + ARCH_NAME=x86_64 + } + otherwise { + ARCH_NAME=unsupported + } + } +} + + +### @usage: MOBILE_BOOST_TEST_APK() # internal +module MOBILE_BOOST_TEST_APK: MOBILE_TEST_APK { + PEERDIR(devtools/dummy_arcadia/test/test_apk/template) + PEERDIR(build/external_resources/mapsmobi_maven_repo) ADD_YTEST($MODULE_PREFIX$REALPRJNAME boost.test) - - MOBILE_TEST_APK_TEMPLATE(${ARCADIA_ROOT}/devtools/dummy_arcadia/test/test_apk/template Manifest.xml java/com/yandex/test/unittests/RunTestsActivity.java res/values/strings.xml) -} - -when ($BT_RELEASE) { - _BUNDLE_BUILD_TYPE=Release -} -otherwise { - _BUNDLE_BUILD_TYPE=Debug -} - -_AAR_EXTRA_INPUTS_VALUE= - -_AAR_MANIFEST_VALUE= -### @usage: AAR_MANIFEST(filename) # internal -macro AAR_MANIFEST(FILE) { - SET(_AAR_MANIFEST_VALUE $FILE) -} - -_AAR_PROGUARD_RULES_VALUE= -### @usage: AAR_PROGUARD_RULES(filename) # internal -macro AAR_PROGUARD_RULES(FILE) { - SET(_AAR_PROGUARD_RULES_VALUE $FILE) -} - -_AAR_AARS_VALUE= -### @usage: AAR_AARS(aars...) # internal -macro AAR_AARS(Aars...) { - SET_APPEND(_AAR_AARS_VALUE $Aars) -} - -_AAR_COMPILE_ONLY_AARS_VALUE= -### @usage: AAR_COMPILE_ONLY_AARS(compile_only_aars...) # internal -macro AAR_COMPILE_ONLY_AARS(Aars...) { - SET_APPEND(_AAR_COMPILE_ONLY_AARS_VALUE $Aars) -} - - -_AAR_AIDL_DIRS_VALUE= -### @usage: AAR_AIDL_SRCS(dir filenames...) # internal -macro AAR_AIDL_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_AAR_AIDL_DIRS_VALUE $PREFIX) - SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_AAR_ASSETS_DIRS_VALUE= -### @usage: AAR_ASSETS_SRCS(dir filenames...) # internal -macro AAR_ASSETS_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_AAR_ASSETS_DIRS_VALUE $PREFIX) - SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_AAR_BUNDLES_VALUE= -### @usage: AAR_BUNDLES(filenames...) # internal -macro AAR_BUNDLES(BUNDLES...) { - SET_APPEND(_AAR_BUNDLES_VALUE $BUNDLES) - SET_APPEND(_AAR_EXTRA_INPUTS_VALUE $BUNDLES) -} - -_AAR_JNI_LIB_DIRS_VALUE= -### @usage: AAR_JNI_LIBS(dir filenames...) # internal -macro AAR_JNI_LIBS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_AAR_JNI_LIB_DIRS_VALUE $PREFIX) - SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_AAR_JAVA_DIRS_VALUE= -### @usage: AAR_JAVA_SRCS(dir filenames...) # internal -macro AAR_JAVA_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_AAR_JAVA_DIRS_VALUE $PREFIX) - SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_AAR_RES_DIRS_VALUE= -### @usage: AAR_RES_SRCS(dir filenames...) # internal -macro AAR_RES_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_AAR_RES_DIRS_VALUE $PREFIX) - SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_AAR_LOCAL_MAVEN_REPO_VALUE= -### @usage: AAR_LOCAL_MAVEN_REPO(repo...) -macro AAR_LOCAL_MAVEN_REPO(REPO...) { - SET_APPEND(_AAR_LOCAL_MAVEN_REPO_VALUE $REPO) -} - -_AAR_GRADLE_SCRIPT_GENERATOR_VALUE= -### @usage: AAR_GRADLE_SCRIPT_GENERATOR(python_script) -macro AAR_GRADLE_SCRIPT_GENERATOR(GENERATOR) { - SET(_AAR_GRADLE_SCRIPT_GENERATOR_VALUE $GENERATOR) -} - -when ($AAR_GENERATE_DOC) { - _AAR_GENERATE_DOC_VALUE=--generate-doc - _AAR_COPY_DOC_VALUE=\ - && ${cwd:BINDIR} $COPY_CMD build/${REALPRJNAME}-javadoc.tar.gz ${output;suf=-javadoc.tar.gz:REALPRJNAME} -} -otherwise { - _AAR_GENERATE_DOC_VALUE= - _AAR_COPY_DOC_VALUE= -} - -when ($AAR_NO_STRIP) { - _AAR_NO_STRIP_VALUE=--do-not-strip -} -otherwise { - _AAR_NO_STRIP_VALUE= -} - -_AAR_CMDLINE=\ -$FS_TOOLS md $BIN_TMP_DIR \ -&& $FS_TOOLS md $BINDIR/.android \ -&& $COPY_CMD $GRADLE_DEBUG_STORE_RESOURCE_GLOBAL/debug.keystore $BINDIR/.android/debug.keystore \ -&& $YMAKE_PYTHON ${input:"build/scripts/extract_asrc.py"} --output $BIN_TMP_DIR --input ${suf=.asrc:PEERS} \ -&& $YMAKE_PYTHON ${input:_AAR_GRADLE_SCRIPT_GENERATOR_VALUE} \ -${input;hide:EXTRA_INPUTS} \ ---aidl-dirs $_AAR_AIDL_DIRS_VALUE $BIN_TMP_DIR/aidl \ ---assets-dirs $_AAR_ASSETS_DIRS_VALUE $BIN_TMP_DIR/assets \ ---java-dirs $_AAR_JAVA_DIRS_VALUE $BIN_TMP_DIR/src \ ---jni-libs-dirs $_AAR_JNI_LIB_DIRS_VALUE $BIN_TMP_DIR/jni_libs \ ---res-dirs $_AAR_RES_DIRS_VALUE $BIN_TMP_DIR/res \ ---manifest ${input:_AAR_MANIFEST_VALUE} \ ---proguard-rules ${input:_AAR_PROGUARD_RULES_VALUE} ${input:_PROGUARD_RULES_GLOBAL} \ ---aars $_AAR_AARS_VALUE $_AARS_GLOBAL \ ---compile-only-aars $_AAR_COMPILE_ONLY_AARS_VALUE \ ---bundles $_AAR_BUNDLES_VALUE \ ---output-dir $BINDIR \ ---bundle-name $REALPRJNAME \ ---peers $PEERS \ ---maven-repos $_AAR_LOCAL_MAVEN_REPO_VALUE \ -$_AAR_GENERATE_DOC_VALUE \ -$_AAR_NO_STRIP_VALUE \ + + MOBILE_TEST_APK_TEMPLATE(${ARCADIA_ROOT}/devtools/dummy_arcadia/test/test_apk/template Manifest.xml java/com/yandex/test/unittests/RunTestsActivity.java res/values/strings.xml) +} + +when ($BT_RELEASE) { + _BUNDLE_BUILD_TYPE=Release +} +otherwise { + _BUNDLE_BUILD_TYPE=Debug +} + +_AAR_EXTRA_INPUTS_VALUE= + +_AAR_MANIFEST_VALUE= +### @usage: AAR_MANIFEST(filename) # internal +macro AAR_MANIFEST(FILE) { + SET(_AAR_MANIFEST_VALUE $FILE) +} + +_AAR_PROGUARD_RULES_VALUE= +### @usage: AAR_PROGUARD_RULES(filename) # internal +macro AAR_PROGUARD_RULES(FILE) { + SET(_AAR_PROGUARD_RULES_VALUE $FILE) +} + +_AAR_AARS_VALUE= +### @usage: AAR_AARS(aars...) # internal +macro AAR_AARS(Aars...) { + SET_APPEND(_AAR_AARS_VALUE $Aars) +} + +_AAR_COMPILE_ONLY_AARS_VALUE= +### @usage: AAR_COMPILE_ONLY_AARS(compile_only_aars...) # internal +macro AAR_COMPILE_ONLY_AARS(Aars...) { + SET_APPEND(_AAR_COMPILE_ONLY_AARS_VALUE $Aars) +} + + +_AAR_AIDL_DIRS_VALUE= +### @usage: AAR_AIDL_SRCS(dir filenames...) # internal +macro AAR_AIDL_SRCS(PREFIX, ABSOLUTE[], FILES...) { + SET_APPEND(_AAR_AIDL_DIRS_VALUE $PREFIX) + SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) +} + +_AAR_ASSETS_DIRS_VALUE= +### @usage: AAR_ASSETS_SRCS(dir filenames...) # internal +macro AAR_ASSETS_SRCS(PREFIX, ABSOLUTE[], FILES...) { + SET_APPEND(_AAR_ASSETS_DIRS_VALUE $PREFIX) + SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) +} + +_AAR_BUNDLES_VALUE= +### @usage: AAR_BUNDLES(filenames...) # internal +macro AAR_BUNDLES(BUNDLES...) { + SET_APPEND(_AAR_BUNDLES_VALUE $BUNDLES) + SET_APPEND(_AAR_EXTRA_INPUTS_VALUE $BUNDLES) +} + +_AAR_JNI_LIB_DIRS_VALUE= +### @usage: AAR_JNI_LIBS(dir filenames...) # internal +macro AAR_JNI_LIBS(PREFIX, ABSOLUTE[], FILES...) { + SET_APPEND(_AAR_JNI_LIB_DIRS_VALUE $PREFIX) + SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) +} + +_AAR_JAVA_DIRS_VALUE= +### @usage: AAR_JAVA_SRCS(dir filenames...) # internal +macro AAR_JAVA_SRCS(PREFIX, ABSOLUTE[], FILES...) { + SET_APPEND(_AAR_JAVA_DIRS_VALUE $PREFIX) + SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) +} + +_AAR_RES_DIRS_VALUE= +### @usage: AAR_RES_SRCS(dir filenames...) # internal +macro AAR_RES_SRCS(PREFIX, ABSOLUTE[], FILES...) { + SET_APPEND(_AAR_RES_DIRS_VALUE $PREFIX) + SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) +} + +_AAR_LOCAL_MAVEN_REPO_VALUE= +### @usage: AAR_LOCAL_MAVEN_REPO(repo...) +macro AAR_LOCAL_MAVEN_REPO(REPO...) { + SET_APPEND(_AAR_LOCAL_MAVEN_REPO_VALUE $REPO) +} + +_AAR_GRADLE_SCRIPT_GENERATOR_VALUE= +### @usage: AAR_GRADLE_SCRIPT_GENERATOR(python_script) +macro AAR_GRADLE_SCRIPT_GENERATOR(GENERATOR) { + SET(_AAR_GRADLE_SCRIPT_GENERATOR_VALUE $GENERATOR) +} + +when ($AAR_GENERATE_DOC) { + _AAR_GENERATE_DOC_VALUE=--generate-doc + _AAR_COPY_DOC_VALUE=\ + && ${cwd:BINDIR} $COPY_CMD build/${REALPRJNAME}-javadoc.tar.gz ${output;suf=-javadoc.tar.gz:REALPRJNAME} +} +otherwise { + _AAR_GENERATE_DOC_VALUE= + _AAR_COPY_DOC_VALUE= +} + +when ($AAR_NO_STRIP) { + _AAR_NO_STRIP_VALUE=--do-not-strip +} +otherwise { + _AAR_NO_STRIP_VALUE= +} + +_AAR_CMDLINE=\ +$FS_TOOLS md $BIN_TMP_DIR \ +&& $FS_TOOLS md $BINDIR/.android \ +&& $COPY_CMD $GRADLE_DEBUG_STORE_RESOURCE_GLOBAL/debug.keystore $BINDIR/.android/debug.keystore \ +&& $YMAKE_PYTHON ${input:"build/scripts/extract_asrc.py"} --output $BIN_TMP_DIR --input ${suf=.asrc:PEERS} \ +&& $YMAKE_PYTHON ${input:_AAR_GRADLE_SCRIPT_GENERATOR_VALUE} \ +${input;hide:EXTRA_INPUTS} \ +--aidl-dirs $_AAR_AIDL_DIRS_VALUE $BIN_TMP_DIR/aidl \ +--assets-dirs $_AAR_ASSETS_DIRS_VALUE $BIN_TMP_DIR/assets \ +--java-dirs $_AAR_JAVA_DIRS_VALUE $BIN_TMP_DIR/src \ +--jni-libs-dirs $_AAR_JNI_LIB_DIRS_VALUE $BIN_TMP_DIR/jni_libs \ +--res-dirs $_AAR_RES_DIRS_VALUE $BIN_TMP_DIR/res \ +--manifest ${input:_AAR_MANIFEST_VALUE} \ +--proguard-rules ${input:_AAR_PROGUARD_RULES_VALUE} ${input:_PROGUARD_RULES_GLOBAL} \ +--aars $_AAR_AARS_VALUE $_AARS_GLOBAL \ +--compile-only-aars $_AAR_COMPILE_ONLY_AARS_VALUE \ +--bundles $_AAR_BUNDLES_VALUE \ +--output-dir $BINDIR \ +--bundle-name $REALPRJNAME \ +--peers $PEERS \ +--maven-repos $_AAR_LOCAL_MAVEN_REPO_VALUE \ +$_AAR_GENERATE_DOC_VALUE \ +$_AAR_NO_STRIP_VALUE \ && ${cwd:BINDIR} ${GRADLE_RESOURCE_GLOBAL}/bin/gradle $_GRADLE_FLAGS_VALUE --no-daemon --offline -g $BIN_GRADLE_USER_HOME_DIR bundle${_BUNDLE_BUILD_TYPE}Aar ${env:"ANDROID_HOME=$ANDROID_SDK_RESOURCE_GLOBAL/android_sdk"} ${env:"JAVA_HOME=$JDK_RESOURCE"} ${env:"ANDROID_SDK_HOME=$BINDIR"} $VCS_INFO_DISABLE_CACHE__NO_UID__ \ -&& ${cwd:BINDIR} $COPY_CMD build/outputs/aar/${REALPRJNAME}-${tolower:_BUNDLE_BUILD_TYPE}.aar $TARGET \ -$_AAR_COPY_DOC_VALUE \ -&& ${cwd:BINDIR} $COPY_CMD build/${suf=-pom.xml:REALPRJNAME} ${output;suf=-pom.xml:REALPRJNAME} \ -&& ${cwd:BINDIR} $COPY_CMD build/libs/${suf=-sources.jar:REALPRJNAME} ${output;suf=-sources.jar:REALPRJNAME} - -macro _AAR_CMD_IMPL(EXTRA_INPUTS...) { +&& ${cwd:BINDIR} $COPY_CMD build/outputs/aar/${REALPRJNAME}-${tolower:_BUNDLE_BUILD_TYPE}.aar $TARGET \ +$_AAR_COPY_DOC_VALUE \ +&& ${cwd:BINDIR} $COPY_CMD build/${suf=-pom.xml:REALPRJNAME} ${output;suf=-pom.xml:REALPRJNAME} \ +&& ${cwd:BINDIR} $COPY_CMD build/libs/${suf=-sources.jar:REALPRJNAME} ${output;suf=-sources.jar:REALPRJNAME} + +macro _AAR_CMD_IMPL(EXTRA_INPUTS...) { .CMD=$_AAR_CMDLINE && $GENERATE_MF -} - -AAR_CMD=$_AAR_CMD_IMPL($_AAR_EXTRA_INPUTS_VALUE) - -### @usage: AAR() # internal -module AAR: _BASE_UNIT { - .CMD=AAR_CMD - .GLOBAL=_AARS _PROGUARD_RULES - .PEERDIR_POLICY=as_build_from - .FINAL_TARGET=yes - - SET(MODULE_PREFIX) - SET(MODULE_SUFFIX .aar) - SET(DONT_RESOLVE_INCLUDES yes) - SET(NEED_PLATFORM_PEERDIRS no) - NO_PLATFORM() - - PEERDIR(build/external_resources/android_sdk) - PEERDIR(build/external_resources/gradle) - PEERDIR(build/platform/java/jdk) +} + +AAR_CMD=$_AAR_CMD_IMPL($_AAR_EXTRA_INPUTS_VALUE) + +### @usage: AAR() # internal +module AAR: _BASE_UNIT { + .CMD=AAR_CMD + .GLOBAL=_AARS _PROGUARD_RULES + .PEERDIR_POLICY=as_build_from + .FINAL_TARGET=yes + + SET(MODULE_PREFIX) + SET(MODULE_SUFFIX .aar) + SET(DONT_RESOLVE_INCLUDES yes) + SET(NEED_PLATFORM_PEERDIRS no) + NO_PLATFORM() + + PEERDIR(build/external_resources/android_sdk) + PEERDIR(build/external_resources/gradle) + PEERDIR(build/platform/java/jdk) PEERDIR($JDK_RESOURCE_PEERDIR) - - SET(BIN_TMP_DIR $BINDIR/tmp) - SET(BIN_GRADLE_USER_HOME_DIR $BINDIR/gradle) -} - -_SECONDARY_OUTPUT_VALUE= - -### @usage: SECONDARY_OUTPUT(filename) # internal -### -### The use of this macro is strictly prohibited!!! -macro SECONDARY_OUTPUT(OUTPUT) { - SET(_SECONDARY_OUTPUT_VALUE $OUTPUT) -} - -_AAR_PROXY_LIBRARY_CMD=$LINK_LIB && $COPY_CMD $_SECONDARY_OUTPUT_VALUE ${input;hide:_SECONDARY_OUTPUT_VALUE} ${output:REALPRJNAME.aar} - -### @usage: AAR_PROXY_LIBRARY() # internal -### -### The use of this module is strictly prohibited!!! -module AAR_PROXY_LIBRARY: _PROXY_LIBRARY { - .ALLOWED=SECONDARY_OUTPUT - .CMD=_AAR_PROXY_LIBRARY_CMD -} + + SET(BIN_TMP_DIR $BINDIR/tmp) + SET(BIN_GRADLE_USER_HOME_DIR $BINDIR/gradle) +} + +_SECONDARY_OUTPUT_VALUE= + +### @usage: SECONDARY_OUTPUT(filename) # internal +### +### The use of this macro is strictly prohibited!!! +macro SECONDARY_OUTPUT(OUTPUT) { + SET(_SECONDARY_OUTPUT_VALUE $OUTPUT) +} + +_AAR_PROXY_LIBRARY_CMD=$LINK_LIB && $COPY_CMD $_SECONDARY_OUTPUT_VALUE ${input;hide:_SECONDARY_OUTPUT_VALUE} ${output:REALPRJNAME.aar} + +### @usage: AAR_PROXY_LIBRARY() # internal +### +### The use of this module is strictly prohibited!!! +module AAR_PROXY_LIBRARY: _PROXY_LIBRARY { + .ALLOWED=SECONDARY_OUTPUT + .CMD=_AAR_PROXY_LIBRARY_CMD +} diff --git a/build/conf/project_specific/maps/asrc.conf b/build/conf/project_specific/maps/asrc.conf index dee6354cbc..d5b1a0251d 100644 --- a/build/conf/project_specific/maps/asrc.conf +++ b/build/conf/project_specific/maps/asrc.conf @@ -1,122 +1,122 @@ -_BUNDLE_DELIM_JAVA=__DELIM_JAVA__ -_BUNDLE_DELIM_RES=__DELIM_RES__ -_BUNDLE_DELIM_ASSETS=__DELIM_ASSETS__ -_BUNDLE_DELIM_AIDL=__DELIM_AIDL__ - -_BUNDLE_EXTRA_INPUTS_VALUE= -### @usage: BUNDLE_EXTRA_INPUTS(filenames...) # internal -macro BUNDLE_EXTRA_INPUTS(INPUTS...) { - SET_APPEND(_BUNDLE_EXTRA_INPUTS_VALUE $INPUTS) -} - -_BUNDLE_AIDL_SRCS_VALUE= -### @usage: BUNDLE_AIDL_SRCS(dirname filenames...) # internal -macro BUNDLE_AIDL_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_BUNDLE_AIDL_SRCS_VALUE $_BUNDLE_DELIM_AIDL $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE}) - BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_BUNDLE_JAVA_SRCS_VALUE= -### @usage: BUNDLE_JAVA_SRCS(dirname filenames...) # internal -macro BUNDLE_JAVA_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_BUNDLE_JAVA_SRCS_VALUE $_BUNDLE_DELIM_JAVA $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE}) - BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_BUNDLE_RES_SRCS_VALUE= -### @usage: BUNDLE_RES_SRCS(dirname filenames...) # internal -macro BUNDLE_RES_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_BUNDLE_RES_SRCS_VALUE $_BUNDLE_DELIM_RES $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE}) - BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_BUNDLE_ASSETS_SRCS_VALUE= -### @usage: BUNDLE_ASSETS_SRCS(dirname filenames...) # internal -macro BUNDLE_ASSETS_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_BUNDLE_ASSETS_SRCS_VALUE $_BUNDLE_DELIM_ASSETS $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE}) - BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_BUNDLE_SRCS_VALUE=$_BUNDLE_AIDL_SRCS_VALUE $_BUNDLE_ASSETS_SRCS_VALUE $_BUNDLE_JAVA_SRCS_VALUE $_BUNDLE_RES_SRCS_VALUE - -macro _COMPILE_ASRC_IMPL(EXTRA_INPUTS...) { - .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output $TARGET ${kv;hide:"p AC"} $kv;hide:"pc light-blue"} ${kv;hide:"show_out"} -} - -_COMPILE_ASRC=$_COMPILE_ASRC_IMPL($_ASRC_EXTRA_INPUTS_VALUE) - -COMPILE_ASRC_MF=$_COMPILE_ASRC && $GENERATE_MF - -### @usage: ASRC_LIBRARY() # internal -module ASRC_LIBRARY: _BASE_UNIT { - .CMD=COMPILE_ASRC_MF - .ALL_INS_TO_OUT=no - .PEERDIR_POLICY=as_include - .FINAL_TARGET=no - PEERDIR_TAGS=JAVA_PROTO JAVA_IDL - MODULE_TYPE=Library - SET(MODULE_SUFFIX .asrc) - SET(DONT_RESOLVE_INCLUDES yes) - SET(NEED_PLATFORM_PEERDIRS no) - - NO_RUNTIME() -} - -macro _MOBILE_LIBRARY_PREREQUISITES_IMPL(OUTPUT, EXTRA_INPUTS...) { - .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --input $_BUNDLE_SRCS_VALUE --output $OUTPUT ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} -} - -macro _MOBILE_LIBRARY_PREREQUISITES_CMD(OUTPUT, EXTRA_INPUTS...) { - .CMD=${output;hide:OUTPUT} ${input;hide:EXTRA_INPUTS} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} $_MOBILE_LIBRARY_PREREQUISITES_IMPL($OUTPUT $EXTRA_INPUTS) -} - -when ($OS_ANDROID == "yes") { - LINK_MOBILE_LIB=$LINK_LIB && $_MOBILE_LIBRARY_PREREQUISITES_CMD(${BINDIR}/$MODULE_PREFIX$REALPRJNAME$MODULE_SUFFIX.asrc $_BUNDLE_EXTRA_INPUTS_VALUE) -} -otherwise { - LINK_MOBILE_LIB=$LINK_LIB -} - -### @usage: MOBILE_LIBRARY() # internal -module MOBILE_LIBRARY: LIBRARY { - .CMD=LINK_MOBILE_LIB - DISABLE(NEED_ADD_FAKE_SRC) -} - -_JSRC_PROXY_MOBILE_LIBRARY_CMDLINE=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --jsrcs ${ext=.jsrc;tags_in=local:PEERS} --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.asrc:REALPRJNAME} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} - -macro _JSRC_PROXY_MOBILE_LIBRARY_CMD_IMPL(EXTRA_INPUTS...) { - .CMD=$_JSRC_PROXY_MOBILE_LIBRARY_CMDLINE -} - -JSRC_PROXY_MOBILE_LIBRARY_CMD=$LINK_LIB && $_JSRC_PROXY_MOBILE_LIBRARY_CMD_IMPL($_BUNDLE_EXTRA_INPUTS_VALUE) - -### @usage: JSRC_PROXY_MOBILE_LIBRARY() # internal -module JSRC_PROXY_MOBILE_LIBRARY: MOBILE_LIBRARY { - .CMD=JSRC_PROXY_MOBILE_LIBRARY_CMD - .PEERDIR_POLICY=as_build_from - .PROXY=yes - - SET(MODULE_TYPE LIBRARY) - DISABLE(NEED_ADD_FAKE_SRC) - - PEERDIR_TAGS=JAVA_PROTO JAVA_IDL - - SET(BIN_TMP_DIR ${BINDIR}/tmp) - - NO_UTIL() -} - -_MOBILE_DLL_PREREQUISITES_CMDLINE=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --asrcs ${PEERS.arcs} --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.asrc:REALPRJNAME} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} - -macro _MOBILE_DLL_PREREQUISITES_CMD(EXTRA_INPUTS...) { - .CMD=$_MOBILE_DLL_PREREQUISITES_CMDLINE -} - -when ($OS_ANDROID == "yes") { - LINK_MOBILE_DLL=$LINK_DYN_LIB && $_MOBILE_DLL_PREREQUISITES_CMD($_BUNDLE_EXTRA_INPUTS_VALUE) -} -otherwise { - LINK_MOBILE_DLL=$LINK_DYN_LIB -} - +_BUNDLE_DELIM_JAVA=__DELIM_JAVA__ +_BUNDLE_DELIM_RES=__DELIM_RES__ +_BUNDLE_DELIM_ASSETS=__DELIM_ASSETS__ +_BUNDLE_DELIM_AIDL=__DELIM_AIDL__ + +_BUNDLE_EXTRA_INPUTS_VALUE= +### @usage: BUNDLE_EXTRA_INPUTS(filenames...) # internal +macro BUNDLE_EXTRA_INPUTS(INPUTS...) { + SET_APPEND(_BUNDLE_EXTRA_INPUTS_VALUE $INPUTS) +} + +_BUNDLE_AIDL_SRCS_VALUE= +### @usage: BUNDLE_AIDL_SRCS(dirname filenames...) # internal +macro BUNDLE_AIDL_SRCS(PREFIX, ABSOLUTE[], FILES...) { + SET_APPEND(_BUNDLE_AIDL_SRCS_VALUE $_BUNDLE_DELIM_AIDL $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE}) + BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE}) +} + +_BUNDLE_JAVA_SRCS_VALUE= +### @usage: BUNDLE_JAVA_SRCS(dirname filenames...) # internal +macro BUNDLE_JAVA_SRCS(PREFIX, ABSOLUTE[], FILES...) { + SET_APPEND(_BUNDLE_JAVA_SRCS_VALUE $_BUNDLE_DELIM_JAVA $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE}) + BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE}) +} + +_BUNDLE_RES_SRCS_VALUE= +### @usage: BUNDLE_RES_SRCS(dirname filenames...) # internal +macro BUNDLE_RES_SRCS(PREFIX, ABSOLUTE[], FILES...) { + SET_APPEND(_BUNDLE_RES_SRCS_VALUE $_BUNDLE_DELIM_RES $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE}) + BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE}) +} + +_BUNDLE_ASSETS_SRCS_VALUE= +### @usage: BUNDLE_ASSETS_SRCS(dirname filenames...) # internal +macro BUNDLE_ASSETS_SRCS(PREFIX, ABSOLUTE[], FILES...) { + SET_APPEND(_BUNDLE_ASSETS_SRCS_VALUE $_BUNDLE_DELIM_ASSETS $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE}) + BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE}) +} + +_BUNDLE_SRCS_VALUE=$_BUNDLE_AIDL_SRCS_VALUE $_BUNDLE_ASSETS_SRCS_VALUE $_BUNDLE_JAVA_SRCS_VALUE $_BUNDLE_RES_SRCS_VALUE + +macro _COMPILE_ASRC_IMPL(EXTRA_INPUTS...) { + .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output $TARGET ${kv;hide:"p AC"} $kv;hide:"pc light-blue"} ${kv;hide:"show_out"} +} + +_COMPILE_ASRC=$_COMPILE_ASRC_IMPL($_ASRC_EXTRA_INPUTS_VALUE) + +COMPILE_ASRC_MF=$_COMPILE_ASRC && $GENERATE_MF + +### @usage: ASRC_LIBRARY() # internal +module ASRC_LIBRARY: _BASE_UNIT { + .CMD=COMPILE_ASRC_MF + .ALL_INS_TO_OUT=no + .PEERDIR_POLICY=as_include + .FINAL_TARGET=no + PEERDIR_TAGS=JAVA_PROTO JAVA_IDL + MODULE_TYPE=Library + SET(MODULE_SUFFIX .asrc) + SET(DONT_RESOLVE_INCLUDES yes) + SET(NEED_PLATFORM_PEERDIRS no) + + NO_RUNTIME() +} + +macro _MOBILE_LIBRARY_PREREQUISITES_IMPL(OUTPUT, EXTRA_INPUTS...) { + .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --input $_BUNDLE_SRCS_VALUE --output $OUTPUT ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} +} + +macro _MOBILE_LIBRARY_PREREQUISITES_CMD(OUTPUT, EXTRA_INPUTS...) { + .CMD=${output;hide:OUTPUT} ${input;hide:EXTRA_INPUTS} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} $_MOBILE_LIBRARY_PREREQUISITES_IMPL($OUTPUT $EXTRA_INPUTS) +} + +when ($OS_ANDROID == "yes") { + LINK_MOBILE_LIB=$LINK_LIB && $_MOBILE_LIBRARY_PREREQUISITES_CMD(${BINDIR}/$MODULE_PREFIX$REALPRJNAME$MODULE_SUFFIX.asrc $_BUNDLE_EXTRA_INPUTS_VALUE) +} +otherwise { + LINK_MOBILE_LIB=$LINK_LIB +} + +### @usage: MOBILE_LIBRARY() # internal +module MOBILE_LIBRARY: LIBRARY { + .CMD=LINK_MOBILE_LIB + DISABLE(NEED_ADD_FAKE_SRC) +} + +_JSRC_PROXY_MOBILE_LIBRARY_CMDLINE=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --jsrcs ${ext=.jsrc;tags_in=local:PEERS} --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.asrc:REALPRJNAME} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} + +macro _JSRC_PROXY_MOBILE_LIBRARY_CMD_IMPL(EXTRA_INPUTS...) { + .CMD=$_JSRC_PROXY_MOBILE_LIBRARY_CMDLINE +} + +JSRC_PROXY_MOBILE_LIBRARY_CMD=$LINK_LIB && $_JSRC_PROXY_MOBILE_LIBRARY_CMD_IMPL($_BUNDLE_EXTRA_INPUTS_VALUE) + +### @usage: JSRC_PROXY_MOBILE_LIBRARY() # internal +module JSRC_PROXY_MOBILE_LIBRARY: MOBILE_LIBRARY { + .CMD=JSRC_PROXY_MOBILE_LIBRARY_CMD + .PEERDIR_POLICY=as_build_from + .PROXY=yes + + SET(MODULE_TYPE LIBRARY) + DISABLE(NEED_ADD_FAKE_SRC) + + PEERDIR_TAGS=JAVA_PROTO JAVA_IDL + + SET(BIN_TMP_DIR ${BINDIR}/tmp) + + NO_UTIL() +} + +_MOBILE_DLL_PREREQUISITES_CMDLINE=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --asrcs ${PEERS.arcs} --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.asrc:REALPRJNAME} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} + +macro _MOBILE_DLL_PREREQUISITES_CMD(EXTRA_INPUTS...) { + .CMD=$_MOBILE_DLL_PREREQUISITES_CMDLINE +} + +when ($OS_ANDROID == "yes") { + LINK_MOBILE_DLL=$LINK_DYN_LIB && $_MOBILE_DLL_PREREQUISITES_CMD($_BUNDLE_EXTRA_INPUTS_VALUE) +} +otherwise { + LINK_MOBILE_DLL=$LINK_DYN_LIB +} + diff --git a/build/conf/project_specific/maps/mapkit.conf b/build/conf/project_specific/maps/mapkit.conf index d64b41f72a..f67f92a780 100644 --- a/build/conf/project_specific/maps/mapkit.conf +++ b/build/conf/project_specific/maps/mapkit.conf @@ -1,283 +1,283 @@ -MAPKIT_IDL_INCLUDES= -macro MAPKIT_ADDINCL(Dirs...) { - ADDINCL(${pre=FOR idl :Dirs}) - SET_APPEND(MAPKIT_IDL_INCLUDES $Dirs) -} - -### @usage: MAPS_IDL_ADDINCL(dirnames...) # internal -### -### Warpper for MAPKIT_ADDINCL macro which is used for mobile mapkit build -macro MAPS_IDL_ADDINCL(Dirs...) { - MAPKIT_ADDINCL($Dirs) -} - -### @usage: _MAPKITIDL_PROXY(args...) # internal -### -### Proxy macro for MAPKITIDL which adds PEERDIR to YMAKE resources -macro _MAPKITIDL_PROXY(Args...) { - MAPKITIDL($Args) - ENABLE(USE_YMAKE_RESOURCE) +MAPKIT_IDL_INCLUDES= +macro MAPKIT_ADDINCL(Dirs...) { + ADDINCL(${pre=FOR idl :Dirs}) + SET_APPEND(MAPKIT_IDL_INCLUDES $Dirs) +} + +### @usage: MAPS_IDL_ADDINCL(dirnames...) # internal +### +### Warpper for MAPKIT_ADDINCL macro which is used for mobile mapkit build +macro MAPS_IDL_ADDINCL(Dirs...) { + MAPKIT_ADDINCL($Dirs) +} + +### @usage: _MAPKITIDL_PROXY(args...) # internal +### +### Proxy macro for MAPKITIDL which adds PEERDIR to YMAKE resources +macro _MAPKITIDL_PROXY(Args...) { + MAPKITIDL($Args) + ENABLE(USE_YMAKE_RESOURCE) SET_APPEND(_MAKEFILE_INCLUDE_LIKE_TEXT_DEPS ${ext=idl:Args}) -} - -MAPS_IDL_FILTER= - -### @usage: MAPS_IDL_SRCS(filenames...) # internal -### -### Warpper for MAPKITIDL macro which is used for mobile mapkit build -macro MAPS_IDL_SRCS(Srcs...) { - _MAPKITIDL_PROXY($Srcs ${MAPS_IDL_FILTER}) -} - -### @usage: MAPS_IDL_GLOBAL_SRCS(filenames...) # internal -### -### Warpper for MAPKITIDL macro which is used for mobile mapkit build -macro MAPS_IDL_GLOBAL_SRCS(Srcs...) { - _MAPKITIDL_PROXY(GLOBAL_OUTPUTS $Srcs ${MAPS_IDL_FILTER}) -} - -### @usage: MAPSMOBI_SRCS(filenames...) # internal -### -### Make all source files listed as GLOBAL or not (depending on the value of -### MAPSMOBI_USE_SRCS_GLOBAL). Be careful since the value of -### MAPSMOBI_USE_SRCS_GLOBAL matters! If the value of this variable is equal to -### GLOBAL then call to MAPSMOBI_SRCS() macro behaves like call to -### GLOBAL_SRCS() macro otherwise the value of MAPSMOBI_USE_SRCS_GLOBAL is -### treated as a file name and a call to MAPSMOBI_SRCS() macro behaves like a -### call to SRCS() macro with additional argument which is the value of -### MAPSMOBI_USE_SRCS_GLOBAL variable -macro MAPSMOBI_SRCS(FILES...) { - ALL_SRCS(${MAPSMOBI_USE_SRCS_GLOBAL} $FILES) -} - -### @usage: EXPORT_MAPKIT_PROTO() # internal deprecated -### -### This macro is a temporary one and should be changed to EXPORT_YMAPS_PROTO -### when transition of mapsmobi to arcadia is finished -macro EXPORT_MAPKIT_PROTO() { - PROTO_NAMESPACE(GLOBAL maps/mapsmobi/external/proto) -} - -BEFORE_PEERS= -AFTER_PEERS= -when ($MAPKIT_WHOLE_ARCHIVE == "yes") { - when($OS_LINUX) { - BEFORE_PEERS += $START_WHOLE_ARCHIVE_VALUE - AFTER_PEERS += $END_WHOLE_ARCHIVE_VALUE - } - elsewhen($OS_DARWIN) { - LDFLAGS+=-Wl,-all_load - } -} - -### @usage: MAPKIT_ENABLE_WHOLE_ARCHIVE() # internal deprecated -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPKIT_ENABLE_WHOLE_ARCHIVE() { - ENABLE(MAPKIT_WHOLE_ARCHIVE) -} - -### @usage: MAPS_IDL_LIBRARY() -### -### Definition of multimodule that builds various variants of libraries. -### The particular variant is selected based on where PEERDIR to IDL_LIBRARY comes from. -### Now supported 2 variants: C++, Java -### Java version is not really a library but an archive of generated Java sources -multimodule MAPS_IDL_LIBRARY { - module CPP_IDL: LIBRARY { - .ALIASES=SRCS=MAPS_IDL_SRCS GLOBAL_SRCS=MAPS_IDL_GLOBAL_SRCS ADDINCL=MAPKIT_ADDINCL MAPSMOBI_SRCS=MAPS_IDL_SRCS - SET(PEERDIR_TAGS CPP_IDL CPP_PROTO __EMPTY__) - SET(MAPS_IDL_FILTER) - ENABLE(CPP_IDL) - NO_UTIL() - - when ($OS_IOS == "yes") { - CFLAGS+=-fobjc-arc - } - } - - module JAVA_IDL: JSRC_LIBRARY { - .ALIASES=SRCS=MAPS_IDL_SRCS GLOBAL_SRCS=MAPS_IDL_SRCS ADDINCL=MAPKIT_ADDINCL MAPSMOBI_SRCS=MAPS_IDL_SRCS - .IGNORED=CPP_ADDINCL - SET(PEERDIR_TAGS JAVA_IDL JAVA_PROTO) - SET(MAPS_IDL_FILTER FILTER .java) - ENABLE(JAVA_IDL) - } -} - -### @usage: MAPSMOBI_COLLECT_ASSETS_FILES(varname [dir]) # internal -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPSMOBI_COLLECT_ASSETS_FILES(VAR, DIR="") { - _GLOB($VAR ${suf=/:DIR}**/*) - RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) -} - -### @usage: MAPSMOBI_COLLECT_AIDL_FILES(varname [dir]) # internal -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPSMOBI_COLLECT_AIDL_FILES(VAR, DIR="") { - _GLOB($VAR ${suf=/:DIR}**/*.aidl) - RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) -} - -### @usage: MAPSMOBI_COLLECT_JAVA_FILES(varname [dir]) # internal -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPSMOBI_COLLECT_JAVA_FILES(VAR, DIR="") { - _GLOB($VAR ${suf=/:DIR}**/*.java) - RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) -} - -### @usage: MAPSMOBI_COLLECT_JNI_LIBS_FILES(varname [dir]) # internal -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPSMOBI_COLLECT_JNI_LIBS_FILES(VAR, DIR="") { - _GLOB($VAR ${suf=/:DIR}**/*.so) - RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) -} - -### @usage: MAPSMOBI_COLLECT_RES_FILES(varname [dir]) # internal -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPSMOBI_COLLECT_RES_FILES(VAR, DIR="") { - _GLOB($VAR ${suf=/:DIR}**/*.(xml|png)) - RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) -} - -### @usage: MAPSMOBI_COLLECT_TPL_FILES(varname [dir]) # internal -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPSMOBI_COLLECT_TPL_FILES(VAR, DIR="") { - _GLOB($VAR ${suf=/:DIR}**/*.tpl) - RESTRICT_PATH(tools/idl MSG This macro is for use in mapsmobi projects) -} - -### @usage: MAPS_GARDEN_COLLECT_MODULE_TRAITS(varnamei dir) # internal -### -### This macro is strictly prohibited to use outside of maps/garden project -macro MAPS_GARDEN_COLLECT_MODULE_TRAITS(VAR, DIR) { - _GLOB($VAR $DIR/*/module_traits.json) - RESTRICT_PATH(maps/garden/sdk/module_traits/tests/module_traits_bundle MSG This macro is for use in maps/garden project) -} - -# mapsmobi build configuration - +} + +MAPS_IDL_FILTER= + +### @usage: MAPS_IDL_SRCS(filenames...) # internal +### +### Warpper for MAPKITIDL macro which is used for mobile mapkit build +macro MAPS_IDL_SRCS(Srcs...) { + _MAPKITIDL_PROXY($Srcs ${MAPS_IDL_FILTER}) +} + +### @usage: MAPS_IDL_GLOBAL_SRCS(filenames...) # internal +### +### Warpper for MAPKITIDL macro which is used for mobile mapkit build +macro MAPS_IDL_GLOBAL_SRCS(Srcs...) { + _MAPKITIDL_PROXY(GLOBAL_OUTPUTS $Srcs ${MAPS_IDL_FILTER}) +} + +### @usage: MAPSMOBI_SRCS(filenames...) # internal +### +### Make all source files listed as GLOBAL or not (depending on the value of +### MAPSMOBI_USE_SRCS_GLOBAL). Be careful since the value of +### MAPSMOBI_USE_SRCS_GLOBAL matters! If the value of this variable is equal to +### GLOBAL then call to MAPSMOBI_SRCS() macro behaves like call to +### GLOBAL_SRCS() macro otherwise the value of MAPSMOBI_USE_SRCS_GLOBAL is +### treated as a file name and a call to MAPSMOBI_SRCS() macro behaves like a +### call to SRCS() macro with additional argument which is the value of +### MAPSMOBI_USE_SRCS_GLOBAL variable +macro MAPSMOBI_SRCS(FILES...) { + ALL_SRCS(${MAPSMOBI_USE_SRCS_GLOBAL} $FILES) +} + +### @usage: EXPORT_MAPKIT_PROTO() # internal deprecated +### +### This macro is a temporary one and should be changed to EXPORT_YMAPS_PROTO +### when transition of mapsmobi to arcadia is finished +macro EXPORT_MAPKIT_PROTO() { + PROTO_NAMESPACE(GLOBAL maps/mapsmobi/external/proto) +} + +BEFORE_PEERS= +AFTER_PEERS= +when ($MAPKIT_WHOLE_ARCHIVE == "yes") { + when($OS_LINUX) { + BEFORE_PEERS += $START_WHOLE_ARCHIVE_VALUE + AFTER_PEERS += $END_WHOLE_ARCHIVE_VALUE + } + elsewhen($OS_DARWIN) { + LDFLAGS+=-Wl,-all_load + } +} + +### @usage: MAPKIT_ENABLE_WHOLE_ARCHIVE() # internal deprecated +### +### This macro is strictly prohibited to use outside of mapsmobi project +macro MAPKIT_ENABLE_WHOLE_ARCHIVE() { + ENABLE(MAPKIT_WHOLE_ARCHIVE) +} + +### @usage: MAPS_IDL_LIBRARY() +### +### Definition of multimodule that builds various variants of libraries. +### The particular variant is selected based on where PEERDIR to IDL_LIBRARY comes from. +### Now supported 2 variants: C++, Java +### Java version is not really a library but an archive of generated Java sources +multimodule MAPS_IDL_LIBRARY { + module CPP_IDL: LIBRARY { + .ALIASES=SRCS=MAPS_IDL_SRCS GLOBAL_SRCS=MAPS_IDL_GLOBAL_SRCS ADDINCL=MAPKIT_ADDINCL MAPSMOBI_SRCS=MAPS_IDL_SRCS + SET(PEERDIR_TAGS CPP_IDL CPP_PROTO __EMPTY__) + SET(MAPS_IDL_FILTER) + ENABLE(CPP_IDL) + NO_UTIL() + + when ($OS_IOS == "yes") { + CFLAGS+=-fobjc-arc + } + } + + module JAVA_IDL: JSRC_LIBRARY { + .ALIASES=SRCS=MAPS_IDL_SRCS GLOBAL_SRCS=MAPS_IDL_SRCS ADDINCL=MAPKIT_ADDINCL MAPSMOBI_SRCS=MAPS_IDL_SRCS + .IGNORED=CPP_ADDINCL + SET(PEERDIR_TAGS JAVA_IDL JAVA_PROTO) + SET(MAPS_IDL_FILTER FILTER .java) + ENABLE(JAVA_IDL) + } +} + +### @usage: MAPSMOBI_COLLECT_ASSETS_FILES(varname [dir]) # internal +### +### This macro is strictly prohibited to use outside of mapsmobi project +macro MAPSMOBI_COLLECT_ASSETS_FILES(VAR, DIR="") { + _GLOB($VAR ${suf=/:DIR}**/*) + RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) +} + +### @usage: MAPSMOBI_COLLECT_AIDL_FILES(varname [dir]) # internal +### +### This macro is strictly prohibited to use outside of mapsmobi project +macro MAPSMOBI_COLLECT_AIDL_FILES(VAR, DIR="") { + _GLOB($VAR ${suf=/:DIR}**/*.aidl) + RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) +} + +### @usage: MAPSMOBI_COLLECT_JAVA_FILES(varname [dir]) # internal +### +### This macro is strictly prohibited to use outside of mapsmobi project +macro MAPSMOBI_COLLECT_JAVA_FILES(VAR, DIR="") { + _GLOB($VAR ${suf=/:DIR}**/*.java) + RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) +} + +### @usage: MAPSMOBI_COLLECT_JNI_LIBS_FILES(varname [dir]) # internal +### +### This macro is strictly prohibited to use outside of mapsmobi project +macro MAPSMOBI_COLLECT_JNI_LIBS_FILES(VAR, DIR="") { + _GLOB($VAR ${suf=/:DIR}**/*.so) + RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) +} + +### @usage: MAPSMOBI_COLLECT_RES_FILES(varname [dir]) # internal +### +### This macro is strictly prohibited to use outside of mapsmobi project +macro MAPSMOBI_COLLECT_RES_FILES(VAR, DIR="") { + _GLOB($VAR ${suf=/:DIR}**/*.(xml|png)) + RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) +} + +### @usage: MAPSMOBI_COLLECT_TPL_FILES(varname [dir]) # internal +### +### This macro is strictly prohibited to use outside of mapsmobi project +macro MAPSMOBI_COLLECT_TPL_FILES(VAR, DIR="") { + _GLOB($VAR ${suf=/:DIR}**/*.tpl) + RESTRICT_PATH(tools/idl MSG This macro is for use in mapsmobi projects) +} + +### @usage: MAPS_GARDEN_COLLECT_MODULE_TRAITS(varnamei dir) # internal +### +### This macro is strictly prohibited to use outside of maps/garden project +macro MAPS_GARDEN_COLLECT_MODULE_TRAITS(VAR, DIR) { + _GLOB($VAR $DIR/*/module_traits.json) + RESTRICT_PATH(maps/garden/sdk/module_traits/tests/module_traits_bundle MSG This macro is for use in maps/garden project) +} + +# mapsmobi build configuration + MAPSMOBI_FAKEID=${FAKEID}_r8609790 -MAPSMOBI_BUILD= -YANDEX_EXPORT= -YRT_EXPORT= -MAPSMOBI_CPP_PROTO_PLUGINS= -STATIC_STL= -EXPORT_ALL_SYMBOLS= -when ($MAPSMOBI_BUILD_HOST || $MAPSMOBI_BUILD_TARGET) { - MAPSMOBI_BUILD=yes -} -when ($MAPSMOBI_BUILD) { - CFLAGS+=-DMOBILE_BUILD ${hide:MAPSMOBI_FAKEID} - MAPKIT_BASE_PROTO_PACKAGE=yandex.maps.proto - MAPKIT_PROTO_ROOT=maps/doc/proto - MAPKIT_IDL_FRAMEWORK=maps/mobile/libs/idl_frameworks -} -when ($MAPSMOBI_BUILD_TARGET) { - ALLOCATOR=FAKE - USE_VANILLA_PROTOC=yes - PROTOBUF_LITE=yes - CPP_PROTO_PLUGINS=lite${pre=,:MAPSMOBI_CPP_PROTO_PLUGINS}: - when ($OPENSOURCE != "yes") { - SYSINCL+=build/yandex_specific/sysincl/mapsmobi.yml - } - - CFLAGS+=-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DBOOST_CB_DISABLE_DEBUG -DBOOST_COROUTINES_NO_DEPRECATION_WARNING -DYANDEX_EXPORT=${YANDEX_EXPORT} -DYRT_EXPORT=${YRT_EXPORT} -} -when ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) { - JDK_VERSION=8 - MAPSMOBI_CPP_PROTO_PLUGINS="dllexport_decl=YANDEX_EXPORT" - YANDEX_EXPORT=__attribute__((visibility(\"default\"))) - CFLAGS+=-fvisibility=hidden - - when ($MAPS_MOBILE_EXPORT_CPP_API) { - LDFLAGS+=-lc++_shared - CFLAGS+=-DZLIB_DLL - CFLAGS+=-DPROTOBUF_USE_DLLS -DLIBPROTOBUF_EXPORTS - CFLAGS+=-DPNG_IMPEXP=${YANDEX_EXPORT} - CFLAGS+=-DBOOST_ALL_DYN_LINK - CFLAGS+=-DBOOST_SYMBOL_EXPORT=${YANDEX_EXPORT} - DYNAMIC_BOOST=yes - } - otherwise { - STATIC_STL=yes - YANDEX_EXPORT= - CFLAGS+=-DBOOST_SYMBOL_EXPORT= - CFLAGS+=-DBOOST_SYMBOL_VISIBLE= - LDFLAGS+=-lc++_static -Wl,--exclude-libs,ALL -static-libstdc++ - USE_GLOBAL_CMD=no - } - - when ($EXPORT_ALL_SYMBOLS) { - CFLAGS+=-fvisibility=default - } - +MAPSMOBI_BUILD= +YANDEX_EXPORT= +YRT_EXPORT= +MAPSMOBI_CPP_PROTO_PLUGINS= +STATIC_STL= +EXPORT_ALL_SYMBOLS= +when ($MAPSMOBI_BUILD_HOST || $MAPSMOBI_BUILD_TARGET) { + MAPSMOBI_BUILD=yes +} +when ($MAPSMOBI_BUILD) { + CFLAGS+=-DMOBILE_BUILD ${hide:MAPSMOBI_FAKEID} + MAPKIT_BASE_PROTO_PACKAGE=yandex.maps.proto + MAPKIT_PROTO_ROOT=maps/doc/proto + MAPKIT_IDL_FRAMEWORK=maps/mobile/libs/idl_frameworks +} +when ($MAPSMOBI_BUILD_TARGET) { + ALLOCATOR=FAKE + USE_VANILLA_PROTOC=yes + PROTOBUF_LITE=yes + CPP_PROTO_PLUGINS=lite${pre=,:MAPSMOBI_CPP_PROTO_PLUGINS}: + when ($OPENSOURCE != "yes") { + SYSINCL+=build/yandex_specific/sysincl/mapsmobi.yml + } + + CFLAGS+=-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DBOOST_CB_DISABLE_DEBUG -DBOOST_COROUTINES_NO_DEPRECATION_WARNING -DYANDEX_EXPORT=${YANDEX_EXPORT} -DYRT_EXPORT=${YRT_EXPORT} +} +when ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) { + JDK_VERSION=8 + MAPSMOBI_CPP_PROTO_PLUGINS="dllexport_decl=YANDEX_EXPORT" + YANDEX_EXPORT=__attribute__((visibility(\"default\"))) + CFLAGS+=-fvisibility=hidden + + when ($MAPS_MOBILE_EXPORT_CPP_API) { + LDFLAGS+=-lc++_shared + CFLAGS+=-DZLIB_DLL + CFLAGS+=-DPROTOBUF_USE_DLLS -DLIBPROTOBUF_EXPORTS + CFLAGS+=-DPNG_IMPEXP=${YANDEX_EXPORT} + CFLAGS+=-DBOOST_ALL_DYN_LINK + CFLAGS+=-DBOOST_SYMBOL_EXPORT=${YANDEX_EXPORT} + DYNAMIC_BOOST=yes + } + otherwise { + STATIC_STL=yes + YANDEX_EXPORT= + CFLAGS+=-DBOOST_SYMBOL_EXPORT= + CFLAGS+=-DBOOST_SYMBOL_VISIBLE= + LDFLAGS+=-lc++_static -Wl,--exclude-libs,ALL -static-libstdc++ + USE_GLOBAL_CMD=no + } + + when ($EXPORT_ALL_SYMBOLS) { + CFLAGS+=-fvisibility=default + } + when ($NO_DEBUGINFO != "yes" && $REDUCED_DEBUGINFO) { CFLAGS+=-g1 } - CFLAGS+=-DANDROID -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -Wa,--noexecstack - CFLAGS+=-Qunused-arguments -Wno-unused-function -Wno-pessimizing-move -Wno-missing-field-initializers -Wno-missing-braces -Wno-unused-parameter -Wno-vexing-parse -Wno-sign-compare -Wno-deprecated-declarations - - LDFLAGS+=-lc -lm -llog -Bsymbolic -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--no-undefined - - when ($BT_RELEASE || $BT_RELWITHDEBINFO) { - CFLAGS+=-fomit-frame-pointer -fvisibility-inlines-hidden -ffunction-sections -fdata-sections - LDFLAGS+=-Wl,--gc-sections -Wl,--build-id - } - - when ($ARCH_ARM7) { - CFLAGS+=-mfloat-abi=softfp - #Android clang overaligns some float types which causes NEON programs to fail on old Android versions. So we disable NEON. - #See https://github.com/android/ndk/issues/640 for more information - CFLAGS+=-mfpu=vfpv3-d16 - } - elsewhen ($ARCH_ARM64) { - } - elsewhen ($ARCH_I386) { - CFLAGS+=-fstrict-aliasing -mstackrealign -DTLS_STACK_PROTECTOR - } - elsewhen ($ARCH_X86_64) { + CFLAGS+=-DANDROID -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -Wa,--noexecstack + CFLAGS+=-Qunused-arguments -Wno-unused-function -Wno-pessimizing-move -Wno-missing-field-initializers -Wno-missing-braces -Wno-unused-parameter -Wno-vexing-parse -Wno-sign-compare -Wno-deprecated-declarations + + LDFLAGS+=-lc -lm -llog -Bsymbolic -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--no-undefined + + when ($BT_RELEASE || $BT_RELWITHDEBINFO) { + CFLAGS+=-fomit-frame-pointer -fvisibility-inlines-hidden -ffunction-sections -fdata-sections + LDFLAGS+=-Wl,--gc-sections -Wl,--build-id + } + + when ($ARCH_ARM7) { + CFLAGS+=-mfloat-abi=softfp + #Android clang overaligns some float types which causes NEON programs to fail on old Android versions. So we disable NEON. + #See https://github.com/android/ndk/issues/640 for more information + CFLAGS+=-mfpu=vfpv3-d16 + } + elsewhen ($ARCH_ARM64) { + } + elsewhen ($ARCH_I386) { + CFLAGS+=-fstrict-aliasing -mstackrealign -DTLS_STACK_PROTECTOR + } + elsewhen ($ARCH_X86_64) { CFLAGS+=-fstrict-aliasing -mstackrealign -march=x86-64 -msse4.2 -mpopcnt -m64 -DTLS_STACK_PROTECTOR - } - otherwise { - PEERDIR+=__unsupported_architecture_for_android__ - } -} -when ($MAPSMOBI_BUILD_TARGET && $OS_DARWIN) { - QT_REQUIRED=yes - LDFLAGS+=-lc++ - CFLAGS+=-DBOOST_SYMBOL_EXPORT= - CFLAGS+=-DBOOST_SYMBOL_VISIBLE= -} -when ($MAPSMOBI_BUILD_TARGET && $OS_IOS) { - CFLAGS+=-DIOS -stdlib=libc++ -fvisibility=hidden - CFLAGS+=-DBOOST_SYMBOL_EXPORT= - CFLAGS+=-DBOOST_SYMBOL_VISIBLE= - when ($MAPS_MOBILE_EXPORT_OBJC_API) { - YRT_EXPORT=__attribute__((visibility(\"default\"))) - } -} -when ($MAPSMOBI_BUILD_TARGET && $OS_LINUX) { - when ($NO_GRAPHICS != "yes") { - QT_REQUIRED=yes - OPENGL_REQUIRED=yes - } - OS_SDK=ubuntu-16 - PIC=yes - LDFLAGS+=-lstdc++ -lgcc_s - CFLAGS+=-DBOOST_SYMBOL_EXPORT= - CFLAGS+=-DBOOST_SYMBOL_VISIBLE= -} -when ($MAPSMOBI_BUILD_TARGET && $OS_YOCTO) { - QT_REQUIRED=yes - PIC=yes - CFLAGS+=-DBOOST_SYMBOL_EXPORT= - CFLAGS+=-DBOOST_SYMBOL_VISIBLE= -} + } + otherwise { + PEERDIR+=__unsupported_architecture_for_android__ + } +} +when ($MAPSMOBI_BUILD_TARGET && $OS_DARWIN) { + QT_REQUIRED=yes + LDFLAGS+=-lc++ + CFLAGS+=-DBOOST_SYMBOL_EXPORT= + CFLAGS+=-DBOOST_SYMBOL_VISIBLE= +} +when ($MAPSMOBI_BUILD_TARGET && $OS_IOS) { + CFLAGS+=-DIOS -stdlib=libc++ -fvisibility=hidden + CFLAGS+=-DBOOST_SYMBOL_EXPORT= + CFLAGS+=-DBOOST_SYMBOL_VISIBLE= + when ($MAPS_MOBILE_EXPORT_OBJC_API) { + YRT_EXPORT=__attribute__((visibility(\"default\"))) + } +} +when ($MAPSMOBI_BUILD_TARGET && $OS_LINUX) { + when ($NO_GRAPHICS != "yes") { + QT_REQUIRED=yes + OPENGL_REQUIRED=yes + } + OS_SDK=ubuntu-16 + PIC=yes + LDFLAGS+=-lstdc++ -lgcc_s + CFLAGS+=-DBOOST_SYMBOL_EXPORT= + CFLAGS+=-DBOOST_SYMBOL_VISIBLE= +} +when ($MAPSMOBI_BUILD_TARGET && $OS_YOCTO) { + QT_REQUIRED=yes + PIC=yes + CFLAGS+=-DBOOST_SYMBOL_EXPORT= + CFLAGS+=-DBOOST_SYMBOL_VISIBLE= +} diff --git a/build/conf/project_specific/maps/sproto.conf b/build/conf/project_specific/maps/sproto.conf index 1a62563fc1..696b0c505b 100644 --- a/build/conf/project_specific/maps/sproto.conf +++ b/build/conf/project_specific/maps/sproto.conf @@ -1,21 +1,21 @@ -### @usage: EXPORT_YMAPS_PROTO() # maps-specific -### -### Maps-specific .proto handling: IMPORT_YMAPS_PROTO() + maps protobuf namespace. -macro EXPORT_YMAPS_PROTO() { - PROTO_NAMESPACE(GLOBAL maps/doc/proto) -} - -macro _YMAPS_GENERATE_SPROTO_HEADER(File) { - .CMD=${cwd;rootdir;input:File} ${tool:"maps/libs/sproto/sprotoc"} -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --sproto_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${input;rootrel:File} ${output;hide;norel;nopath;noext:File.sproto.h} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} - .PEERDIR=maps/libs/sproto -} - -### @usage: YMAPS_SPROTO(ProtoFiles...) # maps-specific -### -### Maps-specific .proto handling: generate .sproto.h files using maps/libs/sproto/sprotoc. -macro YMAPS_SPROTO(FILES...) { - SET(PROTO_HEADER_EXTS .pb.h .sproto.h) - foreach (FILE : $FILES) { - [.proto]=$_YMAPS_GENERATE_SPROTO_HEADER($FILE) - } -} +### @usage: EXPORT_YMAPS_PROTO() # maps-specific +### +### Maps-specific .proto handling: IMPORT_YMAPS_PROTO() + maps protobuf namespace. +macro EXPORT_YMAPS_PROTO() { + PROTO_NAMESPACE(GLOBAL maps/doc/proto) +} + +macro _YMAPS_GENERATE_SPROTO_HEADER(File) { + .CMD=${cwd;rootdir;input:File} ${tool:"maps/libs/sproto/sprotoc"} -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --sproto_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${input;rootrel:File} ${output;hide;norel;nopath;noext:File.sproto.h} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} + .PEERDIR=maps/libs/sproto +} + +### @usage: YMAPS_SPROTO(ProtoFiles...) # maps-specific +### +### Maps-specific .proto handling: generate .sproto.h files using maps/libs/sproto/sprotoc. +macro YMAPS_SPROTO(FILES...) { + SET(PROTO_HEADER_EXTS .pb.h .sproto.h) + foreach (FILE : $FILES) { + [.proto]=$_YMAPS_GENERATE_SPROTO_HEADER($FILE) + } +} diff --git a/build/conf/project_specific/other.conf b/build/conf/project_specific/other.conf index 602ed5cfa3..0b03f115a0 100644 --- a/build/conf/project_specific/other.conf +++ b/build/conf/project_specific/other.conf @@ -1,11 +1,11 @@ -# Catboost -BUILD_CATBOOST_SCRIPT=build/scripts/build_catboost.py -### @usage: BUILD_CATBOOST(cbmodel cbname) -### -### Generate catboost model and access code. -### cbmodel - CatBoost model file name (*.cmb). -### cbname - name for a variable (of NCatboostCalcer::TCatboostCalcer type) to be available in CPP code. -### CatBoost specific macro. -macro BUILD_CATBOOST(CbModel, CbName) { - .CMD=$YMAKE_PYTHON ${input:BUILD_CATBOOST_SCRIPT} build_cb_f $ARCADIA_ROOT $ARCH_TOOL ${input:CbModel} $CbName ${output;chksum;pre=cb.:CbName.cpp} ${output;hide;pre=CB_External_;suf=.rodata:CbName} ${output_include;hide:"kernel/catboost/catboost_calcer.h"} ${kv;hide:"p CB"} ${kv;hide:"pc yellow"} -} +# Catboost +BUILD_CATBOOST_SCRIPT=build/scripts/build_catboost.py +### @usage: BUILD_CATBOOST(cbmodel cbname) +### +### Generate catboost model and access code. +### cbmodel - CatBoost model file name (*.cmb). +### cbname - name for a variable (of NCatboostCalcer::TCatboostCalcer type) to be available in CPP code. +### CatBoost specific macro. +macro BUILD_CATBOOST(CbModel, CbName) { + .CMD=$YMAKE_PYTHON ${input:BUILD_CATBOOST_SCRIPT} build_cb_f $ARCADIA_ROOT $ARCH_TOOL ${input:CbModel} $CbName ${output;chksum;pre=cb.:CbName.cpp} ${output;hide;pre=CB_External_;suf=.rodata:CbName} ${output_include;hide:"kernel/catboost/catboost_calcer.h"} ${kv;hide:"p CB"} ${kv;hide:"pc yellow"} +} diff --git a/build/conf/project_specific/yql_udf.conf b/build/conf/project_specific/yql_udf.conf index badaf36687..26b9df8f59 100644 --- a/build/conf/project_specific/yql_udf.conf +++ b/build/conf/project_specific/yql_udf.conf @@ -1,261 +1,261 @@ when ($SANITIZER_TYPE || $USE_ARCADIA_PYTHON == "no" || $UDF_NO_PROBE == "yes" || $MUSL == "yes" || $TIDY == "yes") { - YQL_UDF_LINK_CMD=$LINK_DYN_LIB - YQL_UDF_LINK_PRG_CMD=$LINK_EXEC_DYN_LIB -} -otherwise { - YQL_UDF_LINK_CMD=$LINK_DYN_LIB && ${tool:"yql/tools/udf_probe"} $TARGET ${kv;hide:"p UD"} - YQL_UDF_LINK_PRG_CMD=$LINK_EXEC_DYN_LIB && ${tool:"yql/tools/udf_probe"} $TARGET ${kv;hide:"p UD"} -} - -### @usage: UDF_BASE(name [EXPORTS symlist_file] [PREFIX prefix]) #internal -### -### The base logic of all UDF extension modules (User-Defined Functions). -### Processing EXPORTS and PREFIX is the same as for DLL. -### -### https://wiki.yandex-team.ru/robot/manual/kiwi/userguide/#polzovatelskiefunkciiudftriggerykwcalc -module UDF_BASE: DLL_UNIT { - PRINT_MODULE_TYPE(UDF $REALPRJNAME) - - when ($MSVC != "yes" && $DARWIN != "yes") { - LDFLAGS+= -Wl,-Bsymbolic - } -} - -### @usage: UDF(name [EXPORTS symlist_file] [PREFIX prefix]) # deprecated -### -### The KiWi UDF module. -### Processing EXPORTS and PREFIX is the same as for DLL. -### -### https://wiki.yandex-team.ru/robot/manual/kiwi/userguide/#polzovatelskiefunkciiudftriggerykwcalc -module UDF: UDF_BASE { - PEERDIR(yweb/robot/kiwi/kwcalc/udflib) -} - -### @usage: UDF_LIB([name]) # deprecated -### -### The LIBRARY module for KiWi UDF, so has default PEERDIR to yweb/robot/kiwi/kwcalc/udflib. -module UDF_LIB: LIBRARY { - PEERDIR(yweb/robot/kiwi/kwcalc/udflib) -} - -UDF_NO_PROBE="no" -### @usage: UDF_NO_PROBE() -### -### Disable UDF import check at build stage -macro UDF_NO_PROBE() { - ENABLE(UDF_NO_PROBE) -} - -### @usage: YQL_UDF_TEST([name]) -### -### The module to test YQL C++ UDF. -### -### Documentation: https://yql.yandex-team.ru/docs/yt/libraries/testing/ -### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/ -module YQL_UDF_TEST: PY2TEST { - PEERDIR(yql/library/udf_test) - PEERDIR(yt/python/client_lite) - - DEPENDS(yql/tools/astdiff) - DEPENDS(yql/tools/udf_resolver) - DEPENDS(yql/tools/yqlrun) + YQL_UDF_LINK_CMD=$LINK_DYN_LIB + YQL_UDF_LINK_PRG_CMD=$LINK_EXEC_DYN_LIB +} +otherwise { + YQL_UDF_LINK_CMD=$LINK_DYN_LIB && ${tool:"yql/tools/udf_probe"} $TARGET ${kv;hide:"p UD"} + YQL_UDF_LINK_PRG_CMD=$LINK_EXEC_DYN_LIB && ${tool:"yql/tools/udf_probe"} $TARGET ${kv;hide:"p UD"} +} + +### @usage: UDF_BASE(name [EXPORTS symlist_file] [PREFIX prefix]) #internal +### +### The base logic of all UDF extension modules (User-Defined Functions). +### Processing EXPORTS and PREFIX is the same as for DLL. +### +### https://wiki.yandex-team.ru/robot/manual/kiwi/userguide/#polzovatelskiefunkciiudftriggerykwcalc +module UDF_BASE: DLL_UNIT { + PRINT_MODULE_TYPE(UDF $REALPRJNAME) + + when ($MSVC != "yes" && $DARWIN != "yes") { + LDFLAGS+= -Wl,-Bsymbolic + } +} + +### @usage: UDF(name [EXPORTS symlist_file] [PREFIX prefix]) # deprecated +### +### The KiWi UDF module. +### Processing EXPORTS and PREFIX is the same as for DLL. +### +### https://wiki.yandex-team.ru/robot/manual/kiwi/userguide/#polzovatelskiefunkciiudftriggerykwcalc +module UDF: UDF_BASE { + PEERDIR(yweb/robot/kiwi/kwcalc/udflib) +} + +### @usage: UDF_LIB([name]) # deprecated +### +### The LIBRARY module for KiWi UDF, so has default PEERDIR to yweb/robot/kiwi/kwcalc/udflib. +module UDF_LIB: LIBRARY { + PEERDIR(yweb/robot/kiwi/kwcalc/udflib) +} + +UDF_NO_PROBE="no" +### @usage: UDF_NO_PROBE() +### +### Disable UDF import check at build stage +macro UDF_NO_PROBE() { + ENABLE(UDF_NO_PROBE) +} + +### @usage: YQL_UDF_TEST([name]) +### +### The module to test YQL C++ UDF. +### +### Documentation: https://yql.yandex-team.ru/docs/yt/libraries/testing/ +### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/ +module YQL_UDF_TEST: PY2TEST { + PEERDIR(yql/library/udf_test) + PEERDIR(yt/python/client_lite) + + DEPENDS(yql/tools/astdiff) + DEPENDS(yql/tools/udf_resolver) + DEPENDS(yql/tools/yqlrun) DATA(arcadia/ydb/library/yql/mount) DATA(arcadia/yql/cfg/tests) -} - -### @usage: _ADD_YQL_UDF_DEPS() -### -### Add all needed PEERDIRs to a YQL_UDF. -### -### https://yql.yandex-team.ru/docs/yt/udf/cpp/ -macro _ADD_YQL_UDF_DEPS() { +} + +### @usage: _ADD_YQL_UDF_DEPS() +### +### Add all needed PEERDIRs to a YQL_UDF. +### +### https://yql.yandex-team.ru/docs/yt/udf/cpp/ +macro _ADD_YQL_UDF_DEPS() { PEERDIR(ydb/library/yql/public/udf) PEERDIR(ydb/library/yql/public/udf/support) -} - -### @usage: _MAKE_YQL_UDF() -### -### Make module definition an YQL UDF: add all needed dependencies, properties and flags -### -### https://yql.yandex-team.ru/docs/yt/udf/cpp/ -macro _MAKE_YQL_UDF() { - _ADD_YQL_UDF_DEPS() - SET_APPEND(USER_CXXFLAGS -DBUILD_UDF) - # For Windows using declspecs +} + +### @usage: _MAKE_YQL_UDF() +### +### Make module definition an YQL UDF: add all needed dependencies, properties and flags +### +### https://yql.yandex-team.ru/docs/yt/udf/cpp/ +macro _MAKE_YQL_UDF() { + _ADD_YQL_UDF_DEPS() + SET_APPEND(USER_CXXFLAGS -DBUILD_UDF) + # For Windows using declspecs DEFAULT(YQL_UDF_EXPORT ${ARCADIA_ROOT}/ydb/library/yql/public/udf/udfs_exports.exports) - - when ($WINDOWS == "yes") { - YQL_UDF_EXPORT= - } - - SET(EXPORTS_FILE $YQL_UDF_EXPORT) -} - -### @usage: YQL_UDF_MODULE(name) -### -### The extension module for YQL with C++ UDF (User Defined Function YQL) -### -### https://yql.yandex-team.ru/docs/yt/udf/cpp/ -module YQL_UDF_MODULE: UDF_BASE { - .CMD=YQL_UDF_LINK_CMD - _MAKE_YQL_UDF() - PROVIDES(YqlServicePolicy) -} - -module _YQL_UDF_PROGRAM_BASE: SO_PROGRAM { - .CMD=YQL_UDF_LINK_PRG_CMD - _MAKE_YQL_UDF() -} - -### @usage: YQL_UDF(name) -### -### User-defined function for YQL -### -### Multimodule which is YQL_UDF_MODULE when built directly or referred by BUNDLE and DEPENDS macros. -### If used by PEERDIRs it is usual static LIBRARY with default YQL dependencies, allowing code reuse between UDFs. -### -### @see: [YQL_UDF_MODULE()](#module_YQL_UDF_MODULE) -multimodule YQL_UDF { - module YQL_UDF_SHARED: YQL_UDF_MODULE { + + when ($WINDOWS == "yes") { + YQL_UDF_EXPORT= + } + + SET(EXPORTS_FILE $YQL_UDF_EXPORT) +} + +### @usage: YQL_UDF_MODULE(name) +### +### The extension module for YQL with C++ UDF (User Defined Function YQL) +### +### https://yql.yandex-team.ru/docs/yt/udf/cpp/ +module YQL_UDF_MODULE: UDF_BASE { + .CMD=YQL_UDF_LINK_CMD + _MAKE_YQL_UDF() + PROVIDES(YqlServicePolicy) +} + +module _YQL_UDF_PROGRAM_BASE: SO_PROGRAM { + .CMD=YQL_UDF_LINK_PRG_CMD + _MAKE_YQL_UDF() +} + +### @usage: YQL_UDF(name) +### +### User-defined function for YQL +### +### Multimodule which is YQL_UDF_MODULE when built directly or referred by BUNDLE and DEPENDS macros. +### If used by PEERDIRs it is usual static LIBRARY with default YQL dependencies, allowing code reuse between UDFs. +### +### @see: [YQL_UDF_MODULE()](#module_YQL_UDF_MODULE) +multimodule YQL_UDF { + module YQL_UDF_SHARED: YQL_UDF_MODULE { NO_CLANG_TIDY() - } - module YQL_UDF_STATIC: _DLL_COMPATIBLE_LIBRARY { - .ALIASES=SRCS=GLOBAL_SRCS - OBJ_SUF=.udfs - _ADD_YQL_UDF_DEPS() + } + module YQL_UDF_STATIC: _DLL_COMPATIBLE_LIBRARY { + .ALIASES=SRCS=GLOBAL_SRCS + OBJ_SUF=.udfs + _ADD_YQL_UDF_DEPS() # disable credits generation for static library SET(CREDITS_FLAGS) - when ($MSVC == "yes" || $CYGWIN == "yes") { - MODULE_SUFFIX=.static.lib - } - } -} - -### @usage: YQL_ABI_VERSION(major minor release)) -### -### Specifying the supported ABI for YQL_UDF. -### -### @see: [YQL_UDF()](#multimodule_YQL_UDF) -macro YQL_ABI_VERSION(Major, Minor, Patch) { - YQL_ABI_FLAGS=-DUDF_ABI_VERSION_MAJOR=$Major -DUDF_ABI_VERSION_MINOR=$Minor -DUDF_ABI_VERSION_PATCH=$Patch - SET_APPEND(USER_CXXFLAGS $YQL_ABI_FLAGS) -} - -### @usage: YQL_LAST_ABI_VERSION() -### -### Use the last ABI for YQL_UDF -### -macro YQL_LAST_ABI_VERSION() { - YQL_ABI_FLAGS=-DUSE_CURRENT_UDF_ABI_VERSION - SET_APPEND(USER_CXXFLAGS $YQL_ABI_FLAGS) -} - -### @usage: YQL_PYTHON_UDF(name) -### -### Definition of the extension module for YQL with Python 2.x UDF (User Defined Function for YQL). -### Unlike YQL_UDF this is plain DLL module, so PEERDIRs to it are not allowed. -### -### https://yql.yandex-team.ru/docs/yt/udf/python/ -module YQL_PYTHON_UDF: YQL_UDF_MODULE { - .IGNORED=USE_PYTHON2 - .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL - - USE_PYTHON2() - _ARCADIA_PYTHON_ADDINCL() - PEERDIR(build/platform/python/ldflags) - PEERDIR(library/python/type_info) - - DEFAULT(YQL_PYTHON_UDF_EXPORT ${ARCADIA_ROOT}/yql/udfs/common/python/python_udf/python_udfs_exports.exports) - - when ($WINDOWS == "yes") { - YQL_PYTHON_UDF_EXPORT= - } - - ### FIXME: XXX the statement below uncoditionally set EXPORTS_FILE (due to incorrect behaviour of old ConfReader - ###when ($USE_ARCADIA_PYTHON == "yes") SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) - SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) -} - -### @usage: YQL_PYTHON_UDF_PROGRAM(name) -### -### Definition of the extension module for YQL with Python 2.x UDF (User Defined Function for YQL). -### Unlike YQL_UDF this is plain DLL module, so PEERDIRs to it are not allowed. -### -### https://yql.yandex-team.ru/docs/yt/udf/python/ -module YQL_PYTHON_UDF_PROGRAM: _YQL_UDF_PROGRAM_BASE { - .IGNORED=USE_PYTHON2 - .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL - USE_PYTHON2() - _ARCADIA_PYTHON_ADDINCL() - PEERDIR(build/platform/python/ldflags) - PEERDIR(library/python/type_info) - - DEFAULT(YQL_PYTHON_UDF_EXPORT ${ARCADIA_ROOT}/yql/udfs/common/python/python_udf/python_udfs_exports.exports) - - when ($WINDOWS == "yes") { - YQL_PYTHON_UDF_EXPORT= - } - - ### FIXME: XXX the statement below uncoditionally set EXPORTS_FILE (due to incorrect behaviour of old ConfReader - ###when ($USE_ARCADIA_PYTHON == "yes") SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) - SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) -} - -### @usage: YQL_PYTHON3_UDF(name) -### -### The extension module for YQL with Python 3.x UDF (User Defined Function for YQL). -### Unlike YQL_UDF this is plain DLL module, so PEERDIRs to it are not allowed. -### -### Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/ -module YQL_PYTHON3_UDF: YQL_UDF_MODULE { - .RESTRICTED=PYTHON2_ADDINCL PYTHON3_ADDINCL USE_PYTHON2 USE_PYTHON3 - _ARCADIA_PYTHON3_ADDINCL() - PEERDIR(build/platform/python/ldflags) - PEERDIR(library/python/type_info) - - DEFAULT(YQL_PYTHON_UDF_EXPORT ${ARCADIA_ROOT}/yql/udfs/common/python/python_udf/python_udfs_exports.exports) - - when ($WINDOWS == "yes") { - YQL_PYTHON_UDF_EXPORT= - } - - ### FIXME: XXX the statement below uncoditionally set EXPORTS_FILE (due to incorrect behaviour of old ConfReader - ###when ($USE_ARCADIA_PYTHON == "yes") SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) - SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) -} - -macro _MAKE_YQL_PYTHON_UDF_TEST() { - PEERDIR(library/python/pytest) - DEPENDS(yql/tools/run_python_udf) - SETUP_PYTEST_BIN(RUNNER_BIN $(BUILD_ROOT)/yql/tools/run_python_udf/run_python_udf) -} - -### @usage: YQL_PYTHON_UDF_TEST(name) -### -### The Python test for Python YQL UDF (Python User Defined Function for YQL). The code should be a proper YQL_PYTHON_UDF. -### -### This module will basically build itself as UDF and run as test using yql/tools/run_python_udf/run_python_udf tool. -### -### Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/ -### -### @example: https://a.yandex-team.ru/arc/trunk/arcadia/yql/udfs/test/simple/ya.make -### -### @see: [YQL_PYTHON_UDF()](#module_YQL_PYTHON_UDF) -module YQL_PYTHON_UDF_TEST: YQL_PYTHON_UDF { - _MAKE_YQL_PYTHON_UDF_TEST() - SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) -} - -### @usage: YQL_PYTHON3_UDF_TEST(name) -### -### The Python test for Python 3.x YQL UDF (User Defined Function for YQL). The code should be a proper YQL_PYTHON3_UDF. -### -### This module will basically build itself as UDF and run as test using yql/tools/run_python_udf/run_python_udf tool. -### -### Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/ -### -### @see: [YQL_PYTHON3_UDF()](#module_YQL_PYTHON3_UDF) -module YQL_PYTHON3_UDF_TEST: YQL_PYTHON3_UDF { - _MAKE_YQL_PYTHON_UDF_TEST() - SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) -} + when ($MSVC == "yes" || $CYGWIN == "yes") { + MODULE_SUFFIX=.static.lib + } + } +} + +### @usage: YQL_ABI_VERSION(major minor release)) +### +### Specifying the supported ABI for YQL_UDF. +### +### @see: [YQL_UDF()](#multimodule_YQL_UDF) +macro YQL_ABI_VERSION(Major, Minor, Patch) { + YQL_ABI_FLAGS=-DUDF_ABI_VERSION_MAJOR=$Major -DUDF_ABI_VERSION_MINOR=$Minor -DUDF_ABI_VERSION_PATCH=$Patch + SET_APPEND(USER_CXXFLAGS $YQL_ABI_FLAGS) +} + +### @usage: YQL_LAST_ABI_VERSION() +### +### Use the last ABI for YQL_UDF +### +macro YQL_LAST_ABI_VERSION() { + YQL_ABI_FLAGS=-DUSE_CURRENT_UDF_ABI_VERSION + SET_APPEND(USER_CXXFLAGS $YQL_ABI_FLAGS) +} + +### @usage: YQL_PYTHON_UDF(name) +### +### Definition of the extension module for YQL with Python 2.x UDF (User Defined Function for YQL). +### Unlike YQL_UDF this is plain DLL module, so PEERDIRs to it are not allowed. +### +### https://yql.yandex-team.ru/docs/yt/udf/python/ +module YQL_PYTHON_UDF: YQL_UDF_MODULE { + .IGNORED=USE_PYTHON2 + .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL + + USE_PYTHON2() + _ARCADIA_PYTHON_ADDINCL() + PEERDIR(build/platform/python/ldflags) + PEERDIR(library/python/type_info) + + DEFAULT(YQL_PYTHON_UDF_EXPORT ${ARCADIA_ROOT}/yql/udfs/common/python/python_udf/python_udfs_exports.exports) + + when ($WINDOWS == "yes") { + YQL_PYTHON_UDF_EXPORT= + } + + ### FIXME: XXX the statement below uncoditionally set EXPORTS_FILE (due to incorrect behaviour of old ConfReader + ###when ($USE_ARCADIA_PYTHON == "yes") SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) + SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) +} + +### @usage: YQL_PYTHON_UDF_PROGRAM(name) +### +### Definition of the extension module for YQL with Python 2.x UDF (User Defined Function for YQL). +### Unlike YQL_UDF this is plain DLL module, so PEERDIRs to it are not allowed. +### +### https://yql.yandex-team.ru/docs/yt/udf/python/ +module YQL_PYTHON_UDF_PROGRAM: _YQL_UDF_PROGRAM_BASE { + .IGNORED=USE_PYTHON2 + .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL + USE_PYTHON2() + _ARCADIA_PYTHON_ADDINCL() + PEERDIR(build/platform/python/ldflags) + PEERDIR(library/python/type_info) + + DEFAULT(YQL_PYTHON_UDF_EXPORT ${ARCADIA_ROOT}/yql/udfs/common/python/python_udf/python_udfs_exports.exports) + + when ($WINDOWS == "yes") { + YQL_PYTHON_UDF_EXPORT= + } + + ### FIXME: XXX the statement below uncoditionally set EXPORTS_FILE (due to incorrect behaviour of old ConfReader + ###when ($USE_ARCADIA_PYTHON == "yes") SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) + SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) +} + +### @usage: YQL_PYTHON3_UDF(name) +### +### The extension module for YQL with Python 3.x UDF (User Defined Function for YQL). +### Unlike YQL_UDF this is plain DLL module, so PEERDIRs to it are not allowed. +### +### Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/ +module YQL_PYTHON3_UDF: YQL_UDF_MODULE { + .RESTRICTED=PYTHON2_ADDINCL PYTHON3_ADDINCL USE_PYTHON2 USE_PYTHON3 + _ARCADIA_PYTHON3_ADDINCL() + PEERDIR(build/platform/python/ldflags) + PEERDIR(library/python/type_info) + + DEFAULT(YQL_PYTHON_UDF_EXPORT ${ARCADIA_ROOT}/yql/udfs/common/python/python_udf/python_udfs_exports.exports) + + when ($WINDOWS == "yes") { + YQL_PYTHON_UDF_EXPORT= + } + + ### FIXME: XXX the statement below uncoditionally set EXPORTS_FILE (due to incorrect behaviour of old ConfReader + ###when ($USE_ARCADIA_PYTHON == "yes") SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) + SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) +} + +macro _MAKE_YQL_PYTHON_UDF_TEST() { + PEERDIR(library/python/pytest) + DEPENDS(yql/tools/run_python_udf) + SETUP_PYTEST_BIN(RUNNER_BIN $(BUILD_ROOT)/yql/tools/run_python_udf/run_python_udf) +} + +### @usage: YQL_PYTHON_UDF_TEST(name) +### +### The Python test for Python YQL UDF (Python User Defined Function for YQL). The code should be a proper YQL_PYTHON_UDF. +### +### This module will basically build itself as UDF and run as test using yql/tools/run_python_udf/run_python_udf tool. +### +### Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/ +### +### @example: https://a.yandex-team.ru/arc/trunk/arcadia/yql/udfs/test/simple/ya.make +### +### @see: [YQL_PYTHON_UDF()](#module_YQL_PYTHON_UDF) +module YQL_PYTHON_UDF_TEST: YQL_PYTHON_UDF { + _MAKE_YQL_PYTHON_UDF_TEST() + SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) +} + +### @usage: YQL_PYTHON3_UDF_TEST(name) +### +### The Python test for Python 3.x YQL UDF (User Defined Function for YQL). The code should be a proper YQL_PYTHON3_UDF. +### +### This module will basically build itself as UDF and run as test using yql/tools/run_python_udf/run_python_udf tool. +### +### Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/ +### +### @see: [YQL_PYTHON3_UDF()](#module_YQL_PYTHON3_UDF) +module YQL_PYTHON3_UDF_TEST: YQL_PYTHON3_UDF { + _MAKE_YQL_PYTHON_UDF_TEST() + SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) +} diff --git a/build/conf/rules.conf b/build/conf/rules.conf index 51bf1baa52..4f470385d0 100644 --- a/build/conf/rules.conf +++ b/build/conf/rules.conf @@ -1,43 +1,43 @@ -PEERDIRS_RULES_PATH=\ - build/rules/junk.policy \ - build/rules/go/contrib.policy \ - build/rules/go/vendor.policy \ - build/rules/contrib_deprecated.policy \ - build/rules/contrib_python.policy \ - build/rules/contrib_restricted.policy \ - build/rules/contrib_deps.policy \ - build/rules/library_deps.policy \ - build/rules/library_deprecated.policy \ - build/rules/passport.policy \ - build/rules/yt.policy \ - build/rules/catboost.policy \ - build/rules/maps/maps.policy \ - build/rules/taxi.policy \ - build/rules/yp.policy \ +PEERDIRS_RULES_PATH=\ + build/rules/junk.policy \ + build/rules/go/contrib.policy \ + build/rules/go/vendor.policy \ + build/rules/contrib_deprecated.policy \ + build/rules/contrib_python.policy \ + build/rules/contrib_restricted.policy \ + build/rules/contrib_deps.policy \ + build/rules/library_deps.policy \ + build/rules/library_deprecated.policy \ + build/rules/passport.policy \ + build/rules/yt.policy \ + build/rules/catboost.policy \ + build/rules/maps/maps.policy \ + build/rules/taxi.policy \ + build/rules/yp.policy \ build/rules/alice.policy \ build/rules/kikimr.policy \ build/rules/yadi.policy - -CHECK_INTERNAL=yes -INTERNAL_EXCEPTIONS=\ - contrib \ - search/begemot/rules/internal \ - mssngr/router/lib/protos/internal \ - mssngr/router/lib/registry/method/internal \ - cv/imageproc/ocr/api/mobile_c/internal \ - kernel/ugc/security/lib/internal \ - maps/mobile/libs/mapkit/internal - -_BLACKLISTS= -when ($DISABLE_BLACKLIST == "yes") { - _BLACKLISTS= -} -elsewhen ($CUSTOM_BLACKLIST != "") { - _BLACKLISTS=$CUSTOM_BLACKLIST -} -elsewhen ($AUTOCHECK == "yes" || $TEST_BLACKLIST_AUTOCHECK == "yes") { - _BLACKLISTS+=build/rules/autocheck.blacklist -} -otherwise { - _BLACKLISTS+=build/rules/local.blacklist -} + +CHECK_INTERNAL=yes +INTERNAL_EXCEPTIONS=\ + contrib \ + search/begemot/rules/internal \ + mssngr/router/lib/protos/internal \ + mssngr/router/lib/registry/method/internal \ + cv/imageproc/ocr/api/mobile_c/internal \ + kernel/ugc/security/lib/internal \ + maps/mobile/libs/mapkit/internal + +_BLACKLISTS= +when ($DISABLE_BLACKLIST == "yes") { + _BLACKLISTS= +} +elsewhen ($CUSTOM_BLACKLIST != "") { + _BLACKLISTS=$CUSTOM_BLACKLIST +} +elsewhen ($AUTOCHECK == "yes" || $TEST_BLACKLIST_AUTOCHECK == "yes") { + _BLACKLISTS+=build/rules/autocheck.blacklist +} +otherwise { + _BLACKLISTS+=build/rules/local.blacklist +} diff --git a/build/conf/settings.conf b/build/conf/settings.conf index 4329f3233a..00f0cda469 100644 --- a/build/conf/settings.conf +++ b/build/conf/settings.conf @@ -1,7 +1,7 @@ -GLOBAL_SRCS_IN_RESULTS=yes -JSON_CACHE_IS_ATTACHED=yes -USE_ADDINCL_WITHOUT_FOR_AS_ADDINCL_FOR_C=yes -LANGS_REQUIRE_BUILD_AND_SRC_ROOTS=c asm cython proto flatc swig ydl nlg +GLOBAL_SRCS_IN_RESULTS=yes +JSON_CACHE_IS_ATTACHED=yes +USE_ADDINCL_WITHOUT_FOR_AS_ADDINCL_FOR_C=yes +LANGS_REQUIRE_BUILD_AND_SRC_ROOTS=c asm cython proto flatc swig ydl nlg # NOTE! Only foldable vars should be listed here _FOLDABLE_VARS_=\ diff --git a/build/conf/sysincl.conf b/build/conf/sysincl.conf index 60e641e2db..96cc55c24f 100644 --- a/build/conf/sysincl.conf +++ b/build/conf/sysincl.conf @@ -1,61 +1,61 @@ -SYSINCL= -SYSINCL+=build/sysincl/libc-to-compat.yml -SYSINCL+=build/sysincl/libc-to-nothing.yml -SYSINCL+=build/sysincl/stl-to-nothing.yml -SYSINCL+=build/sysincl/linux.yml -SYSINCL+=build/sysincl/windows.yml -SYSINCL+=build/sysincl/darwin.yml -SYSINCL+=build/sysincl/intrinsic.yml -SYSINCL+=build/sysincl/nvidia.yml -SYSINCL+=build/sysincl/misc.yml -SYSINCL+=build/sysincl/unsorted.yml - -when ($USE_LOCAL_SWIG == "yes") { - SYSINCL+=build/sysincl/swig-to-nothing.yml -} -otherwise { - SYSINCL+=build/sysincl/swig.yml -} - -when ($USE_SYSTEM_JDK) { - SYSINCL+=build/sysincl/system-jdk.yml -} - +SYSINCL= +SYSINCL+=build/sysincl/libc-to-compat.yml +SYSINCL+=build/sysincl/libc-to-nothing.yml +SYSINCL+=build/sysincl/stl-to-nothing.yml +SYSINCL+=build/sysincl/linux.yml +SYSINCL+=build/sysincl/windows.yml +SYSINCL+=build/sysincl/darwin.yml +SYSINCL+=build/sysincl/intrinsic.yml +SYSINCL+=build/sysincl/nvidia.yml +SYSINCL+=build/sysincl/misc.yml +SYSINCL+=build/sysincl/unsorted.yml + +when ($USE_LOCAL_SWIG == "yes") { + SYSINCL+=build/sysincl/swig-to-nothing.yml +} +otherwise { + SYSINCL+=build/sysincl/swig.yml +} + +when ($USE_SYSTEM_JDK) { + SYSINCL+=build/sysincl/system-jdk.yml +} + when ($OPENSOURCE != "yes") { - SYSINCL+=build/yandex_specific/sysincl/speechkit.yml - SYSINCL+=build/yandex_specific/sysincl/sophos.yml - SYSINCL+=build/yandex_specific/sysincl/misc.yml - SYSINCL+=build/yandex_specific/sysincl/taxi.yml -} - -when ($MUSL == "yes") { - SYSINCL+=build/sysincl/libc-to-musl.yml - SYSINCL+=build/sysincl/linux-musl.yml -} - -when ($OS_WINDOWS == "yes") { - SYSINCL+=build/sysincl/misc-win.yml + SYSINCL+=build/yandex_specific/sysincl/speechkit.yml + SYSINCL+=build/yandex_specific/sysincl/sophos.yml + SYSINCL+=build/yandex_specific/sysincl/misc.yml + SYSINCL+=build/yandex_specific/sysincl/taxi.yml +} + +when ($MUSL == "yes") { + SYSINCL+=build/sysincl/libc-to-musl.yml + SYSINCL+=build/sysincl/linux-musl.yml +} + +when ($OS_WINDOWS == "yes") { + SYSINCL+=build/sysincl/misc-win.yml when ($OPENSOURCE !="yes") { - SYSINCL+=build/yandex_specific/sysincl/misc-win.yml - } -} - -when ($OS_ANDROID == "yes") { - SYSINCL+=build/sysincl/android.yml -} - -when ($OS_LINUX != "yes") { - SYSINCL+=build/sysincl/linux-headers.yml -} - -when ($OS_LINUX != "yes" || $CATBOOST_OPENSOURCE == "yes") { - SYSINCL+=build/sysincl/ibdrv.yml -} - -when ($WITH_VALGRIND == "yes") { - SYSINCL+=build/sysincl/valgrind.yml -} - -when ($OS_LINUX == "yes" && $OS_SDK == "ubuntu-12") { - SYSINCL+=build/sysincl/linux-ubuntu-12.yml -} + SYSINCL+=build/yandex_specific/sysincl/misc-win.yml + } +} + +when ($OS_ANDROID == "yes") { + SYSINCL+=build/sysincl/android.yml +} + +when ($OS_LINUX != "yes") { + SYSINCL+=build/sysincl/linux-headers.yml +} + +when ($OS_LINUX != "yes" || $CATBOOST_OPENSOURCE == "yes") { + SYSINCL+=build/sysincl/ibdrv.yml +} + +when ($WITH_VALGRIND == "yes") { + SYSINCL+=build/sysincl/valgrind.yml +} + +when ($OS_LINUX == "yes" && $OS_SDK == "ubuntu-12") { + SYSINCL+=build/sysincl/linux-ubuntu-12.yml +} diff --git a/build/docs/all.md b/build/docs/all.md index 50051b596c..2f358287ba 100644 --- a/build/docs/all.md +++ b/build/docs/all.md @@ -2943,7 +2943,7 @@ Add dependency on Perl to your LIBRARY ###### Macro [USE\_PLANTUML][]() <a name="macro_USE_PLANTUML"></a> Use PlantUML plug-in for yfm builder to render UML diagrams into documentation -###### Macro [USE\_PYTHON2][]() <a name="macro_USE_PYTHON2"></a> +###### Macro [USE\_PYTHON2][]() <a name="macro_USE_PYTHON2"></a> 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. @@ -2953,7 +2953,7 @@ If you'd like to use #include <Python.h> with both Python2 and Python3 convert y @see: [PY2\_LIBRARY](#module\_PY2\_LIBRARY), [PY3\_LIBRARY](#module\_PY3\_LIBRARY), [PY23\_LIBRARY](#multimodule\_PY23\_LIBRARY) -###### Macro [USE\_PYTHON3][]() <a name="macro_USE_PYTHON3"></a> +###### Macro [USE\_PYTHON3][]() <a name="macro_USE_PYTHON3"></a> This adds Python3 library to your LIBRARY and makes it Python3-compatible. Compatibility means proper PEERDIRs, ADDINCLs and variant selection on PEERDIRs to multimodules. diff --git a/build/docs/readme.md b/build/docs/readme.md index 3db0a653c7..0634afc1e3 100644 --- a/build/docs/readme.md +++ b/build/docs/readme.md @@ -2541,7 +2541,7 @@ Add dependency on Perl to your LIBRARY ###### Macro [USE\_PLANTUML][]() <a name="macro_USE_PLANTUML"></a> Use PlantUML plug-in for yfm builder to render UML diagrams into documentation -###### Macro [USE\_PYTHON2][]() <a name="macro_USE_PYTHON2"></a> +###### Macro [USE\_PYTHON2][]() <a name="macro_USE_PYTHON2"></a> 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. @@ -2551,7 +2551,7 @@ If you'd like to use #include <Python.h> with both Python2 and Python3 convert y @see: [PY2\_LIBRARY](#module\_PY2\_LIBRARY), [PY3\_LIBRARY](#module\_PY3\_LIBRARY), [PY23\_LIBRARY](#multimodule\_PY23\_LIBRARY) -###### Macro [USE\_PYTHON3][]() <a name="macro_USE_PYTHON3"></a> +###### Macro [USE\_PYTHON3][]() <a name="macro_USE_PYTHON3"></a> This adds Python3 library to your LIBRARY and makes it Python3-compatible. Compatibility means proper PEERDIRs, ADDINCLs and variant selection on PEERDIRs to multimodules. diff --git a/build/external_resources/codenavigation/ya.make b/build/external_resources/codenavigation/ya.make index 8cfdf0d3d5..f6ebf31f75 100644 --- a/build/external_resources/codenavigation/ya.make +++ b/build/external_resources/codenavigation/ya.make @@ -7,8 +7,8 @@ NO_RUNTIME() IF (OS_LINUX) DECLARE_EXTERNAL_RESOURCE(CPPYNDEXER sbr:2218884955) - DECLARE_EXTERNAL_RESOURCE(PYNDEXER sbr:2112287762) - DECLARE_EXTERNAL_RESOURCE(PY3YNDEXER sbr:2670411952) + DECLARE_EXTERNAL_RESOURCE(PYNDEXER sbr:2112287762) + DECLARE_EXTERNAL_RESOURCE(PY3YNDEXER sbr:2670411952) ENDIF() END() diff --git a/build/platform/python/readme.md b/build/platform/python/readme.md index 1eaafad35b..2125905418 100644 --- a/build/platform/python/readme.md +++ b/build/platform/python/readme.md @@ -75,7 +75,7 @@ UBUNTU_VERSION - версия ubuntu, на которой майнился си DECLARE_EXTERNAL_RESOURCE(EXTERNAL_PYTHON ${PYTHON38_LINUX}) ## Проверяем сборку -1. Создаем тривиальный PY2MODULE с использование `c api` положенного питона, или находим подходящий в репозитории +1. Создаем тривиальный PY2MODULE с использование `c api` положенного питона, или находим подходящий в репозитории 2. Собираем его: 1. linux `ya make -DUSE_SYSTEM_PYTHON=3.8 --target-platform linux` 2. darwin `ya make -DUSE_SYSTEM_PYTHON=3.8 --target-platform darwin` diff --git a/build/plugins/_test_const.py b/build/plugins/_test_const.py index 0d03cc3d17..0c127897cd 100644 --- a/build/plugins/_test_const.py +++ b/build/plugins/_test_const.py @@ -43,7 +43,7 @@ COVERAGE_RESOLVED_FILE_NAME_PATTERN = "coverage_resolved.{}.json" CPP_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("cpp") JAVA_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("java") PYTHON_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("python") -CLANG_COVERAGE_TEST_TYPES = ("unittest", "coverage_extractor", "pytest", "py3test", "gtest", "boost_test", "exectest") +CLANG_COVERAGE_TEST_TYPES = ("unittest", "coverage_extractor", "pytest", "py3test", "gtest", "boost_test", "exectest") COVERAGE_TABLE_CHUNKS = 20 COVERAGE_YT_PROXY = "hahn.yt.yandex.net" COVERAGE_YT_ROOT_PATH = "//home/codecoverage" diff --git a/build/plugins/large_files.py b/build/plugins/large_files.py index 33a78d7110..aa1a418a2f 100644 --- a/build/plugins/large_files.py +++ b/build/plugins/large_files.py @@ -7,22 +7,22 @@ PLACEHOLDER_EXT = "external" def onlarge_files(unit, *args): """ - @usage LARGE_FILES([AUTOUPDATED] Files...) + @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. + 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. """ args = list(args) - - if args and args[0] == 'AUTOUPDATED': - args = args[1:] - + + if args and args[0] == 'AUTOUPDATED': + args = args[1:] + for arg in args: - if arg == 'AUTOUPDATED': - unit.message(["warn", "Please set AUTOUPDATED argument before other file names"]) - continue - + if arg == 'AUTOUPDATED': + unit.message(["warn", "Please set AUTOUPDATED argument before other file names"]) + continue + src = unit.resolve_arc_path(arg) if src.startswith("$S"): msg = "Used local large file {}. Don't forget to run 'ya upload --update-external' and commit {}.{}".format(src, src, PLACEHOLDER_EXT) @@ -31,9 +31,9 @@ def onlarge_files(unit, *args): else: out_file = strip_roots(os.path.join(unit.path(), arg)) external = "{}.{}".format(arg, PLACEHOLDER_EXT) - from_external_cmd = [external, out_file, 'OUT_NOAUTO', arg] - if os.path.dirname(arg): - from_external_cmd.extend(("RENAME", os.path.basename(arg))) - unit.on_from_external(from_external_cmd) + from_external_cmd = [external, out_file, 'OUT_NOAUTO', arg] + if os.path.dirname(arg): + from_external_cmd.extend(("RENAME", os.path.basename(arg))) + unit.on_from_external(from_external_cmd) unit.onadd_check(['check.external', external]) diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py index f32a2d39a0..b21bbc6f02 100644 --- a/build/plugins/pybuild.py +++ b/build/plugins/pybuild.py @@ -181,7 +181,7 @@ def onpy_srcs(unit, *args): __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 of library declaration with PY_SRCS(): - PY2_LIBRARY(mymodule) + 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() diff --git a/build/plugins/tests/ya.make b/build/plugins/tests/ya.make index 87228b98df..095c081682 100644 --- a/build/plugins/tests/ya.make +++ b/build/plugins/tests/ya.make @@ -1,4 +1,4 @@ -PY2TEST() +PY2TEST() OWNER(g:yatool) diff --git a/build/plugins/ya.make b/build/plugins/ya.make index 4ad5f5988e..51b16709b6 100644 --- a/build/plugins/ya.make +++ b/build/plugins/ya.make @@ -1,6 +1,6 @@ OWNER(g:ymake) -PY2_LIBRARY() +PY2_LIBRARY() PY_SRCS( code_generator.py diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py index 8970837f0f..7ebf5c8672 100644 --- a/build/plugins/ytest.py +++ b/build/plugins/ytest.py @@ -736,11 +736,11 @@ def onadd_pytest_bin(unit, *args): ) runner_bin = kws.get('RUNNER_BIN', [None])[0] - test_type = 'py3test.bin' if (unit.get("PYTHON3") == 'yes') else "pytest.bin" - - add_test_to_dart(unit, test_type, runner_bin=runner_bin) + test_type = 'py3test.bin' if (unit.get("PYTHON3") == 'yes') else "pytest.bin" + add_test_to_dart(unit, test_type, runner_bin=runner_bin) + def add_test_to_dart(unit, test_type, binary_path=None, runner_bin=None): if unit.get("TIDY") == "yes": # graph changed for clang_tidy tests @@ -1047,7 +1047,7 @@ def onsetup_run_python(unit): def get_canonical_test_resources(unit): unit_path = unit.path() - canon_data_dir = os.path.join(unit.resolve(unit_path), CANON_DATA_DIR_NAME, unit.get('CANONIZE_SUB_PATH') or '') + canon_data_dir = os.path.join(unit.resolve(unit_path), CANON_DATA_DIR_NAME, unit.get('CANONIZE_SUB_PATH') or '') try: _, dirs, files = next(os.walk(canon_data_dir)) diff --git a/build/scripts/ya.make b/build/scripts/ya.make index 710165e40d..bf64429cb4 100644 --- a/build/scripts/ya.make +++ b/build/scripts/ya.make @@ -1,6 +1,6 @@ OWNER(g:ymake) -PY2TEST() +PY2TEST() TEST_SRCS( build_dll_and_java.py diff --git a/build/ya.conf.json b/build/ya.conf.json index 5f7cc875d6..cb63492b23 100644 --- a/build/ya.conf.json +++ b/build/ya.conf.json @@ -3405,12 +3405,12 @@ "os": "LINUX" }, "default": true - }, - { - "host": { - "os": "darwin" - }, - "default": true + }, + { + "host": { + "os": "darwin" + }, + "default": true } ] }, @@ -6985,7 +6985,7 @@ }, "zipatcher": { "formula": { - "sandbox_id": 897674372, + "sandbox_id": 897674372, "match": "zipatcher" }, "executable": { diff --git a/build/ya.make b/build/ya.make index 407b8f13e0..bc335af007 100644 --- a/build/ya.make +++ b/build/ya.make @@ -5,7 +5,7 @@ OWNER( NEED_CHECK() -PY2_LIBRARY() +PY2_LIBRARY() PY_SRCS( ymake_conf.py diff --git a/build/ymake.core.conf b/build/ymake.core.conf index 081833998b..196333fafc 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -30,15 +30,15 @@ SFLAGS= AUTOCHECK_BALANCING_OPTIONS= SO_OTPUTS=no -@import "${CONF_ROOT}/conf/settings.conf" +@import "${CONF_ROOT}/conf/settings.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" +@import "${CONF_ROOT}/conf/rules.conf" +@import "${CONF_ROOT}/conf/sysincl.conf" +@import "${CONF_ROOT}/conf/license.conf" @import "${CONF_ROOT}/conf/ts.conf" - -@import "${CONF_ROOT}/conf/project_specific/other.conf" - + +@import "${CONF_ROOT}/conf/project_specific/other.conf" + USE_GLOBAL_CMD=no when ($OS_WINDOWS != "yes") { USE_GLOBAL_CMD=yes @@ -63,7 +63,7 @@ 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 USE_PREBUILT_TOOLS=yes -when ($OPENSOURCE == "yes") { +when ($OPENSOURCE == "yes") { USE_PREBUILT_TOOLS=no } @@ -110,7 +110,7 @@ otherwise { TIDY_VALUE= } -# tag:codenav +# tag:codenav 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} @@ -152,17 +152,17 @@ 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 -} -when ($MAPSMOBI_BUILD_TARGET == "yes" && $OS_IOS == "yes") { - BUILD_IOS_APP=yes - when ($ARCH_ARM7 || $ARCH_ARM64) { - BOOSTTEST_IS_FAT_OBJECT=yes - } -} - +# TODO: extract to conf/maps/maps.conf +when ($MAPSMOBI_BUILD_TARGET == "yes" && $OS_LINUX != "yes") { + USE_STL_SYSTEM=yes +} +when ($MAPSMOBI_BUILD_TARGET == "yes" && $OS_IOS == "yes") { + BUILD_IOS_APP=yes + when ($ARCH_ARM7 || $ARCH_ARM64) { + BOOSTTEST_IS_FAT_OBJECT=yes + } +} + # USE_INTERNAL_STL is an internal flag (set on by default) but may be used externally to # select system standard C++ library when USE_INTERNAL_STL=no is set. # @@ -177,7 +177,7 @@ when ($USE_INTERNAL_STL == "no") { } otherwise { USE_INTERNAL_STL=yes - # TODO: Extract to conf/sysincl.conf + # TODO: Extract to conf/sysincl.conf # This trigger doesn't work for module level since SYSINCL is processed at # configuration stage (This means that NO_RUNTIME() macro called in ya.make # won't affect SYSINCL and the only way to make this trigger work correctly @@ -191,7 +191,7 @@ otherwise { } } -# tag:linux-specific +# tag:linux-specific when ($OS_LINUX && $OS_SDK == "ubuntu-14" && $MUSL != "yes") { USE_UBUNTU_COMPATIBILITY=yes } @@ -212,7 +212,7 @@ when ($HAVE_MKL == "") { SFDL_TMP_OUT= ${output;tmp:SRC.tmp} -# tag:perl-specific +# tag:perl-specific when ($USE_LOCAL_TOOLS == "yes") { PERL=$LOCAL_PERL PERL_VERSION=$LOCAL_PERL_VERSION @@ -229,7 +229,7 @@ otherwise { PERL_ARCHLIB=NO-PERL-SELECTED-ARCHLIB } -# tag:perl-specific +# tag:perl-specific PERL_LD_LIBRARY_PATH= PERL_INCLUDE= USE_PERL_SYSTEM=yes @@ -274,7 +274,7 @@ when ($USE_PERL_SYSTEM == "yes") { } PERL_DEFAULT_PEERDIR=yes -# tag:perl-specific +# tag:perl-specific PERLSUFFIX=-csuffix .cpp PERLOUTPUT=${stdout;output:SRC.cpp} when ($PERLC == "yes") { @@ -283,23 +283,23 @@ when ($PERLC == "yes") { } XSUBPPFLAGS= -# tag:tool-specific +# tag:tool-specific ARCH_TOOL=${tool:"tools/archiver"} -# tag:tool-specific tag:proto +# tag:tool-specific tag:proto 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 -# tag:tool-specific +# tag:tool-specific FML_TOOL=${tool:"tools/relev_fml_codegen"} FML_UNUSED_TOOL=${tool:"tools/relev_fml_unused"} LUA_TOOL=${tool:"tools/lua"} ENUM_PARSER_TOOL=${tool:"tools/enum_parser/enum_parser"} -# tag:python-specific tag:cython-specific +# tag:python-specific tag:cython-specific CYTHON_SCRIPT=${input:"${ARCADIA_ROOT}/contrib/tools/cython/cython.py"} RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT CYTHON_OUTPUT_INCLUDES=\ @@ -314,10 +314,10 @@ ${output_include;hide:"contrib/libs/python/Include/traceback.h"} \ ${output_include;hide:"contrib/tools/cython/generated_c_headers.h"} \ ${output_include;hide:"omp.h"} -# tag:cython-specific +# tag:cython-specific CYTHON_CPP_OUTPUT_INCLUDES=${output_include;hide:"contrib/tools/cython/generated_cpp_headers.h"} -# tag:cython-specific +# tag:cython-specific CYTHON_OPTIONS= when ($OS_LINUX) { CYTHON_OPTIONS += -E UNAME_SYSNAME=Linux @@ -344,7 +344,7 @@ SWIG_IMPLICIT_INCLUDES = swig.swg go.swg java.swg perl5.swg python.swg FATAL_ERROR_MODULE=no FATAL_ERROR_MESSAGE= -# tag:python-specific +# tag:python-specific # PYTHON_DISTR={ "default" | "macos-brew" } determine python system supply # see build/platform/python/ya.make PYTHON_DISTR="default" @@ -397,7 +397,7 @@ when ($USE_SYSTEM_PYTHON) { } } -# tag:python-specific +# tag:python-specific YMAKE_PYTHON3_PEER=build/platform/python/ymake_python3 YMAKE_PYTHON3=$YMAKE_PYTHON3_RESOURCE_GLOBAL/python3 when ($HOST_OS_WINDOWS == "yes") { @@ -408,33 +408,33 @@ when ($HOST_OS_WINDOWS == "yes") { when ($USE_ARCADIA_PYTHON == "no") { SYSINCL+=build/sysincl/python.yml } - -# tag:allocator + +# tag:allocator DEFAULT_ALLOCATOR=LF -# tag:allocator +# tag:allocator when ($OS_ANDROID == "yes" || $MSVC == "yes") { DEFAULT_ALLOCATOR=J } -# tag:allocator +# tag:allocator when ($OS_CYGWIN == "yes" || $ARCH_PPC64LE == "yes") { DEFAULT_ALLOCATOR=SYSTEM } -# tag:allocator +# tag:allocator when ($OS_DARWIN == "yes") { DEFAULT_ALLOCATOR=SYSTEM } -# tag:allocator +# tag:allocator when ($SANITIZER_TYPE) { when ($SANITIZER_TYPE != "no") { DEFAULT_ALLOCATOR=SYSTEM } } -# tag:internal +# tag:internal ### @usage: CHECK_CONFIG_H(<conf_header>) # internal ### ### This internal macro adds checking code for configuration header in external (contrib) library. @@ -480,17 +480,17 @@ macro CHECK_DEPENDENT_DIRS(TYPE, ALL?"UNUSED":"", PEERDIRS?"PEERDIRS":"ALL", RES SET_APPEND(CHECK_DEPENDENT_DIRS_TYPES $TYPE) } -# tag:proto +# tag:proto PY_PROTOS_FOR=no BUILD_PROTO_AS_EVLOG=no # tag:proto PROTO_NAMESPACE= -# tag:proto tag:python-specific +# tag:proto tag:python-specific GEN_PY_PROTOS=$YMAKE_PYTHON ${input:"build/scripts/gen_py_protos.py"} -# tag:proto tag:cpp-specific +# tag:proto tag:cpp-specific PROTO_HEADER_EXTS=.pb.h CPP_PROTO_CMDLINE= CPP_PROTO_OPTS= @@ -498,11 +498,11 @@ CPP_PROTO_OUTS= CPP_PROTO_SUFFIXES=.pb.h .pb.cc CPP_PROTO_PLUGINS= -# tag:proto tag:cpp-specific +# 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= -# tag:proto tag:python-specific +# tag:proto tag:python-specific PY_PROTO_OPTS= PY_PROTO_OUTS= PY_PROTO_OUTS_INTERNAL= @@ -510,13 +510,13 @@ PY_PROTO_DEPS= PY_PROTO_SUFFIXES=_pb2.py PY_EVLOG_SUFFIXES=_ev_pb2.py -# tag:proto tag:java-specific +# tag:proto tag:java-specific JAVA_PROTO_ARGS= -# tag:proto tag:python-specific +# tag:proto tag:python-specific OPTIMIZE_PY_PROTOS_FLAG=no -# tag:built-in +# tag:built-in ### @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. @@ -544,7 +544,7 @@ macro RESOURCE(Args...) { PEERDIR(library/cpp/resource) } -# tag:internal +# tag:internal ### @usage: _ORDER_ADDINCL([BUILD ...] [SOURCE ...] Args...) # internal ### ### Order and filter ADDINCLs (Args - is intentionally omitted in ADDINCL macro) @@ -552,8 +552,8 @@ macro _ORDER_ADDINCL(BUILD[], SOURCE[], ARGS...) { ADDINCL($BUILD $SOURCE) } -# tag:proto -### @usage: PROTO_ADDINCL([GLOBAL] [WITH_GEN] Path) +# 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 @@ -566,7 +566,7 @@ macro PROTO_ADDINCL(GLOBAL?"GLOBAL":"", Path, WITH_GEN?"BUILD":"") { ADDINCL($GLOBAL ${ARCADIA_BUILD_ROOT}/$Path) } -# tag:proto +# tag:proto ### @usage: PROTO_NAMESPACE([GLOBAL] [WITH_GEN] Namespace) ### ### Defines protobuf namespace (import/export path prefix) which should be used for imports and @@ -583,18 +583,18 @@ macro PROTO_NAMESPACE(GLOBAL?"GLOBAL":"", WITH_GEN?"WITH_GEN":"", Namespace) { PROTO_ADDINCL($GLOBAL $WITH_GEN $Namespace) } -# tag:proto tag:internal tag:python-specific +# 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. -### This is default mode for most PROTO_LIBRARY's and PY2_LIBRARY's, some system ones being exceptions. +### 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) } -# tag:proto tag:python-specific -### @usage: NO_OPTIMIZE_PY_PROTOS() +# 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. @@ -603,13 +603,13 @@ macro NO_OPTIMIZE_PY_PROTOS() { SET(OPTIMIZE_PY_PROTOS_FLAG no) } -# tag:proto tag:python-specific +# 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 .SEM=ignored } -# tag:proto tag:python-specific +# tag:proto tag:python-specific 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}"}) @@ -617,7 +617,7 @@ macro _ADD_PY_PROTO_OUT(Suf) { SET(PY_PROTO_SUFFIXES $PY_PROTO_SUFFIXES $Suf) } -# tag:proto tag:python-specific +# 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 @@ -629,7 +629,7 @@ macro PY_PROTO_PLUGIN(NAME, EXT, TOOL, DEPS[]) { SET(PY_PROTO_DEPS $PY_PROTO_DEPS $DEPS) } -# tag:proto tag:python-specific +# 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 @@ -639,12 +639,12 @@ macro PY_PROTO_PLUGIN2(NAME, EXT1, EXT2, TOOL, DEPS[]) { _ADD_PY_PROTO_OUT($EXT2) } -# tag:proto tag:java-specific +# 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 } -# tag:proto tag:java-specific +# 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 @@ -655,7 +655,7 @@ macro JAVA_PROTO_PLUGIN(NAME, TOOL, DEPS[]) { SET(JAVA_PROTOBUF_PEERS $JAVA_PROTOBUF_PEERS $DEPS) } -# tag:proto tag:cpp-specific +# tag:proto tag:cpp-specific macro _ADD_CPP_PROTO_OUT(Suf) { SET_APPEND(CPP_PROTO_OUTS \${output;hide;norel;nopath;noext;suf=$Suf:File}) @@ -663,11 +663,11 @@ macro _ADD_CPP_PROTO_OUT(Suf) { SET(CPP_PROTO_SUFFIXES $CPP_PROTO_SUFFIXES $Suf) } -# tag:proto tag:cpp-specific +# tag:proto tag:cpp-specific HAS_CPP_PROTOBUF_PEERS=no CPP_PROTOBUF_PEERS= -# tag:proto tag:cpp-specific +# 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 @@ -681,7 +681,7 @@ macro CPP_PROTO_PLUGIN0(NAME, TOOL, DEPS[]) { SET(CPP_PROTOBUF_PEERS $CPP_PROTOBUF_PEERS $DEPS) } -# tag:proto tag:cpp-specific +# 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 @@ -692,7 +692,7 @@ macro CPP_PROTO_PLUGIN(NAME, TOOL, SUF, DEPS[]) { _ADD_CPP_PROTO_OUT($SUF) } -# tag:proto tag:cpp-specific +# 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 @@ -703,7 +703,7 @@ macro CPP_PROTO_PLUGIN2(NAME, TOOL, SUF1, SUF2, DEPS[]) { _ADD_CPP_PROTO_OUT($SUF2) } -# tag:proto +# tag:proto ### @usage: USE_SKIFF() #wip, do not use ### ### Use mapreduce/yt/skiff_proto/plugin for C++ @@ -712,7 +712,7 @@ macro USE_SKIFF() { CPP_PROTO_PLUGIN0(skiff mapreduce/yt/skiff_proto/plugin DEPS mapreduce/yt/skiff_proto/lib) } -# tag:go-specific +# tag:go-specific _GO_COMMON_GOOGLE_APIS = \ vendor/google.golang.org/genproto/googleapis/api/annotations \ vendor/google.golang.org/genproto/googleapis/api/configchange \ @@ -747,11 +747,11 @@ vendor/google.golang.org/genproto/googleapis/type/postaladdress \ vendor/google.golang.org/genproto/googleapis/type/quaternion \ vendor/google.golang.org/genproto/googleapis/type/timeofday -# tag:go-specific +# tag:go-specific _COMMON_GOOGLE_APIS=None -# tag:go-specific -### @usage: USE_COMMON_GOOGLE_APIS([apis...]) +# 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 @@ -760,14 +760,14 @@ macro USE_COMMON_GOOGLE_APIS(APIS...) { SET(_COMMON_GOOGLE_APIS ${pre=vendor/google.golang.org/genproto/googleapis/:APIS}) } -# tag:go-specific tag:proto +# tag:go-specific tag:proto GO_PROTO_GEN_TOOL=$_TOOL_PROTOC_GEN_GO GO_PROTO_GEN_PLUGINS= GO_PROTO_PACKAGE_MAP= GO_PROTO_OPTS=$_GO_PROTOC_PLUGIN_ARGS_BASE(go $GO_PROTO_GEN_TOOL MAP $GO_PROTO_PACKAGE_MAP PLUGINS $GO_PROTO_GEN_PLUGINS) GO_PROTO_OUTS= -# tag:go-specific tag:proto +# tag:go-specific tag:proto GO_PROTOBUF_IMPORTS=\ ${GOSTD}/sync \ ${GOSTD}/reflect \ @@ -779,7 +779,7 @@ GO_PROTOBUF_IMPORTS=\ vendor/google.golang.org/protobuf/runtime/protoiface \ vendor/google.golang.org/protobuf/reflect/protoreflect -# tag:go-specific tag:proto +# tag:go-specific tag:proto GO_PROTOBUF_WELLKNOWN_TYPES=\ vendor/google.golang.org/protobuf/types/known/anypb \ vendor/google.golang.org/protobuf/types/known/apipb \ @@ -792,7 +792,7 @@ GO_PROTOBUF_WELLKNOWN_TYPES=\ vendor/google.golang.org/protobuf/types/known/typepb \ vendor/google.golang.org/protobuf/types/known/wrapperspb -# tag:go-specific tag:proto +# tag:go-specific tag:proto ### @usage: GO_PROTO_PLUGIN(Name Ext Tool [DEPS dependencies...]) ### ### Define protoc plugin for GO with given Name that emits extra output with provided extension @@ -803,37 +803,37 @@ macro GO_PROTO_PLUGIN(NAME, EXT, TOOL, DEPS[]) { PEERDIR(${DEPS}) } -# tag:go-specific tag:proto +# 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 } -# tag:go-specific tag:proto +# tag:go-specific tag:proto macro _GO_PROTOC_PLUGIN_ARGS_BASE_PROXY(Name, Tool, MAP[], PLUGINS[]) { .CMD=$_GO_PROTOC_PLUGIN_ARGS_BASE_IMPL($Name $Tool $MAP ${pre=plugins=:PLUGINS}) } -# tag:go-specific tag:proto +# tag:go-specific tag:proto macro _GO_PROTOC_PLUGIN_ARGS_BASE(Name, Tool, MAP[], PLUGINS[]) { .CMD=$_GO_PROTOC_PLUGIN_ARGS_BASE_PROXY($Name $Tool MAP ${pre=M:MAP} PLUGINS ${join=|:PLUGINS}) } -# tag:go-specific tag:proto +# 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} -# tag:go-specific tag:proto +# tag:go-specific tag:proto 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 } -# tag:go-specific tag:proto +# tag:go-specific tag:proto macro _GO_PROTO_CMD(File) { .CMD=$_GO_PROTO_CMD_IMPL($File OPTS $GO_PROTO_OPTS OUTS $GO_PROTO_OUTS) } -# tag:proto +# 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 @@ -844,79 +844,79 @@ macro YP_PROTO_YSON(OUT_OPTS[], Files...) { } -# tag:proto +# tag:proto 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 } -# tag:proto +# tag:proto macro _CPP_VANILLA_PROTO_CMD(File) { .CMD=$CPP_PROTO_CMDLINE $CPP_PROTO_OPTS $CPP_PROTO_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} .PEERDIR=contrib/libs/protobuf_std } -# tag:proto +# 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"} .PEERDIR=library/cpp/eventlog contrib/libs/protobuf } -# tag:proto +# 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"} .PEERDIR=library/cpp/eventlog contrib/libs/protobuf } -# tag:proto +# 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"} .PEERDIR=library/cpp/proto_config/codegen library/cpp/proto_config/protos contrib/libs/protobuf } -# tag:proto +# tag:proto 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 +# tag:proto tag:python-specific PY_PROTO_MYPY_SUFFIX= PY_PROTO_MYPY_PLUGIN= PY_PROTO_MYPY_PLUGIN_INTERNAL= -# tag:proto tag:python-specific +# tag:proto tag:python-specific macro NO_MYPY() { DISABLE(PY_PROTO_MYPY_ENABLED) } -# tag:proto tag:python-specific +# 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 } -# tag:proto tag:python-specific +# 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) } -# tag:proto tag:python-specific +# 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) } -# tag:proto tag:java-specific +# tag:proto tag:java-specific JAVA_PROTO_RUNTIME= -# tag:proto tag:java-specific +# tag:proto tag:java-specific ### @usage: USE_JAVALITE() ### Use protobuf-javalite for Java macro USE_JAVALITE() { SET(JAVA_PROTO_RUNTIME javalite) } -# tag:proto tag:java-specific +# tag:proto tag:java-specific JAVA_PROTO_RUNTIME_VERSION = 3.18.2 JAVA_PROTO_COMMON_VERSION = 1.12.0 when ($JAVA_PROTO_RUNTIME == "javalite") { @@ -932,13 +932,13 @@ otherwise { JAVA_GRPC_PROTOBUF=contrib/java/io/grpc/grpc-protobuf/1.26.0 } -# tag:proto tag:java-specific +# 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 } -# tag:proto tag:perl-specific tag:deprecated +# tag:proto tag:perl-specific tag:deprecated ### @usage: XS_PROTO(InputProto Dir Outputs...) # deprecated ### ### Generate Perl code from protobuf. @@ -949,7 +949,7 @@ macro XS_PROTO(File, Dir, Outputs...) { ADDINCL(${ARCADIA_BUILD_ROOT}/${Dir}) } -# tag:proto tag:fbs +# tag:proto tag:fbs ### @usage: PROTO2FBS(InputProto) ### ### Produce flatbuf schema out of protobuf description. @@ -957,37 +957,37 @@ 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"} } -# tag:proto tag:python-specific +# tag:proto tag:python-specific when ($PY_PROTOS_FOR == "yes") { PEERDIR+=contrib/libs/protobuf/python } -# tag:python-specific +# tag:python-specific 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 +# tag:python-specific tag:proto macro _PY_EVLOG_CMD(File) { .CMD=${cwd;rootdir;input:File} $_PY_EVLOG_CMD_BASE($File _ev_pb2.py) } -# tag:python-specific tag:proto +# 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}"}) } -# tag:java-specific tag:proto +# tag:java-specific tag:proto 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 } -# tag:sanitize +# tag:sanitize RUN_NO_SANITIZE=$YMAKE_PYTHON ${input:"build/scripts/run_tool.py"} -- -# tag:sanitize +# tag:sanitize when ($IS_CROSS_SANITIZE) { RUN_NO_SANITIZE= } @@ -1004,16 +1004,16 @@ LINK_OR_COPY_CMD=$FS_TOOLS link_or_copy REMOVE_FILE=$FS_TOOLS remove MOVE_FILE=$FS_TOOLS rename -# tag:allocator tag:windows-specific +# tag:allocator tag:windows-specific MSVC_DYNAMICBASE=/DYNAMICBASE when ($ALLOCATOR == "LF") { MSVC_DYNAMICBASE=/DYNAMICBASE:NO } -# tag:sanitize +# tag:sanitize SANITIZER_CFLAGS= -# tag:proto tag:grpc +# tag:proto tag:grpc ### @usage: GRPC() ### ### Emit GRPC code for all .proto files in a PROTO_LIBRARY. @@ -1029,7 +1029,7 @@ macro GRPC() { JAVA_PROTO_PLUGIN(grpc_java contrib/tools/protoc/plugins/grpc_java DEPS $JAVA_GRPC_STUB $JAVA_GRPC_PROTOBUF) } -# tag:fbs +# tag:fbs FLATC_FLAGS_VALUE= ### @usage: FLATC_FLAGS(flags...) ### @@ -1038,10 +1038,10 @@ macro FLATC_FLAGS(FLAGS...) { SET_APPEND(FLATC_FLAGS_VALUE $FLAGS) } -# tag:fbs +# tag:fbs _PY_FBS_DEPS=contrib/python/flatbuffers -# tag:fbs tag:internal +# tag:fbs tag:internal ### @usage: FBS_TO_PYSRC(output_base_name fbs_files...) # internal ### ### Create a tar archive of .py files generated by flatc for Python. Output tar @@ -1052,25 +1052,25 @@ macro FBS_TO_PYSRC(OUT_NAME, IN_FBS_FILES...) { .CMD=${cwd:ARCADIA_BUILD_ROOT} ${tool:"contrib/tools/flatc"} --python --gen-mutable ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR} ${input:IN_FBS_FILES} && $YMAKE_PYTHON ${input:"build/scripts/tar_sources.py"} --exts .py --input $BINDIR --output ${output;noauto;tared:OUT_NAME.fbs.pysrc} ${kv;hide:"p FP"} ${kv;hide:"pc light-green"} ${kv;hide:"tared_kind nodir"} } -# tag:fbs tag:go-specific +# tag:fbs tag:go-specific # Implicit dependencies of generated code for Go _GO_FLATC_IMPORTS=\ ${GOSTD}/strconv \ vendor/github.com/google/flatbuffers/go -# tag:fbs tag:cpp-specific +# tag:fbs tag:cpp-specific macro _CPP_FLATC_CMD(SRC, SRCFLAGS...) { .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/cpp_flatc_wrapper.py"} ${tool:"contrib/tools/flatc"} --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${output;norel:SRC.h} ${output;hide;norel:SRC.cpp} ${input:SRC} ${output;hide;noext;norel:SRC.iter.fbs.h} ${output;noauto;hide;noext;norel:SRC.bfbs} ${kv;hide:"p FL"} ${kv;hide:"pc light-green"} .PEERDIR=contrib/libs/flatbuffers } -# tag:fbs tag:cpp-specific +# tag:fbs tag:cpp-specific macro _CPP_FLATC64_CMD(SRC, SRCFLAGS...) { .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/cpp_flatc_wrapper.py"} ${tool:"contrib/tools/flatc64"} --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --filename-suffix .fbs64 ${FLATC_FLAGS_VALUE} -I ${ARCADIA_ROOT} -I ${ARCADIA_BUILD_ROOT} -o ${output;norel:SRC.h} ${output;hide;norel:SRC.cpp} ${input:SRC} ${output;noauto;hide;noext;norel:SRC.bfbs64} ${kv;hide:"p FL64"} ${kv;hide:"pc light-green"} .PEERDIR=contrib/libs/flatbuffers64 } -# tag:fbs tag:go-specific tag:internal +# tag:fbs tag:go-specific tag:internal ### @usage: _GO_FLATC_CMD(fbs_file flags...) # internal ### ### Create a tar archive of .go files generated by flatc for Go. Output tar archive @@ -1082,7 +1082,7 @@ macro _GO_FLATC_CMD(SRC, PACKAGE_NAME) { .PEERDIR=${_GO_FLATC_IMPORTS} } -# tag:fbs tag:java-specific tag:internal +# tag:fbs tag:java-specific tag:internal ### @usage: _JAVA_FLATC_CMD(fbs_file) # internal ### ### Create a tar archive of .java files generated by flatc for Java. Output tar @@ -1100,11 +1100,11 @@ MODULE_SUFFIX= NEED_PLATFORM_PEERDIRS=yes PEERDIR_TEST_TOOL=yes -# tag:python-specific +# tag:python-specific PYTHON2=no PYTHON3=no -# tag:python-specific +# tag:python-specific when (!$ARCADIA_PYTHON_UNICODE_SIZE) { when ($OS_WINDOWS) { ARCADIA_PYTHON_UNICODE_SIZE=2 @@ -1534,37 +1534,37 @@ macro WITH_DYNAMIC_LIBS() { ENABLE(SO_OUTPUTS) } -# tag:internal +# 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 } -# tag:internal +# tag:internal ### $usage: REAL_LINK_EXEC_DYN_LIB_IMPL(peers...) # internal macro REAL_LINK_EXEC_DYN_LIB_IMPL(WHOLE_ARCHIVE_PEERS...) { .CMD=$REAL_LINK_EXEC_DYN_LIB_CMDLINE } -# tag:internal +# 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 } -# tag:internal +# tag:internal ### $usage: LINK_EXE_IMPL(peers...) # internal macro LINK_EXE_IMPL(WHOLE_ARCHIVE_PEERS...) { .CMD=$LINK_EXE_CMDLINE && $LINK_OR_COPY_SO_CMD } -# tag:internal +# tag:internal ### $usage: LINK_EXEC_DYN_LIB_IMPL(peers...) # internal macro LINK_EXEC_DYN_LIB_IMPL(WHOLE_ARCHIVE_PEERS...) { .CMD=$LINK_EXEC_DYN_LIB_CMDLINE } -# tag:internal +# tag:internal ### @usage: _LINK_UNIT # internal ### ### The base of all linkable modules: programs, DLLs etc. Describes common linking logic. @@ -1601,7 +1601,7 @@ macro ADD_CLANG_TIDY() { SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${ARCADIA_ROOT}/build/yandex_specific/config/clang_tidy/tidy_default_map.json) } -# tag:internal +# tag:internal ### @usage: _BASE_PROGRAM # internal ### ### The base of all programs. It adds dependencies to make final artefact complete and runnable. @@ -1690,8 +1690,8 @@ module _PY2_PROGRAM: _BASE_PY_PROGRAM { ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor) } -# tag:python-specific tag:deprecated -### @usage: PY2_PROGRAM([progname]) # deprecated +# 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. @@ -1722,7 +1722,7 @@ macro NO_EXTENDED_SOURCE_SEARCH() { SET(NO_EXTENDED_SOURCE_SEARCH yes) } -# tag:python-specific +# 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. @@ -1747,17 +1747,17 @@ multimodule PY3_PROGRAM { } } -# tag:ycr-specific +# tag:ycr-specific 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 +# tag:ycr-specific 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}) } -# tag:ycr-specific +# tag:ycr-specific when ($TIDY=="yes") { YCR_LINK_EXE=$LINK_EXE } @@ -1765,7 +1765,7 @@ otherwise { YCR_LINK_EXE=$LINK_EXE && $_YCR_GENERATE_CONFIGS($MODULE_PREFIX$REALPRJNAME $MODULE_PREFIX$REALPRJNAME) } -# tag:ycr-specific +# tag:ycr-specific ### @usage: YCR_PROGRAM([progname]) ### ### yacare-specific program module. Generates yacare configs in addition to producing the program. @@ -1774,20 +1774,20 @@ module YCR_PROGRAM: PROGRAM { .CMD=YCR_LINK_EXE } -# tag:ycr-specific tag:python-specific +# tag:ycr-specific tag:python-specific macro _PYCR_GENERATE_CONFIGS_INTL(Package, App, Configs...) { .CMD=${tool:"maps/infra/pycare/scripts/make_configs"} $Package $App ${cwd:BINDIR} ${output;hide;pre=configs/:Configs} } -# tag:ycr-specific tag:python-specific +# tag:ycr-specific tag:python-specific macro _PYCR_GENERATE_CONFIGS(Package, App) { .CMD=$_PYCR_GENERATE_CONFIGS_INTL($Package $App ${pre=etc/nginx/sites-available/:App.conf} ${pre=etc/template_generator/templates/etc/logrotate.d/:App} ${pre=etc/syslog-ng/conf-available/:App.conf} ${pre=etc/yandex/maps/roquefort/:App.conf} ${pre=etc/template_generator/config.d/:App.yaml} ${pre=etc/supervisor/conf-available/:App.conf} ${pre=etc/template_generator/templates/etc/yandex/unified_agent/conf.d/04_pycare_:App.yml}) } -# tag:ycr-specific tag:python-specific +# tag:ycr-specific tag:python-specific PYCR_LINK_EXE=$LINK_EXE && $_PYCR_GENERATE_CONFIGS($MODULE_PREFIX$REALPRJNAME $MODULE_PREFIX$REALPRJNAME) -# tag:ycr-specific tag:python-specific +# tag:ycr-specific tag:python-specific ### @usage: PYCR_PROGRAM([progname]) ### ### pycare-specific program module. Generates pycare configs in addition to producing the program. @@ -1845,7 +1845,7 @@ module _BASE_UNITTEST: _BASE_PROGRAM { } UNITTEST_SEM=$CPP_PROGRAM_SEM && add_test NAME $REALPRJNAME COMMAND $REALPRJNAME -# tag:test +# tag:test ### @usage: UNITTEST([name]) ### ### Unit test module based on library/cpp/testing/unittest. @@ -1859,7 +1859,7 @@ module UNITTEST: _BASE_UNITTEST { SET(MODULE_LANG CPP) } -# tag:yt-specific tag:test +# tag:yt-specific tag:test ### @usage: YT_UNITTEST([name]) ### ### YT Unit test module based on mapreduce/yt/library/utlib @@ -1868,7 +1868,7 @@ module YT_UNITTEST: _BASE_UNITTEST { ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py) } -# tag:test +# tag:test ### @usage: UNITTEST_WITH_CUSTOM_ENTRY_POINT([name]) ### ### Generic unit test module. @@ -1876,7 +1876,7 @@ module UNITTEST_WITH_CUSTOM_ENTRY_POINT: _BASE_UNITTEST { ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py) } -# tag:cpp-specific tag:test +# tag:cpp-specific tag:test ### @usage: GTEST([name]) ### ### Unit test module based on library/cpp/testing/gtest. @@ -1892,7 +1892,7 @@ module GTEST: _BASE_UNITTEST { USE_AFL=no -# tag:fuzzing +# tag:fuzzing ### @usage: FUZZ() ### ### In order to start using Fuzzing in Arcadia, you need to create a FUZZ module with the implementation of the function LLVMFuzzerTestOneInput(). @@ -1922,7 +1922,7 @@ module FUZZ: _BASE_PROGRAM { ADD_YTEST($MODULE_PREFIX$REALPRJNAME fuzz.test) } -# tag:ios-specific +# tag:ios-specific PACK_IOS_CMD= when ($OS_IOS && $BUILD_IOS_APP) { PACK_IOS_CMD=$YMAKE_PYTHON ${input:"build/scripts/pack_ios.py"} --binary $TARGET --target $TARGET --temp-dir $BINDIR $PEERS @@ -1939,8 +1939,8 @@ otherwise { LINK_BOOSTTEST_CMD=$LINK_EXE BOOST_TEST_TYPE_STRING=boost.test } - -# tag:deprecated + +# tag:deprecated ### @usage: BOOSTTEST([name]) #deprecated ### ### Test module based on boost/test/unit_test.hpp. @@ -1962,7 +1962,7 @@ module BOOSTTEST: _BASE_PROGRAM { SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) } -# tag:deprecated +# tag:deprecated ### @usage BOOSTTEST_WITH_MAIN([name]) #deprecated ### ### Same as BOOSTTEST (see above), but comes with builtin int main(argc, argv) implementation @@ -2001,7 +2001,7 @@ macro FUZZ_OPTS(Data...) { SET_APPEND(FUZZ_OPTS_VALUE $Data) } -# tag:yt-specific tag:test +# tag:yt-specific tag:test TEST_YT_SPEC_VALUE= ### @usage: YT_SPEC(path1 [path2...]) ### @@ -2015,11 +2015,11 @@ macro YT_SPEC(Data...) { SET_APPEND(TEST_YT_SPEC_VALUE $Data) } -# tag:test +# tag:test TEST_SRCS_VALUE= ### @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. +### 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 macro TEST_SRCS(Tests...) { @@ -2030,7 +2030,7 @@ macro DISABLE_DATA_VALIDATION() { DISABLE(VALIDATE_DATA) } -# tag:test +# tag:test TEST_DATA_VALUE= ### @usage: DATA([path...]) ### @@ -2046,7 +2046,7 @@ macro DATA(Data...) { ADD_CHECK(check.data $Data) } -# tag:test +# tag:test TEST_TAGS_VALUE= ### @usage: TAG ([tag...]) ### @@ -2058,7 +2058,7 @@ macro TAG(Tags...) { SET_APPEND(TEST_TAGS_VALUE $Tags) } -# tag:test +# tag:test TEST_REQUIREMENTS_VALUE= ### @usage: REQUIREMENTS([cpu:<count>] [disk_usage:<size>] [ram:<size>] [ram_disk:<size>] [container:<id>] [network:<restricted|full>] [dns:dns64]) ### @@ -2069,7 +2069,7 @@ macro REQUIREMENTS(Tags...) { SET_APPEND(TEST_REQUIREMENTS_VALUE $Tags) } -# tag:test +# tag:test TEST_ENV_VALUE= ### @usage: ENV(key[=value]) ### @@ -2085,7 +2085,7 @@ macro CONFTEST_LOAD_POLICY_LOCAL() { SET_APPEND(TEST_ENV_VALUE "CONFTEST_LOAD_POLICY=LOCAL") } -# tag:test +# tag:test TEST_RECIPES_VALUE= ### @usage: USE_RECIPE(path [arg1 arg2...]) ### @@ -2097,10 +2097,10 @@ macro USE_RECIPE(Data...) { SET_APPEND(TEST_RECIPES_VALUE "USE_RECIPE_DELIM") } -# tag:python-specific tag:test +# tag:python-specific tag:test TEST_PYTHON_PATH_VALUE= - -# tag:python-specific tag:test + +# tag:python-specific tag:test ### @usage: PYTHON_PATH(Path) ### ### Set path to Python that will be used to runs scripts in tests @@ -2108,7 +2108,7 @@ macro PYTHON_PATH(Path) { SET(TEST_PYTHON_PATH_VALUE $Path) } -# tag:test +# tag:test SKIP_TEST_VALUE= ### @usage: SKIP_TEST(Reason) ### @@ -2117,7 +2117,7 @@ macro SKIP_TEST(Reason...) { SET(SKIP_TEST_VALUE $Reason) } -# tag:test +# tag:test LINT_LEVEL_VALUE=extended ### @usage: NO_LINT() ### @@ -2133,7 +2133,7 @@ macro LINT(level) { SET(LINT_LEVEL_VALUE $level) } -# tag:python-specific tag:test +# tag:python-specific tag:test ### @usage: NO_DOCTESTS() ### ### Disable doctests in PY[|3|23_]TEST @@ -2141,7 +2141,7 @@ macro NO_DOCTESTS() { ENV(YA_PYTEST_DISABLE_DOCTEST="yes") } -# tag:python-specific tag:test +# tag:python-specific tag:test ### @usage: _BASE_PYTEST # internal ### ### Base logic of Python 2.x py.test modules: common module properties and dependencies. @@ -2160,17 +2160,17 @@ module _BASE_PYTEST: _BASE_PY_PROGRAM { SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) } -# tag:python-specific tag:deprecated tag:test +# tag:python-specific tag:deprecated tag:test ### @usage: PYTEST_BIN() #deprecated ### -### Same as PY2TEST. Don't use this, use PY2TEST instead. +### Same as PY2TEST. Don't use this, use PY2TEST instead. module PYTEST_BIN: _BASE_PYTEST { .NODE_TYPE=Program SETUP_PYTEST_BIN() } -# tag:python-specific tag:test -### @usage: PY2TEST([name]) +# tag:python-specific tag:test +### @usage: PY2TEST([name]) ### ### The test module for Python 2.x based on py.test ### @@ -2179,7 +2179,7 @@ module PYTEST_BIN: _BASE_PYTEST { ### ### Documentation: https://wiki.yandex-team.ru/yatool/test/#python ### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/ -module PY2TEST: PYTEST_BIN { +module PY2TEST: PYTEST_BIN { when ($FAIL_PY2 == "yes") { _OK=no } @@ -2190,7 +2190,7 @@ module PY2TEST: PYTEST_BIN { ASSERT(_OK You are using deprecated Python2-only code (PY2TEST). Please consider rewriting to Python 3.) } -# tag:python-specific tag:deprecated tag:test +# tag:python-specific tag:deprecated tag:test ### @usage: PY3TEST_BIN() #deprecated ### ### Same as PY3TEST. Don't use this, use PY3TEST instead. @@ -2204,14 +2204,14 @@ module PY3TEST_BIN: _BASE_PY3_PROGRAM { PEERDIR+=library/python/pytest } -# tag:python-specific tag:test +# tag:python-specific tag:test ### Disable submodules with the specified name(s). ### Unlike EXCLUDE_TAGS this variable: ### - affects all projects in the build; ### - filter by module name and ignore MODULE_TAG. EXCLUDE_SUBMODULES=PY3TEST_LIBRARY -# tag:python-specific tag:test +# tag:python-specific tag:test ### @usage: PY3TEST([name]) ### ### The test module for Python 3.x based on py.test @@ -2232,7 +2232,7 @@ multimodule PY3TEST { } } -# tag:cpp-specific tag:test +# tag:cpp-specific tag:test module CPP_STYLE_TEST: PY3TEST_BIN { DEPENDS(contrib/libs/clang12/tools/clang-format) PEERDIR+=library/python/cpp_test @@ -2243,7 +2243,7 @@ macro STYLE(Globs...) { _STYLE(${STYLE_SRCS_GLOB}) } -# tag:cpp-specific tag:deprecated tag:test +# tag:cpp-specific tag:deprecated tag:test ### @usage: GTEST_UGLY([name]) ### ### Deprecated, do not use in new projects. Use GTEST instead. @@ -2260,7 +2260,7 @@ module GTEST_UGLY: _BASE_PROGRAM { SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) } -# tag:test +# tag:test ### @usage: EXECTEST() ### ### Module definition of generic test that executes a binary. @@ -2296,7 +2296,7 @@ module EXECTEST: _BARE_UNIT { SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) } -# tag:cpp-specific tag:test +# tag:cpp-specific tag:test ### @usage: Y_BENCHMARK([benchmarkname]) ### ### Benchmark test based on the library/cpp/testing/benchmark. @@ -2307,7 +2307,7 @@ module Y_BENCHMARK: PROGRAM { SET(MODULE_LANG CPP) } -# tag:cpp-specific tag:test +# tag:cpp-specific tag:test ### @usage: G_BENCHMARK([benchmarkname]) ### ### Benchmark test based on the google benchmark. @@ -2319,7 +2319,7 @@ module G_BENCHMARK: _BASE_PROGRAM { SET(MODULE_LANG CPP) } -# tag:test +# tag:test TEST_ROOT=$(TESTS_DATA_ROOT) RESULT_MAX_FILE=0 STRIP_FILES=--dont-strip-files @@ -2332,8 +2332,8 @@ when ($YA_DEV == "yes") { YA_ROOT=ya-dev } - -# tag:test + +# tag:test ### @usage: UNITTEST_FOR(path/to/lib) ### ### Convenience extension of UNITTEST module. @@ -2463,7 +2463,7 @@ module LIBRARY: _LIBRARY { ADD_CLANG_TIDY() } -# tag:internal +# tag:internal ### @usage: _BARE_MODULE() # internal ### ### Remove unwanted dependencies for "empty" library module @@ -2478,7 +2478,7 @@ macro _BARE_MODULE() { NO_CLANG_TIDY() } -# tag:internal +# tag:internal ### @usage: _BARE_LINK_MODULE() # internal ### ### Remove unwanted dependencies for "empty" link module @@ -2487,7 +2487,7 @@ macro _BARE_LINK_MODULE() { ALLOCATOR(FAKE) } -# tag:internal +# tag:internal ### @usage: _CONDITIONAL_SRCS([USE_CONDITIONAL_SRCS] Files...) # internal ### ### Adds Files... to SRCS if first word is `USE_CONDITIONAL_SRCS` @@ -2649,7 +2649,7 @@ module DLL_UNIT: _LINK_UNIT { } } -# tag:python-specific +# 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. @@ -2698,11 +2698,11 @@ module PY_ANY_MODULE: DLL_UNIT { MODULE_PREFIX= MODULE_SUFFIX=.so } - .RESTRICTED=USE_PYTHON2 USE_PYTHON3 PY_SRCS PY_MAIN + .RESTRICTED=USE_PYTHON2 USE_PYTHON3 PY_SRCS PY_MAIN } -# tag:python-specific -### @usage: PY2MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix]) +# 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. @@ -2711,16 +2711,16 @@ module PY_ANY_MODULE: DLL_UNIT { ### 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. +### 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/ -module PY2MODULE: PY_ANY_MODULE { +module PY2MODULE: PY_ANY_MODULE { PYTHON2_MODULE() SET(MODULE_LANG PY2) .RESTRICTED=PYTHON3_MODULE PYTHON3_ADDINCL } -# tag:python-specific +# 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 @@ -2736,10 +2736,10 @@ module PY2MODULE: PY_ANY_MODULE { module PY3MODULE: PY_ANY_MODULE { PYTHON3_MODULE() SET(MODULE_LANG PY3) - .RESTRICTED=PYTHON2_MODULE PYTHON2_ADDINCL + .RESTRICTED=PYTHON2_MODULE PYTHON2_ADDINCL } -# tag:python-specific +# tag:python-specific ### @usage: PYTHON2_MODULE() ### ### Use in PY_ANY_MODULE to set it up for Python 2.x. @@ -2748,10 +2748,10 @@ macro PYTHON2_MODULE() { PEERDIR+=contrib/tools/python/lib } - PYTHON2_ADDINCL() + PYTHON2_ADDINCL() } -# tag:python-specific +# tag:python-specific ### @usage: PYTHON3_MODULE() ### ### Use in PY_ANY_MODULE to set it up for Python 3.x. @@ -2763,7 +2763,7 @@ macro PYTHON3_MODULE() { PYTHON3_ADDINCL() } -# tag:r-specific +# tag:r-specific ### @usage: R_MODULE(name major_ver [minor_ver] [EXPORTS symlist_file] [PREFIX prefix]) ### ### The external module for R language. @@ -2844,7 +2844,7 @@ module SO_PROGRAM: DLL { DLL_PROXY_CMD_MF=$GENERATE_MF && $COPY_CMD $AUTO_INPUT $TARGET -# tag:internal +# tag:internal ### @usage: DEV_DLL_PROXY() # internal ### ### The use of this module is strictly prohibited!!! @@ -2868,7 +2868,7 @@ module DEV_DLL_PROXY: _BARE_UNIT { } } -# tag:internal +# tag:internal ### @usage: DLL_PROXY() # internal ### ### The use of this module is strictly prohibited!!! @@ -2976,7 +2976,7 @@ macro ALL_SRCS(GLOBAL?"GLOBAL":"", Files...) { module _DLL_COMPATIBLE_LIBRARY: LIBRARY { } -@import "${CONF_ROOT}/conf/project_specific/yql_udf.conf" +@import "${CONF_ROOT}/conf/project_specific/yql_udf.conf" # as SRCS in packages use macro BUNDLE_SRCS! @@ -3047,7 +3047,7 @@ 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 +# tag:proto ### @usage: RESOLVE_PROTO() ### ### Enable include resolving within UNIONs and let system .proto being resolved @@ -3081,7 +3081,7 @@ module UNION: _BASE_UNIT { PEERDIR_TAGS=CPP_PROTO CPP_FBS PY2 PY2_NATIVE YQL_UDF_SHARED __EMPTY__ DOCBOOK JAR_RUNABLE PY3_BIN DLL } -# tag:python-specific +# tag:python-specific module _PY_PACKAGE: UNION { .EXTS=.py .ALL_INS_TO_OUT=yes @@ -3091,7 +3091,7 @@ module _PY_PACKAGE: UNION { SET(DONT_RESOLVE_INCLUDES no) } -# tag:python-specific tag:deprecated tag:internal +# tag:python-specific tag:deprecated tag:internal ### @usage: PY_PACKAGE(name) # internal, deprecated ### ### This is module created via PY_PROTOS_FOR() macro @@ -3117,7 +3117,7 @@ macro _EVAL_HIDE_INPUTS(ARGS...) { .CMD=${input;hide:ARGS} } -# tag:docs +# tag:docs _DOCS_USE_PLANTUML=no _DOCS_EXTRA_TOOLS= _DOCS_EXTRA_INPUTS= @@ -3236,7 +3236,7 @@ macro _DOCS_YFM_USE_PLANTUML() { } } -# tag:docs +# tag:docs ### @usage: DOCS() ### ### Documentation project multimodule. @@ -3288,7 +3288,7 @@ multimodule DOCS { } } -# tag:docs +# tag:docs _DOCS_USE_PLANTUML= ### @usage: USE_PLANTUML() ### @@ -3309,7 +3309,7 @@ macro DOCS_BUILDER(DocsTool) { SET(_DOCS_BUILDER_VALUE $DocsTool) } -# tag:docs +# tag:docs ### @usage: DOCS_DIR(path) ### ### Specify directory with source .md files for DOCS multimodule if it differs from project directory. @@ -3320,7 +3320,7 @@ macro DOCS_DIR(Dir) { SET(_DOCS_DIR_VALUE $Dir) } -# tag:docs +# tag:docs _DOCS_DEFAULT_CONFIG= _DOCS_CONFIG_VALUE=$_DOCS_DEFAULT_CONFIG ### @usage: DOCS_CONFIG(path) @@ -3335,7 +3335,7 @@ macro DOCS_CONFIG(File) { SET(_DOCS_CONFIG_VALUE $File) } -# tag:docs +# tag:docs _DOCS_VARS_VALUE= ### @usage: DOCS_VARS(variable1=value1 variable2=value2 ...) ### @@ -3347,7 +3347,7 @@ macro DOCS_VARS(Args...) { SET_APPEND(_DOCS_VARS_VALUE $Args) } -# tag:docs +# tag:docs _DOCS_INCLUDE_SOURCES_VALUE= ### @usage: DOCS_INCLUDE_SOURCES(path...) ### @@ -3359,10 +3359,10 @@ macro DOCS_INCLUDE_SOURCES(Args...) { SET_APPEND(_DOCS_INCLUDE_SOURCES_VALUE $Args) } -# tag:python-specific +# tag:python-specific PY_NAMESPACE_VALUE= -# tag:python-specific +# tag:python-specific ### @usage: PY_NAMESPACE(prefix) ### ### Sets default Python namespace for all python sources in the module. @@ -3371,7 +3371,7 @@ macro PY_NAMESPACE(Arg) { SET(PY_NAMESPACE_VALUE $Arg) } -# tag:internal +# tag:internal ### @usage: _SRCS_NO_GLOBAL(files...) # internal ### ### Proxy macro to SRCS macro which filters out GLOBAL keyword from the list of source files. @@ -3381,17 +3381,17 @@ macro _SRCS_NO_GLOBAL(GLOBAL[], FILES...) { SRCS($GLOBAL $FILES) } -# tag:java-specific +# tag:java-specific JAVA_VCS_MF_ARG= COMPILE_JAVA_MF=$COMPILE_JAVA -# tag:java-specific +# tag:java-specific 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 +# tag:java-specific EXT_JAVA_VCS_INFO=no ### @usage: EMBED_JAVA_VCS_INFO() ### @@ -3401,7 +3401,7 @@ macro EMBED_JAVA_VCS_INFO() { ENABLE(EXT_JAVA_VCS_INFO) } -# tag:java-specific tag:internal +# 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.) @@ -3437,7 +3437,7 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT { SET(MODULE_LANG JAVA) } -# tag:java-specific +# tag:java-specific ALL_JAR_SOURCES= LINT_JAVA_SOURCES= ALL_SRCDIRS= @@ -3472,7 +3472,7 @@ macro _GENTAR_HELPER(OUT_DIR[], Args...) { .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/autotar_gendirs.py"} --pack ${OUT_DIR} --outs ${output;tared;suf=.$_HASH_HELPER($Args).gentar:OUT_DIR} ${kv;hide:"tared_kind nodir"} } -# tag:java-specific +# tag:java-specific RUN_JAR_PROG_CP_PRE=@ RUN_JAR_PROG_CP_SUF=.cplst when($JDK_VERSION == "8") { @@ -3480,7 +3480,7 @@ when($JDK_VERSION == "8") { RUN_JAR_PROG_CP_SUF= } -# tag:java-specific +# 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...) { _LATE_GLOB(${IN_DIRS_VAR} ${suf=/**/*:IN_DIR}) _CHECK_RUN_JAVA_PROG_CLASSPATH($CLASSPATH) @@ -3488,17 +3488,17 @@ macro _DO_2_RUN_JAR_PROGRAM(IN_DIRS_VAR="uniq_", IN_DIRS_INPUTS[], IN{input}[], .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 +# tag:java-specific macro _DO_1_RUN_JAR_PROGRAM(IN_DIRS_VAR="uniq", Args...) { _DO_2_RUN_JAR_PROGRAM($Args IN_DIRS_VAR $IN_DIRS_VAR IN_DIRS_INPUTS ${"$"}{input;hide:$IN_DIRS_VAR}) } -# tag:java-specific +# tag:java-specific macro RUN_JAVA_PROGRAM(Args...) { _DO_1_RUN_JAR_PROGRAM($Args IN_DIRS_VAR uniq_${hash:Args}) } -# tag:java-specific +# tag:java-specific _JAR_ANN_PROCESSORS= _JAR_ANN_PROC_OPT_PREFIX= macro JAR_ANNOTATION_PROCESSOR(Classes...) { @@ -3509,17 +3509,17 @@ macro JAR_ANNOTATION_PROCESSOR(Classes...) { SET_APPEND(ANNOTATION_PROCESSOR_VALUE $ARGS_DELIM $Classes) } -# tag:java-specific +# tag:java-specific macro _JAR_ANN_PROC_OPTS(Classes...) { .CMD=$_JAR_ANN_PROC_OPT_PREFIX ${join=,:Classes} } -# tag:java-specific +# tag:java-specific macro _NOOP_MACRO(Args...) { ENABLE(UNUSED_MACRO) } -# tag:java-specific +# tag:java-specific module _JAR_BASE: _BARE_UNIT { .NODE_TYPE=Bundle .CMD=TOUCH_UNIT @@ -3542,17 +3542,17 @@ module _JAR_BASE: _BARE_UNIT { SET(MODULE_LANG JAVA) } -# tag:java-specific +# tag:java-specific module JAVA_CONTRIB_PROXY: _JAR_BASE { } -# tag:java-specific +# tag:java-specific macro _FETCH_CONTRIB(Id, Out, SBR="sbr:") { .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 --copy-to ${output:Out} ${input;hide:"build/scripts/fetch_from.py"} ${requirements;hide:"network:full"} ${kv;hide:"p SB"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"} ADD_CHECK(check.resource $Id) } -# tag:java-specific +# tag:java-specific LOCAL_JAR_PATH= LOCAL_SOURCES_JAR_PATH= JAR_RESOURCE_ID= @@ -3561,27 +3561,27 @@ FETCH_SRCS_JAR= FETCH_TARGET_JAR= FETCH_CONTRIB_JAR=$FETCH_TARGET_JAR $FETCH_SRCS_JAR -# tag:java-specific +# tag:java-specific macro JAR_RESOURCE(Id) { SET(JAR_RESOURCE_ID $Id) } -# tag:java-specific +# tag:java-specific macro SRC_RESOURCE(Id) { SET(SRC_RESOURCE_ID $Id) } -# tag:java-specific +# tag:java-specific macro LOCAL_JAR(File) { SET(LOCAL_JAR_PATH $File) } - -# tag:java-specific + +# tag:java-specific macro LOCAL_SOURCES_JAR(File) { SET(LOCAL_SOURCES_JAR_PATH $File) } -# tag:java-specific +# tag:java-specific module JAVA_CONTRIB: _JAR_BASE { .CMD=FETCH_CONTRIB_JAR .FINAL_TARGET=yes @@ -3616,10 +3616,10 @@ module JAVA_CONTRIB: _JAR_BASE { SET(MODULE_SUFFIX .jar) } -# tag:kotlin-specific +# tag:kotlin-specific KOTLINC_OPTS_VALUE= -# tag:kotlin-specific +# tag:kotlin-specific KT_SRSCLIST_FLAG=--kotlin ${BINDIR}/misc/all-kt-sources.txt KT_CLASSES_DIR=${BINDIR}/kt_cls COLLECT_KT_CLASSPATH=${YMAKE_PYTHON} ${input:"build/scripts/writer.py"} --file ${BINDIR}/kt_bfg.txt -m --ya-start-command-file ${ext=.jar:MANAGED_PEERS_CLOSURE} --ya-end-command-file @@ -3628,38 +3628,38 @@ COMPILE_KT=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/with_p ALL_KT_COMMANDS= KT_CLASSPATH_ITEM= -# tag:java-specific +# tag:java-specific JAVAC_CMD=$JDK_RESOURCE/bin/javac ERROR_PRONE_JAVAC_CMD=${YMAKE_PYTHON} ${input:"build/scripts/build_java_with_error_prone2.py"} $JDK_RESOURCE/bin/java $JDK_RESOURCE/bin/javac $ERROR_PRONE_RESOURCE/error_prone.jar -# tag:java-specific tag:codenav -JAVA_YNDEXING=no - -# tag:java-specific +# tag:java-specific tag:codenav +JAVA_YNDEXING=no + +# tag:java-specific when ($USE_SYSTEM_KYTHE) { KYTHE_RESOURCE=$USE_SYSTEM_KYTHE } otherwise { KYTHE_RESOURCE=$KYTHE_RESOURCE_GLOBAL } - -# tag:java-specific tag:codenav + +# tag:java-specific tag:codenav _JAVA_YNDEXING_CMD=$YMAKE_PYTHON ${input:"build/scripts/build_java_codenav_index.py"} $TARGET $ARCADIA_BUILD_ROOT $ARCADIA_ROOT ${BINDIR}/all-java.srclst $JDK_RESOURCE/bin/java -jar $KYTHE_RESOURCE/kythe/extractors/javac_extractor.jar _DO_JAVA_YNDEXING= -# tag:java-specific +# tag:java-specific SOURCES_JAR=no _PACK_SRC_JAR_IMPL=&& $FS_TOOLS md ${BINDIR}/src $JAR_GEN_JSRCS $LINK_JAR_JSOURCES && ${cwd;suf=/src:BINDIR} $JDK_RESOURCE/bin/jar cfvm ${output;pre=${BINDIR}/${MODULE_PREFIX};suf=-sources.jar:REALPRJNAME} $VCS_JAVA . _PACK_SRC_JAR= -# tag:java-specific +# tag:java-specific _PACK_JNI= _PACK_JNI_CMD= && $FS_TOOLS link_or_copy_to_dir --ya-start-command-file ${ext=.so:MANAGED_PEERS_CLOSURE} ${ext=.dll:MANAGED_PEERS_CLOSURE} ${ext=.dylib:MANAGED_PEERS_CLOSURE} --ya-end-command-file ${BINDIR}/cls -# tag:java-specific +# tag:java-specific _MAKE_JSTYLE_FILE_LIST= -# tag:java-specific +# tag:java-specific _LINK_UBERJAR= _UBERJAR_SELF= _DO_LINK_UBERJAR= && $JDK_RESOURCE/bin/java -cp $UBERJAR_RESOURCE/devtools-java_shader.jar ru.yandex.devtools.emigrante.Main --out-jar $TARGET $_UBERJAR_SELF ${ext=.jar;pre=--jar :MANAGED_PEERS_CLOSURE} ${UBERJAR_PREFIX_FLAG} ${UBERJAR_HIDE_EXCLUDE_FLAGS} $UBERJAR_PATH_EXCLUDES ${UBERJAR_MANIFEST_TRANSFORMER_MAIN_FLAG} ${UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS} ${UBERJAR_APPENDING_TRANSFORMER_FLAGS} ${UBERJAR_SERVICES_RESOURCE_TRANSFORMER_FLAG}\ @@ -3669,12 +3669,12 @@ _DO_LINK_UBERJAR= && $JDK_RESOURCE/bin/java -cp $UBERJAR_RESOURCE/devtools-java_ && ${cwd;suf=/_empty:BINDIR} ${JDK_RESOURCE}/bin/jar ufv ${TARGET} META-INF/MANIFEST.MF \ && $JDK_RESOURCE/bin/jar ufvm $TARGET $VCS_JAVA -# tag:java-specific +# tag:java-specific macro _PACK_JAR_HELPER(Out) { .CMD=${cwd;suf=/cls:BINDIR} $JDK_RESOURCE/bin/jar cfvm $Out $VCS_JAVA . } - -# tag:java-specific + +# tag:java-specific macro _JAVAC_RUN_HELPER(JAVAC_CMD_WITH_ARGS...) { .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/with_pathsep_resolve.py"} $YMAKE_PYTHON ${input:"build/scripts/setup_java_tmpdir.py"} $YMAKE_PYTHON ${input:"build/scripts/run_javac.py"} --sources-list ${BINDIR}/all-java.srclst ${JAVAC_CMD_WITH_ARGS} @${BINDIR}/all-java.srclst -classpath ${ARCADIA_BUILD_ROOT}/bfg.jar -Xpkginfo:always ${JAVAC_OPTS} $_JAR_ANN_PROC_OPTS($_JAR_ANN_PROCESSORS) -d ${BINDIR}/cls -g -encoding UTF-8 } @@ -3682,7 +3682,7 @@ macro _ADD_HIDDEN_INPUTS(Inputs...) { .CMD=${input;hide:Inputs} } -# tag:java-specific +# tag:java-specific ERROR_PRONE_JDK16_ADD_OPENS=-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED ERROR_PRONE_2_7_1_FORCED_OPTS=-Xep:InlineMeInliner:OFF -Xep:SameNameButDifferent:OFF @@ -3717,7 +3717,7 @@ LINK_JAR=$PREPARE_JAVA_BUILD_DIRS \ $_LINK_UBERJAR \ $_ADD_HIDDEN_INPUTS($JAVA_EXTERNAL_DEPENDENCIES_VALUE) -# tag:java-specific +# tag:java-specific _EXT_SRC_JAR= _EXT_JAR= _COPY_EXT_SRC_JAR= @@ -3728,10 +3728,10 @@ macro JAVA_RESOURCE(JAR, SOURCES="") { SET(_EXT_JAR $JAR) } -# tag:java-specific tag:fbs +# tag:java-specific tag:fbs JAVA_FLATBUFFERS_VERSION = 2.0.0 -# tag:java-specific +# tag:java-specific module _COMPILABLE_JAR_BASE : _JAR_BASE { # flatbuffers-java DEPENDENCY_MANAGEMENT(contrib/java/com/google/flatbuffers/flatbuffers-java/${JAVA_FLATBUFFERS_VERSION}) @@ -3750,7 +3750,7 @@ module _COMPILABLE_JAR_BASE : _JAR_BASE { CHECK_DEPENDENT_DIRS(DENY PEERDIRS contrib/java/com/google/protobuf/protobuf-java-util EXCEPT contrib/java/com/google/protobuf/protobuf-java-util/${JAVA_PROTO_RUNTIME_VERSION}) } -# tag:java-specific tag:internal +# tag:java-specific tag:internal ### @usage: JAR_LIBRARY() #internal ### ### Reimplementation of the JAVA_LIBRARY with ymake.core.conf and ymake based dependency management @@ -3857,22 +3857,22 @@ module JAR_LIBRARY: _COMPILABLE_JAR_BASE { JAVA_MODULE(IDEA_ONLY) } -# tag:java-specific +# tag:java-specific _SCRIPTGEN_FLAGS= macro _GEN_JAVA_SCRIPT_IMPL(Out, Template, Props...) { .CMD=$SCRIPTGEN_RESOURCE_GLOBAL/scriptgen --java $JDK_RESOURCE/bin/java --output ${output:Out} --template ${input:Template} ${_SCRIPTGEN_FLAGS} -D JAR_NAME=${REALPRJNAME}.jar -D CLASSPATH=${nopath;join;ext=.jar;pre="::":MANAGED_PEERS_CLOSURE} -D PROJECT_DIR=${MODDIR} -D JAR_BASENAME=${REALPRJNAME} $Props } -# tag:java-specific +# tag:java-specific _GEN_USERSCRIPTS= macro _ADD_GEN_JAVA_SCRIPT(Out, Template, Props...) { SET_APPEND(_GEN_USERSCRIPTS && \$_GEN_JAVA_SCRIPT_IMPL($Out $Template $Props)) } -# tag:java-specific +# tag:java-specific _PACK_JDK= -# tag:java-specific +# tag:java-specific DO_GEN_JAVA_RUN_SH= _SOURCE_JARS= _SOURCE_JARS_CPLIST= @@ -3884,7 +3884,7 @@ TAR_CLASSPATH= && $YMAKE_PYTHON ${input:"build/scripts/find_and_tar.py"} ${outpu DO_TAR_CLASSPATH= LINK_JAR_PROGRAM=$FS_TOOLS md ${BINDIR}/${REALPRJNAME} && $COLLECT_JAR_PROGRAM_CP && $DO_GEN_JAVA_RUN_SH && $GEN_RUN_CP && $MAKE_JAR_PROGRAM_CPLST $DO_TAR_CLASSPATH $_GEN_USERSCRIPTS $_PACK_JDK ${kv;hide:"p JP"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} -# tag:java-specific +# tag:java-specific # UBERJAR program link command LINK_UBERJAR_PROGRAM=$YMAKE_PYTHON ${input:"build/scripts/make_java_classpath_file.py"} --from-args ${output;pre=$MODULE_PREFIX;suf=${MODULE_SUFFIX}.cplst:REALPRJNAME} $TARGET \ && $FS_TOOLS md ${BINDIR}/${REALPRJNAME} \ @@ -3894,17 +3894,17 @@ LINK_UBERJAR_PROGRAM=$YMAKE_PYTHON ${input:"build/scripts/make_java_classpath_fi $_GEN_USERSCRIPTS \ $_PACK_JDK -# tag:java-specific +# tag:java-specific RUN_WITH_SOURCES=no TARED_CLASSPATH=yes # TODO jbuild creates tar with all classpath deps by default and some projects rely on this. In ymake build this tar file creation is not needed and should be disabled by dafault in future _JAR_SRCS_CALLED=no -# tag:java-specific +# tag:java-specific macro _MARK_JAVA_PROG_WITH_SOURCES(Args...) { ENABLE(_JAR_SRCS_CALLED) } -# tag:java-specific +# tag:java-specific module _JAR_RUNABLE: _COMPILABLE_JAR_BASE { .FINAL_TARGET=yes .CMD=LINK_JAR_PROGRAM @@ -3944,7 +3944,7 @@ module _JAR_RUNABLE: _COMPILABLE_JAR_BASE { CHECK_PROVIDES() } -# tag:java-specific +# tag:java-specific multimodule JAR_PROGRAM { module JAR_RUNABLE: _JAR_RUNABLE { .ALLOWED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE @@ -3961,7 +3961,7 @@ multimodule JAR_PROGRAM { } } -# tag:java-specific +# tag:java-specific LINK_JAR_TEST=${YMAKE_PYTHON} ${input:"build/scripts/writer.py"} --file ${BINDIR}/run-bf.txt -Q -m --ya-start-command-file ${ext=.jar:MANAGED_PEERS_CLOSURE} --ya-end-command-file && ${YMAKE_PYTHON} ${input:"build/scripts/make_manifest_from_bf.py"} ${BINDIR}/run-bf.txt ${TARGET} YMAKE_JAVA_TEST= module _JAR_TEST: _COMPILABLE_JAR_BASE { @@ -3975,7 +3975,7 @@ module _JAR_TEST: _COMPILABLE_JAR_BASE { CHECK_PROVIDES() } -# tag:java-specific +# tag:java-specific multimodule JUNIT5_YMAKE { module JAR_TESTABLE: _JAR_TEST { .ALLOWED=JAVA_TEST_PEERDIR @@ -3994,7 +3994,7 @@ multimodule JUNIT5_YMAKE { } } -# tag:java-specific +# tag:java-specific multimodule JTEST_YMAKE { module JAR_TESTABLE: _JAR_TEST { .ALLOWED=YT_SPEC @@ -4016,17 +4016,17 @@ multimodule JTEST_YMAKE { } } -# tag:python-specific tag:deprecated -### @usage: PY2_LIBRARY() # deprecated +# 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. +### 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/ -module PY2_LIBRARY: _LIBRARY { +module PY2_LIBRARY: _LIBRARY { .ALIASES=REQUIREMENTS=PY_REQUIREMENTS _ARCADIA_PYTHON_ADDINCL() @@ -4040,7 +4040,7 @@ module PY2_LIBRARY: _LIBRARY { MODULE_PREFIX=libpy } .ALLOWED=FORK_TESTS - .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_PYTHON2 + .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 @@ -4084,7 +4084,7 @@ module _PY3_LIBRARY: _LIBRARY { SET(MODULE_LANG PY3) } -# tag:python-specific +# tag:python-specific ### @usage: PY3_LIBRARY() ### ### Python 3.x binary library. Builds sources from PY_SRCS to data suitable for PY2_PROGRAM @@ -4145,21 +4145,21 @@ module _BASE_PY_PROGRAM: _BASE_PROGRAM { when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") { NO_STRIP=yes } - .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_PYTHON2 + .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 SET(MODULE_LANG PY2) } -# tag:python-specific tag:codenav -when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") { - PY3_PROGRAM_LINK_EXE=$LINK_EXE ${kv;hide:"py3yndex $TARGET"} -} -otherwise { - PY3_PROGRAM_LINK_EXE=$LINK_EXE -} - - -# tag:python-specific +# tag:python-specific tag:codenav +when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") { + PY3_PROGRAM_LINK_EXE=$LINK_EXE ${kv;hide:"py3yndex $TARGET"} +} +otherwise { + PY3_PROGRAM_LINK_EXE=$LINK_EXE +} + + +# tag:python-specific ### @usage: _BASE_PY_PROGRAM #internal ### ### The base module for all Python 3.x binary programs. Adds linking logic, relevant module properties and @@ -4169,7 +4169,7 @@ otherwise { ### ### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/ module _BASE_PY3_PROGRAM: _BASE_PROGRAM { - .CMD=PY3_PROGRAM_LINK_EXE + .CMD=PY3_PROGRAM_LINK_EXE _ARCADIA_PYTHON3_ADDINCL() PEERDIR(library/python/runtime_py3/main) when ($PYTHON_SQLITE3 != "no") { @@ -4206,11 +4206,11 @@ module _BASE_PY3_PROGRAM: _BASE_PROGRAM { PEERDIR += contrib/python/six } .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER - .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL USE_PYTHON2 + .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL USE_PYTHON2 SET(MODULE_LANG PY3) } -# tag:python-specific +# tag:python-specific ### @usage: PY3_PROGRAM_BIN([progname]) ### Use instead of PY3_PROGRAM only if ya.make with PY3_PROGRAM() included in another ya.make ### In all other cases use PY3_PROGRAM @@ -4221,17 +4221,17 @@ module PY3_PROGRAM_BIN: _BASE_PY3_PROGRAM { ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor) } -# tag:java-specific +# tag:java-specific JAVA_SWIG_DELIM=JAVA_SWIG_DELIM -# tag:java-specific +# tag:java-specific JDK_VERSION=11 when ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) { JDK_VERSION=8 } -# tag:java-specific +# tag:java-specific # remove extra peerdir to jdk11 after https://st.yandex-team.ru/DEVTOOLS-8851 is done when ($JDK_VERSION == "17") { JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk17 build/platform/java/jdk/jdk11 @@ -4261,7 +4261,7 @@ when ($JDK_VERSION == "8") { JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk8 build/platform/java/jdk/jdk11 } -# tag:java-specific +# tag:java-specific when ($JDK_VERSION == "17") { UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar17 } @@ -4290,7 +4290,7 @@ when ($JDK_VERSION == "8") { UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar8 } -# tag:java-specific +# tag:java-specific JAVAC_OPTS= when ($USE_SYSTEM_JDK) { JDK_RESOURCE=$USE_SYSTEM_JDK @@ -4325,7 +4325,7 @@ otherwise { } } -# tag:java-specific +# tag:java-specific when (!$USE_SYSTEM_ERROR_PRONE) { when ($JDK_VERSION == "8" || $JDK_VERSION == "10") { ERROR_PRONE_VERSION=2.3.1 @@ -4388,7 +4388,7 @@ otherwise { } } -# tag:java-specific +# tag:java-specific when ($JDK_VERSION == "17") { WITH_JDK_RESOURCE=$WITH_JDK17_RESOURCE_GLOBAL } @@ -4417,11 +4417,11 @@ when ($JDK_VERSION == "8") { WITH_JDK_RESOURCE=$WITH_JDK8_RESOURCE_GLOBAL } -# tag:java-specific +# 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"} 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 +# tag:deprecated ### @usage: METAQUERY() #deprecated ### ### Project Definition - KIWI Meta query. (Objected) @@ -4446,7 +4446,7 @@ macro SYSTEM_PROPERTIES(Args...) { SET_APPEND(SYSTEM_PROPERTIES_VALUE $Args) } -# tag:java-specific +# tag:java-specific JVM_ARGS_VALUE= ### @usage: JVM_ARGS(Args...) ### @@ -4457,7 +4457,7 @@ macro JVM_ARGS(Args...) { SET_APPEND(JVM_ARGS_VALUE $Args) } -# tag:java-specific +# tag:java-specific CHECK_JAVA_DEPS_VALUE= ### @usage: CHECK_JAVA_DEPS(<yes|no>) ### @@ -4487,7 +4487,7 @@ macro TEST_CWD(Arg) { SET(TEST_CWD_VALUE $Arg) } -# tag:java-specific +# tag:java-specific MAKE_UBERJAR_VALUE= ### @usage: UBERJAR() ### @@ -4511,7 +4511,7 @@ macro UBERJAR() { SET(MAKE_UBERJAR_VALUE yes) } -# tag:java-specific +# tag:java-specific UBERJAR_PREFIX_VALUE= UBERJAR_PREFIX_FLAG= ### @usage: UBERJAR_HIDING_PREFIX(Arg) @@ -4525,7 +4525,7 @@ macro UBERJAR_HIDING_PREFIX(Arg) { SET(UBERJAR_PREFIX_FLAG ${pre=--shade-prefix :Arg}) } -# tag:java-specific +# tag:java-specific UBERJAR_HIDE_EXCLUDE_VALUE= UBERJAR_HIDE_EXCLUDE_FLAGS= ### @usage: UBERJAR_HIDE_EXCLUDE_PATTERN(Args...) @@ -4540,7 +4540,7 @@ macro UBERJAR_HIDE_EXCLUDE_PATTERN(Args...) { SET_APPEND(UBERJAR_HIDE_EXCLUDE_FLAGS ${pre=--shade-exclude :Args}) } -# tag:java-specific +# tag:java-specific UBERJAR_PATH_EXCLUDES= UBERJAR_PATH_EXCLUDE_VALUE= ### @usage: UBERJAR_PATH_EXCLUDE_PREFIX(Args...) @@ -4554,7 +4554,7 @@ macro UBERJAR_PATH_EXCLUDE_PREFIX(Args...) { SET_APPEND(UBERJAR_PATH_EXCLUDES ${pre=--uber-exclude :Args}) } -# tag:java-specific +# tag:java-specific UBERJAR_MANIFEST_TRANSFORMER_MAIN_VALUE= UBERJAR_MANIFEST_TRANSFORMER_MAIN_FLAG= ### @usage: UBERJAR_MANIFEST_TRANSFORMER_MAIN(Main) @@ -4567,7 +4567,7 @@ macro UBERJAR_MANIFEST_TRANSFORMER_MAIN(Main) { SET(UBERJAR_MANIFEST_TRANSFORMER_MAIN_FLAG --manifest-main $Main) } -# tag:java-specific +# tag:java-specific UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_VALUE= UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS= ### @usage: UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE(Key, Value) @@ -4580,7 +4580,7 @@ macro UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE(Key, Value) { SET_APPEND(UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS --manifest-attribute ${Key}:${Value}) } -# tag:java-specific +# tag:java-specific UBERJAR_APPENDING_TRANSFORMER_VALUE= UBERJAR_APPENDING_TRANSFORMER_FLAGS= ### @usage: UBERJAR_APPENDING_TRANSFORMER(Resource) @@ -4596,7 +4596,7 @@ macro UBERJAR_APPENDING_TRANSFORMER(Resources...) { SET_APPEND(UBERJAR_APPENDING_TRANSFORMER_FLAGS ${pre=--append-transformer :Resources}) } -# tag:java-specific +# tag:java-specific UBERJAR_SERVICES_RESOURCE_TRANSFORMER_VALUE= UBERJAR_SERVICES_RESOURCE_TRANSFORMER_FLAG= ### @usage: UBERJAR_SERVICES_RESOURCE_TRANSFORMER() @@ -4609,7 +4609,7 @@ macro UBERJAR_SERVICES_RESOURCE_TRANSFORMER() { SET(UBERJAR_SERVICES_RESOURCE_TRANSFORMER_FLAG --service-transformer) } -# tag:idea-specific +# tag:idea-specific IDEA_EXCLUDE_DIRS_VALUE= ### @usage: IDEA_EXCLUDE_DIRS(<excluded dirs>) ### @@ -4619,7 +4619,7 @@ macro IDEA_EXCLUDE_DIRS(Args...) { SET_APPEND(IDEA_EXCLUDE_DIRS_VALUE $Args) } -# tag:idea-specific +# tag:idea-specific IDEA_RESOURCE_DIRS_VALUE= ### @usage: IDEA_RESOURCE_DIRS(<additional dirs>) ### @@ -4629,7 +4629,7 @@ macro IDEA_RESOURCE_DIRS(Args...) { SET_APPEND(IDEA_RESOURCE_DIRS_VALUE $Args) } -# tag:idea-specific +# tag:idea-specific IDEA_MODULE_NAME_VALUE= ### @usage: IDEA_MODULE_NAME(module_name) ### @@ -4639,7 +4639,7 @@ macro IDEA_MODULE_NAME(Name) { SET(IDEA_MODULE_NAME_VALUE $Name) } -# tag:java-specific +# tag:java-specific JAVAC_FLAGS_VALUE= ### @usage: JAVAC_FLAGS(Args...) ### @@ -4649,7 +4649,7 @@ macro JAVAC_FLAGS(Args...) { SET_APPEND(JAVAC_FLAGS_VALUE $ARGS_DELIM $Args) } -# tag:java-specific +# tag:java-specific ENABLE_PREVIEW_VALUE= ### @usage: ENABLE_PREVIEW() ### @@ -4661,7 +4661,7 @@ macro ENABLE_PREVIEW() { SET(ENABLE_PREVIEW_VALUE yes) } -# tag:java-specific +# tag:java-specific SAVE_JAVAC_GENERATED_SRCS= SAVE_JAVAC_GENERATED_SRCS_DIR= SAVE_JAVAC_GENERATED_SRCS_TAR= @@ -4671,7 +4671,7 @@ when ($SAVE_JAVAC_GENERATED_SRCS) { JAVAC_FLAGS_VALUE+=-s $SAVE_JAVAC_GENERATED_SRCS_DIR } -# tag:java-specific +# tag:java-specific MAVEN_GROUP_ID_VALUE= ### @usage: MAVEN_GROUP_ID(group_id_for_maven_export) ### @@ -4681,7 +4681,7 @@ macro MAVEN_GROUP_ID(Arg) { SET(MAVEN_GROUP_ID_VALUE $Arg) } -# tag:java-specific +# tag:java-specific ANNOTATION_PROCESSOR_VALUE= ### @usage: ANNOTATION_PROCESSOR(processors...) ### @@ -4700,7 +4700,7 @@ macro EXCLUDE(Args...) { SET_APPEND(EXCLUDE_VALUE $ARGS_DELIM $Args) } -# tag:java-specific +# tag:java-specific JAVA_SRCS_VALUE= ### @usage: JAVA_SRCS(srcs) ### @@ -4730,13 +4730,13 @@ macro JAVA_SRCS(Args...) { SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM $Args) } -# tag:java-specific +# tag:java-specific JAVA_ADD_DLLS_VALUE=no macro ADD_DLLS_TO_JAR() { SET(JAVA_ADD_DLLS_VALUE yes) } -# tag:java-specific +# tag:java-specific MANAGED_PEERS= MANAGED_PEERS_CLOSURE= RUN_JAVA_PROGRAM_MANAGED= @@ -4751,7 +4751,7 @@ TEST_CLASSPATH_VALUE= # Calculated and replaced by ymake can be used in DART DATA TEST_CLASSPATH_MANAGED= -# tag:java-specific +# tag:java-specific DEPENDENCY_MANAGEMENT_VALUE= ### @usage: DEPENDENCY_MANAGEMENT(path/to/lib1 path/to/lib2 ...) ### @@ -4775,7 +4775,7 @@ macro DEPENDENCY_MANAGEMENT(Args...) { _GHOST_PEERDIR($Args) } -# tag:java-specific +# tag:java-specific WITH_JDK_VALUE= ### @usage: WITH_JDK() ### @@ -4784,7 +4784,7 @@ macro WITH_JDK() { SET(WITH_JDK_VALUE yes) } -# tag:kotlin-specific +# tag:kotlin-specific WITH_KOTLIN_VALUE= ### @usage: WITH_KOTLIN() ### @@ -4793,7 +4793,7 @@ macro WITH_KOTLIN() { SET(WITH_KOTLIN_VALUE yes) } -# tag:java-specific +# tag:java-specific WITH_GROOVY_VALUE= ### @usage: WITH_GROOVY() ### @@ -4802,7 +4802,7 @@ macro WITH_GROOVY() { SET(WITH_GROOVY_VALUE yes) } -# tag:kotlin-specific +# tag:kotlin-specific KOTLINC_FLAGS_VALUE=-Xjvm-default=all ### @usage: KOTLINC_FLAGS(-flags) ### @@ -4811,7 +4811,7 @@ macro KOTLINC_FLAGS(Args...) { SET_APPEND(KOTLINC_OPTS_VALUE $Args) } -# tag:kotlin-specific +# tag:kotlin-specific WITH_KOTLINC_PLUGIN_ALLOPEN= ### @usage: WITH_KOTLINC_ALLOPEN(-flags) ### @@ -4821,7 +4821,7 @@ macro WITH_KOTLINC_ALLOPEN(Options...) { SET(WITH_KOTLINC_PLUGIN_ALLOPEN yes) } -# tag:kotlin-specific +# tag:kotlin-specific WITH_KOTLINC_PLUGIN_NOARG= ### @usage: WITH_KOTLINC_NOARG(-flags) ### @@ -4836,7 +4836,7 @@ KOTLIN_VERSION=1.6.10 KOTLIN_BOM_FILE=${ARCADIA_ROOT}/contrib/java/org/jetbrains/kotlin/kotlin-bom/1.6.10/ya.dependency_management.inc GROOVY_VERSION=3.0.5 -# tag:java-specific +# tag:java-specific DIRECT_DEPS_ONLY_VALUE= ### @usage: DIRECT_DEPS_ONLY ### @@ -4845,7 +4845,7 @@ macro DIRECT_DEPS_ONLY() { SET(DIRECT_DEPS_ONLY_VALUE yes) } -# tag:java-specific +# tag:java-specific JAVA_EXTERNAL_DEPENDENCIES_VALUE= ### @usage: JAVA_EXTERNAL_DEPENDENCIES(file1 file2 ...) ### @@ -4854,7 +4854,7 @@ macro JAVA_EXTERNAL_DEPENDENCIES(Args...) { SET_APPEND(JAVA_EXTERNAL_DEPENDENCIES_VALUE $Args) } -# tag:java-specific +# tag:java-specific ### @usage _JAVA_PLACEHOLDER #internal ### The base module for all Java modules. Defines common properties and dependencies. module _JAVA_PLACEHOLDER: _BASE_UNIT { @@ -4923,10 +4923,10 @@ module _JAVA_PLACEHOLDER: _BASE_UNIT { SET(MODULE_LANG JAVA) } -# tag:java-specific +# tag:java-specific JAVA_CLASSPATH_CMD_TYPE_VALUE= -# tag:java-specific +# tag:java-specific ### @usage:TEST_JAVA_CLASSPATH_CMD_TYPE(Type) ### Availible types: MANIFEST(default), COMMAND_FILE, LIST ### Method for passing a classpath value to a java command line @@ -4937,11 +4937,11 @@ macro TEST_JAVA_CLASSPATH_CMD_TYPE(Type) { SET(JAVA_CLASSPATH_CMD_TYPE_VALUE $Type) } -# tag:java-specific +# tag:java-specific IGNORE_JAVA_DEPENDENCIES_CONFIGURATION=no JAVA_DEPENDENCIES_CONFIGURATION_VALUE= -# tag:java-specific +# tag:java-specific ### @usage JAVA_DEPENDENCIES_CONFIGURATION(Vetos...) ### Validate contrib/java dependencies ### Valid arguments @@ -4955,15 +4955,15 @@ macro JAVA_DEPENDENCIES_CONFIGURATION(Args...) { SET_APPEND(JAVA_DEPENDENCIES_CONFIGURATION_VALUE $Args) } -# tag:java-specific +# tag:java-specific # TODO(DEVTOOLS-6901): remove this variable when there are no more references to it in jbuild JAVA_FORBIDDEN_LIBRARIES_VALUE= -# tag:java-specific +# tag:java-specific JAR_INCLUDE_FILTER_VALUE= JAR_EXCLUDE_FILTER_VALUE= -# tag:java-specific +# tag:java-specific ### @usage:JAR_INCLUDE(Filters...) ### Filter .jar file content: keep only matched files ### * and ** patterns are supported (like JAVA_SRCS) @@ -4971,7 +4971,7 @@ macro JAR_INCLUDE(Filters...) { SET_APPEND(JAR_INCLUDE_FILTER_VALUE $Filters) } -# tag:java-specific +# tag:java-specific ### @usage:JAR_EXCLUDE(Filters...) ### Filter .jar file content: remove matched files ### * and ** patterns are supported (like JAVA_SRCS) @@ -4979,14 +4979,14 @@ macro JAR_EXCLUDE(Filters...) { SET_APPEND(JAR_EXCLUDE_FILTER_VALUE $Filters) } -# tag:sandbox-specific +# tag:sandbox-specific ### @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. +### 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. @@ -5010,13 +5010,13 @@ multimodule SANDBOX_TASK { ASSERT(_OK You are using deprecated Python2-only code (SANDBOX_TASK). Please consider rewriting to 2/3-compatible code.) } - module PY2: PY2_LIBRARY { + module PY2: PY2_LIBRARY { PEERDIR(sandbox/sdk2 sandbox/sandboxsdk) REGISTER_SANDBOX_IMPORT(${MODDIR}) } } -# tag:sandbox-specific +# tag:sandbox-specific multimodule SANDBOX_PY23_TASK { module SB_TASK_BIN: _PY2_PROGRAM { PY_MAIN(sandbox.taskbox.binary) @@ -5047,7 +5047,7 @@ multimodule SANDBOX_PY23_TASK { } } -# tag:sandbox-specific +# tag:sandbox-specific ### @usage: SANDBOX_PY3_TASK([Name]) ### ### Multimodule describing Sandbox task (Python3 code that can be executed by Sandbox system). @@ -5076,7 +5076,7 @@ multimodule SANDBOX_PY3_TASK { } } -# tag:python-specific tag:internal +# tag:python-specific tag:internal NO_PYTHON_INCLS=no ### @usage: NO_PYTHON_INCLUDES() # internal ### @@ -5086,34 +5086,34 @@ macro NO_PYTHON_INCLUDES() { ENABLE(NO_PYTHON_INCLS) } -# tag:python-specific -### @usage: PYTHON2_ADDINCL() +# 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: -### - In PY2MODULE since it compiles into .so and uses external Python runtime; +### - 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 all other cases use USE_PYTHON2 macro instead. +### 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. +### 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 -macro PYTHON2_ADDINCL() { +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) } -# tag:python-specific tag:internal +# tag:python-specific tag: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. +### 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) } -# tag:python-specific tag:internal +# 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() { @@ -5133,12 +5133,12 @@ macro _PYTHON_ADDINCL() { } } -# tag:python-specific +# 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: -### - In PY2MODULE since it compiles into .so and uses external Python runtime; +### - 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. ### @@ -5151,7 +5151,7 @@ macro PYTHON3_ADDINCL() { SET(PEERDIR_TAGS CPP_PROTO CPP_FBS PY3_NATIVE YQL_UDF_STATIC __EMPTY__ DLL_LIB) } -# tag:python-specific tag:internal +# 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. @@ -5162,7 +5162,7 @@ macro _ARCADIA_PYTHON3_ADDINCL() { 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 +# tag:python-specific tag:internal ### @usage: _PYTHON_ADDINCL() # internal ### ### This macro sets up Python 3.x headers for both Arcadia and non-Arcadia python. @@ -5183,34 +5183,34 @@ macro _PYTHON3_ADDINCL() { } } -# tag:python-specific -### @usage: USE_PYTHON2() +# 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. ### -### 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 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. ### -### @see: [PY2_LIBRARY](#module_PY2_LIBRARY), [PY3_LIBRARY](#module_PY3_LIBRARY), [PY23_LIBRARY](#multimodule_PY23_LIBRARY) -macro USE_PYTHON2() { +### @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) } -# tag:python-specific +# 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. -### 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 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. ### -### @see: [PY2_LIBRARY](#module_PY2_LIBRARY), [PY3_LIBRARY](#module_PY3_LIBRARY), [PY23_LIBRARY](#multimodule_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) @@ -5221,21 +5221,21 @@ macro USE_PYTHON3() { } } -# tag:python-specific +# tag:python-specific when ($PERL_DEFAULT_PEERDIR == "yes") { when (($PERLXS == "yes") || ($PERLXSCPP == "yes") || ($USE_PERL == "yes")) { PEERDIR+=build/platform/perl } } -# tag:perl-specific +# tag:perl-specific ### @usage: USE_PERL_LIB() ### Add dependency on Perl to your LIBRARY macro USE_PERL_LIB() { PEERDIR(build/platform/perl) } -# tag:perl-specific +# tag:perl-specific ### @usage: USE_PERL_514_LIB() ### Add dependency on Perl 5.14 to your LIBRARY macro USE_PERL_514_LIB() { @@ -5244,7 +5244,7 @@ macro USE_PERL_514_LIB() { PEERDIR(build/platform/perl/5.14) } -# tag:perl-specific +# tag:perl-specific ### @usage: ADD_PERL_MODULE(Dir ModuleName) ### Add dependency on specified Perl module to the library macro ADD_PERL_MODULE(Dir, Module) { @@ -5252,7 +5252,7 @@ macro ADD_PERL_MODULE(Dir, Module) { SET_APPEND(modules $Module) } -# tag:allocator +# tag:allocator ### @usage: ALLOCATOR(Alloc) # Default: LF ### ### Set memory allocator implementation for the PROGRAM()/DLL() module. @@ -5421,8 +5421,8 @@ macro ADD_COMPILABLE_TRANSLIT(TranslitTable, NGrams, Name, Options...) { RUN_PROGRAM(dict/tools/make_ngrams -i ${NGrams} ${Options} ${__translitname_lower} IN ${NGrams} STDOUT ${__ngrams_table}) } - -# tag:python-specific tag:proto tag:deprecated + +# tag:python-specific tag:proto tag:deprecated ### @usage GENERATE_PY_PROTOS(ProtoFiles...) # deprecated ### ### Generate python bindings for protobuf files. @@ -5433,14 +5433,14 @@ macro GENERATE_PY_PROTOS(FILES...) { } } -# tag:python-specific tag:proto +# tag:python-specific tag:proto macro _GENERATE_PY_PROTOS_INTERNAL(FILES...) { foreach (FILE : $FILES) { _PY_PROTO_CMD_INTERNAL($FILE) } } -# tag:python-specific +# tag:python-specific macro _GENERATE_PY_EVS_INTERNAL(FILES...) { foreach (FILE : $FILES) { _PY_EVLOG_CMD_INTERNAL($FILE) @@ -5491,7 +5491,7 @@ macro TIMEOUT(Time) { } SBR_UID_EXT="" -# tag:test +# tag:test ### @usage: VALIDATE_DATA_RESTART(ext) ### ### Change uid for resource validation tests. May be useful when sandbox resource ttl is changed, but test status is cached in CI. @@ -5504,13 +5504,13 @@ macro VALIDATE_DATA_RESTART(Ext) { TEST_FORK_MODE=none TEST_PARTITION=SEQUENTIAL -# tag:test +# tag:test ### @usage: FORK_TESTS() ### ### 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. +### Allows to run tests in parallel. Supported in UNITTEST, JTEST/JUNIT5 and PY2TEST/PY3TEST modules. ### ### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/ macro FORK_TESTS(MODE...) { @@ -5518,13 +5518,13 @@ macro FORK_TESTS(MODE...) { SET(TEST_PARTITION $MODE) } -# tag:test +# tag:test ### @usage: FORK_SUBTESTS() ### ### Splits the test run in chunks on subtests. ### 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. +### Allows to run tests in parallel. Supported in UNITTEST, JTEST/JUNIT5 and PY2TEST/PY3TEST modules. ### ### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/ macro FORK_SUBTESTS(MODE...) { @@ -5532,7 +5532,7 @@ macro FORK_SUBTESTS(MODE...) { SET(TEST_PARTITION $MODE) } -# tag:test +# 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(). @@ -5545,11 +5545,11 @@ macro SPLIT_FACTOR(Factor) { SET(TEST_SPLIT_FACTOR $Factor) } -# tag:test +# tag:test FORK_TEST_FILES_MODE= ### @usage: FORK_TEST_FILES() ### -### Only for PY2TEST and PY3TEST: splits a file executable with the tests on chunks in the files listed in TEST_SRCS +### Only for PY2TEST and PY3TEST: splits a file executable with the tests on chunks in the files listed in TEST_SRCS ### Compatible with FORK_(SUB)TESTS. ### ### Documentation about the system test: https://wiki.yandex-team.ru/yatool/test/ @@ -5557,7 +5557,7 @@ macro FORK_TEST_FILES() { SET(FORK_TEST_FILES_MODE on) } -# tag:test +# tag:test TEST_SIZE_NAME=SMALL ### @usage: SIZE(SMALL/MEDIUM/LARGE) ### @@ -5600,7 +5600,7 @@ macro FLAT_JOIN_SRCS_GLOBAL(Out, Src...) { SRCS(GLOBAL $Out) } -# tag:cpu +# tag:cpu PIC_CFLAGS= SSE2_CFLAGS= SSE3_CFLAGS= @@ -5614,13 +5614,13 @@ AVX_CFLAGS= AVX2_CFLAGS= AVX512_CFLAGS= -# tag:cpu +# tag:cpu SSE_DEFINES= SSE_CFLAGS= SSE4_DEFINES= SSE4_CFLAGS= -# tag:cpu +# tag:cpu when (($ARCH_X86_64 || $ARCH_I386) && $DISABLE_INSTRUCTION_SETS != "yes") { when ($CLANG || $CLANG_CL || $GCC) { PIC_CFLAGS=-fPIC @@ -5678,12 +5678,12 @@ otherwise { CPU_CHECK=no } -# tag:cpu +# tag:cpu when ($NOSSE == "yes") { USE_SSE4=no } -# tag:cpu +# tag:cpu ### @usage: NO_SSE4() ### ### Compile module without SSE4 @@ -5691,7 +5691,7 @@ macro NO_SSE4() { SET(USE_SSE4 no) } -# tag:cpu +# tag:cpu ### @usage: NO_CPU_CHECK() ### ### Compile module without startup CPU features check @@ -5722,7 +5722,7 @@ macro SET_COMPILE_OUTPUTS_MODIFIERS(NOREL?";norel":"") { _EMPTY_CMD= -# tag:src-processing tag:internal +# tag:src-processing tag:internal ### @usage: _SRC(Ext Src Flags) # internal ### ### Basic building block of extension-based command dispatching @@ -5733,127 +5733,127 @@ macro _SRC(EXT, SRC, SRCFLAGS...) { # Generic macro definition for _SRC (just a placeholder, it does nothing) } -# tag:src-processing +# tag:src-processing macro _SRC("S", SRC, SRCFLAGS...) { .CMD=$C_COMPILER $C_FLAGS_PLATFORM $CFLAGS $SFLAGS $SRCFLAGS -c -o ${output:SRC.o} ${input:SRC} ${pre=-I:_C__INCLUDE} .SEM=add_asm_source ${input:SRC} ${output;hide;suf=.o:SRC} } -# tag:src-processing +# tag:src-processing macro _SRC("s", SRC, SRCFLAGS...) { .CMD=$_SRC(S, $SRC $SRCFLAGS) } -# tag:src-processing +# tag:src-processing macro _SRC("s79", SRC, SRCFLAGS...) { .CMD=$_SRC(S, $SRC $SRCFLAGS -x assembler-with-cpp) } -# tag:src-processing +# 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 } -# tag:src-processing +# tag:src-processing macro _SRC("fml", SRC, SRCFLAGS...) { .CMD=$FML_TOOL $CHECKFLAG -b -o ${output:SRC.inc} -T ${input:SRC} ${SRCFLAGS} ${kv;hide:"p FM"} ${kv;hide:"pc yellow"} } -# tag:src-processing +# tag:src-processing macro _SRC("fml2", SRC, SRCFLAGS...) { .CMD=$FML_TOOL $CHECKFLAG -b -o ${output;nopath;noext:SRC.fml.inc} -2 -O ${output;nopath;noext:SRC.fml.cpp} -T ${input:SRC} ${SRCFLAGS} ${kv;hide:"p FM"} ${kv;hide:"pc yellow"} } -# tag:src-processing +# tag:src-processing macro _SRC("fml3", SRC, SRCFLAGS...) { .CMD=$FML_TOOL $CHECKFLAG -b -o ${output;nopath;noext:SRC.fml.inc} -3 -O ${output;nopath;noext:SRC.fml.cpp} -L ${input;nopath;noext:SRC.list} -P ${nopath;noext:SRC} -T ${input:SRC} ${SRCFLAGS} ${kv;hide:"p FM"} ${kv;hide:"pc yellow"} } -# tag:src-processing +# tag:src-processing macro _SRC("sfdl", SRC, SRCFLAGS...) { .CMD=$CXX_COMPILER $C_FLAGS_PLATFORM $CXXFLAGS $SFDL_FLAG ${SRCFLAGS} ${input:SRC} && ${tool:"tools/calcstaticopt"} -i ${tmp:SRC.tmp} -a $ARCADIA_ROOT ${output;stdout;nopath;noext;defext=.inc:SRC} ${kv;hide:"p SF"} ${kv;hide:"pc yellow"} $TOOLCHAIN_ENV } -# tag:src-processing +# tag:src-processing macro _SRC("xs", SRC, SRCFLAGS...) { .CMD=$PERL_LD_LIBRARY_PATH $PERL $PERL_INCLUDE ${suf=/ExtUtils/xsubpp:PERL_PRIVLIB} -typemap ${suf=/ExtUtils/typemap:PERL_PRIVLIB} $PERLSUFFIX $XSUBPPFLAGS ${SRCFLAGS} ${input:SRC} $PERLOUTPUT ${kv;hide:"p XS"} ${kv;hide:"pc yellow"} } -# tag:src-processing +# tag:src-processing macro _SRC("y", SRC, SRCFLAGS...) { # .CMD=${tool:"contrib/tools/byacc"} $BYACC_FLAGS ${nopath;noext;output:SRC.cpp} ${input:SRC} ${nopath;noext;hide;output;addincl:SRC.h} ${kv;hide:"p YC"} ${kv;hide:"pc light-green"} .CMD=${tool:"contrib/tools/bison/bison"} $BISON_FLAGS --m4=${tool:"contrib/tools/bison/m4"} -d -o ${nopath;noext;output;main;hide:SRC.h} ${nopath;noext;output:SRC.cpp} ${input:SRC} ${SRCFLAGS} && $YMAKE_PYTHON ${input:"build/scripts/preprocess.py"} $_ADD_HIDDEN_INPUTS($CPP_BISON_SKELS) ${nopath;noext;output;addincl:SRC.h} ${kv;hide:"p YC"} ${kv;hide:"pc light-green"} } -# tag:src-processing +# tag:src-processing macro _SRC("ypp", SRC, SRCFLAGS...) { .CMD=$_SRC(y $SRC $SRCFLAGS) } -# tag:src-processing +# tag:src-processing macro _SRC("gperf", SRC, SRCFLAGS...) { .CMD=$RUN_NO_SANITIZE ${tool:"contrib/tools/gperf"} $GP_FLAGS ${SRCFLAGS} ${pre=-Nin_;suf=_set;nopath;noallext:SRC} ${input:SRC} ${output;stdout;nopath;noext;defext=.gperf.cpp:SRC} ${kv;hide:"p GP"} ${kv;hide:"pc yellow"} } -# tag:src-processing +# tag:src-processing macro _SRC("rl", SRC, SRCFLAGS...) { .CMD=$RUN_NO_SANITIZE ${tool:"contrib/tools/ragel5/ragel"} $RAGEL_FLAGS ${SRCFLAGS} -o ${tmp:SRC.tmp} ${input:SRC} && $RUN_NO_SANITIZE ${tool:"contrib/tools/ragel5/rlgen-cd"} $RLGEN_FLAGS -o ${output;nopath;noext;defext=.rl5.cpp:SRC} ${tmp:SRC.tmp} ${kv;hide:"p R5"} ${kv;hide:"pc yellow"} } -# tag:src-processing +# tag:src-processing macro _SRC("rl5", SRC, SRCFLAGS...) { .CMD=$_SRC(rl $SRC $SRCFLAGS) } -# tag:src-processing +# tag:src-processing macro _SRC("asp", SRC, SRCFLAGS...) { .CMD=$RUN_NO_SANITIZE ${tool:"tools/html2cpp"} ${input:SRC} ${output:SRC.cpp} ${kv;hide:"p HT"} ${kv;hide:"pc yellow"} } -# tag:src-processing +# tag:src-processing macro _SRC("rl6", SRC, SRCFLAGS...) { .CMD=$RUN_NO_SANITIZE ${tool:"contrib/tools/ragel6"} $RAGEL6_FLAGS ${SRCFLAGS} -L -I${ARCADIA_ROOT} -o ${output;nopath;noext;defext=.rl6.cpp:SRC} ${input:SRC} ${kv;hide:"p R6"} ${kv;hide:"pc yellow"} .SEM=target_ragel_lexers PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} $RAGEL6_FLAGS ${SRCFLAGS} && set_global_flags RAGEL_FLAGS -L -I $S/ && conan_require ragel/6.10 && conan_import '"bin, ragel* -> ./bin"' && modules_required yandex_common.cmake } -# tag:src-processing +# tag:src-processing macro _SRC("l", SRC, SRCFLAGS...) { .CMD=${tool:"contrib/tools/flex-old"} $LEX_FLAGS ${SRCFLAGS} -o${output:SRC.cpp} ${output_include;hide:"util/system/compiler.h"} ${input:SRC} ${kv;hide:"p LX"} ${kv;hide:"pc yellow"} .ADDINCL=contrib/tools/flex-old } -# tag:src-processing +# tag:src-processing macro _SRC("lex", SRC, SRCFLAGS...) { .CMD=$_SRC(l $SRC $SRCFLAGS) } -# tag:src-processing +# tag:src-processing macro _SRC("lpp", SRC, SRCFLAGS...) { .CMD=$_SRC(l $SRC $SRCFLAGS) } -# tag:src-processing +# tag:src-processing macro _SRC("pln", SRC, SRCFLAGS...) { .CMD=$FML_TOOL -b -o ${output;pre=pln.;nopath;noext:SRC.cpp} -f ${input:SRC} ${SRCFLAGS} ${kv;hide:"p FM"} ${kv;hide:"pc yellow"} } -# tag:src-processing +# tag:src-processing macro _SRC("xsyn", SRC, SRCFLAGS...) { .CMD=$YMAKE_PYTHON ${input:"library/cpp/xml/parslib/xsyn2ragel.py"} ${input:SRC} ${input:"library/cpp/xml/parslib/xmlpars.xh"} dontuse ${output;stdout:SRC.h.rl5} ${kv;hide:"p XN"} ${kv;hide:"pc yellow"} } -# tag:src-processing +# tag:src-processing macro _SRC("ev", SRC, SRCFLAGS...) { .CMD=$EVLOG_CMD($SRC) } -# tag:src-processing +# tag:src-processing macro _SRC("proto", SRC, SRCFLAGS...) { .CMD=$PROTO_CMD($SRC) .SEM=$PROTO_CMD($SRC) } -# tag:src-processing +# 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. # descriptor.proto must be resolved as google/protobuf/descriptor.proto @@ -5861,128 +5861,128 @@ macro _SRC("gztproto", SRC, SRCFLAGS...) { .PEERDIR=kernel/gazetteer/proto } -# tag:src-processing +# tag:src-processing macro _SRC("cfgproto", SRC, SRCFLAGS...) { .CMD=$_CPP_CFGPROTO_CMD($SRC) } -# tag:src-processing +# tag:src-processing macro _SRC("pyx", SRC, SRCFLAGS...) { # Copy-paste from BUILDWITH_CYTHON .CMD=$RUN_CYTHON_SCRIPT $CYTHON_OPTIONS --cplus ${CYTHON_CPP_OUTPUT_INCLUDES} ${pre=-I:_CYTHON__INCLUDE} ${input:SRC} -o ${output;tobindir:SRC.cpp} $CYTHON_OUTPUT_INCLUDES ${SRCFLAGS} ${requirements;hide:PY_REQUIREMENTS} ${kv;hide:"p CY"} ${kv;hide:"pc yellow"} .ADDINCL=FOR cython contrib/tools/cython/Cython/Includes } -# tag:src-processing +# tag:src-processing macro _SRC("in", SRC, SRCFLAGS...) { .CMD=$CONFIGURE_FILE(${SRC} ${nopath;noext:SRC}) } -# tag:src-processing +# tag:src-processing macro _SRC("sc", SRC, SRCFLAGS...) { .CMD=${tool:"tools/domschemec"} --in ${input:SRC} --out ${output;norel:SRC.h} ${output_include;hide:"util/generic/strbuf.h"} ${output_include;hide:"util/generic/string.h"} ${output_include;hide:"util/generic/vector.h"} ${output_include;hide:"util/string/cast.h"} ${SRCFLAGS} ${kv;hide:"p SC"} ${kv;hide:"pc yellow"} } -# tag:src-processing +# tag:src-processing macro _SRC("ssqls", SRC, SRCFLAGS...) { .CMD=${tool:"metrika/core/tools/ssqls"} ${input;notransformbuilddir:SRC} -S $ARCADIA_ROOT -B $ARCADIA_BUILD_ROOT $SRCFLAGS ${output;noext;hide:SRC.cpp} ${output;noext;hide:SRC.h} ${kv;hide:"p SS"} ${kv;hide:"pc yellow"} } -# tag:src-processing +# 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"} .PEERDIR=contrib/libs/libf2c .ADDINCL=contrib/libs/libf2c } -# tag:src-processing +# tag:src-processing macro _SRC("cpp", SRC, SRCFLAGS...) { .CMD=$_SRC_cpp($SRC $SRCFLAGS) .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} } -# tag:src-processing +# tag:src-processing macro _SRC("cxx", SRC, SRCFLAGS...) { .CMD=$_SRC(cpp $SRC $SRCFLAGS) } -# tag:src-processing +# tag:src-processing macro _SRC("cc", SRC, SRCFLAGS...) { .CMD=$_SRC(cpp $SRC $SRCFLAGS) .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} } -# tag:src-processing +# tag:src-processing macro _SRC("C", SRC, SRCFLAGS...) { .CMD=$_SRC(cpp $SRC $SRCFLAGS) } -# tag:src-processing +# tag:src-processing macro _SRC("c", SRC, SRCFLAGS...) { .CMD=$_SRC_c($SRC $SRCFLAGS) .SEM=target_sources PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} } -# tag:src-processing +# tag:src-processing macro _SRC("m", SRC, SRCFLAGS...) { .CMD=$_SRC(c $SRC $SRCFLAGS) } -# tag:src-processing +# tag:src-processing macro _SRC("masm", SRC, SRCFLAGS...) { .CMD=$_SRC_masm($SRC $SRCFLAGS) } -# tag:src-processing +# tag:src-processing macro _SRC("yasm", SRC, SRCFLAGS...) { .CMD=$_SRC_yasm($SRC $SRCFLAGS PREINCLUDES $YASM_PREINCLUDES_VALUE) .SEM=target_yasm_source PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS ${pre=-P :PREINCLUDES} && set_global_flags YASM_FLAGS -f ${_YASM_FMT_VALUE}${HARDWARE_ARCH} $_YASM_PLATFORM_FLAGS_VALUE -D ${pre=_;suf=_:HARDWARE_TYPE} -D_YASM_ $ASM_PREFIX_VALUE $_YASM_PREDEFINED_FLAGS_VALUE && conan_require yasm/1.3.0 && conan_import '"bin, *yasm* -> ./bin"' && conan_import '"bin, ytasm* -> ./bin"' && modules_required yandex_common.cmake } -# tag:src-processing +# tag:src-processing macro _SRC("asm", SRC, SRCFLAGS...) { .CMD=$_SRC(yasm $SRC $SRCFLAGS) .SEM=target_yasm_source PRIVATE ${input:SRC} ${output;hide;suf=.o:SRC} $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS && set_global_flags YASM_FLAGS -f ${_YASM_FMT_VALUE}${HARDWARE_ARCH} $_YASM_PLATFORM_FLAGS_VALUE -D ${pre=_;suf=_:HARDWARE_TYPE} -D_YASM_ $ASM_PREFIX_VALUE $_YASM_PREDEFINED_FLAGS_VALUE && conan_require yasm/1.3.0 && conan_import '"bin, *yasm* -> ./bin"' && conan_import '"bin, ytasm* -> ./bin"' && modules_required yandex_common.cmake } -# tag:src-processing +# 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 } -# tag:src-processing +# tag:src-processing macro _SRC("cu", SRC, SRCFLAGS...) { .CMD=$_SRC_CU_CMD .PEERDIR=$_SRC_CU_PEERDIR } -# tag:src-processing +# tag:src-processing macro _SRC("fbs", SRC, SRCFLAGS...) { .CMD=$FBS_CMD($SRC, $SRCFLAGS) } -# tag:src-processing +# tag:src-processing macro _SRC("fbs64", SRC, SRCFLAGS...) { .CMD=$_CPP_FLATC64_CMD($SRC, $SRCFLAGS) } -# tag:src-processing +# tag:src-processing macro _SRC("pysrc", SRC, SRCFLAGS...) { .CMD=$_SRC_PYSRC($SRC, $SRCFLAGS) } -# tag:src-processing +# 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"} } -# tag:src-processing +# tag:src-processing macro _SRC_py3src(SRC, SRCFLAGS...) { .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/compile_pysrc.py"} --input ${input:SRC} --output ${output;noext;suf=.py3_raw.cpp:SRC} --rescompiler ${tool:"tools/rescompiler"} py3 --pycc ${tool:"contrib/tools/python3/pycc"} ${kv;hide:"p P3"} ${kv;hide:"pc light-green"} } -# tag:src-processing python-specific +# tag:src-processing python-specific when ($PYTHON3 == "yes") { MACRO_ALIAS(_SRC_PYSRC _SRC_py3src) } @@ -5990,7 +5990,7 @@ otherwise { MACRO_ALIAS(_SRC_PYSRC _SRC_py2src) } -# tag:src-processing +# tag:src-processing macro _SRC_c_nodeps(SRC, OUTFILE, INC...) { .CMD=$_SRC_C_NODEPS_CMD } @@ -6011,7 +6011,7 @@ _LANG_CFLAGS_FILTER=\ ${pre=-Wno-implicit-fallthrough SKIP ;ext=.rl6:SRC} \ ${pre=-Wno-implicit-fallthrough SKIP ;ext=.pyx:SRC} -# tag:src-processing +# tag:src-processing # Magic macro for removing file name from result (file name is passed as unused SKIP parameter) macro _FILTER_EXTS(SKIP="", FLAGS...) { .CMD=$FLAGS @@ -6035,22 +6035,22 @@ macro _SRC_cpp(SRC, COMPILE_OUT_SUFFIX="", SRCFLAGS...) { .CMD=$_SRC_CPP_CMD } -# tag:src-processing +# tag:src-processing macro _SRC_c(SRC, COMPILE_OUT_SUFFIX="", SRCFLAGS...) { .CMD=$_SRC_C_CMD } -# tag:src-processing +# tag:src-processing macro _SRC_m(SRC, SRCFLAGS...) { .CMD=$_SRC_M_CMD } -# tag:src-processing +# tag:src-processing macro _SRC_masm(SRC, SRCFLAGS...) { .CMD=$_SRC_MASM_CMD } -# tag:lua-specific +# tag:lua-specific ### @usage: COMPILE_LUA(Src, [NAME <import_name>]) ### ### Compile LUA source file to object code using LUA 2.0 @@ -6059,7 +6059,7 @@ macro COMPILE_LUA(Src, NAME="") { .CMD=$_SRC(lua, $Src, ${pre=-n :NAME}) } -# tag:lua-specific +# tag:lua-specific ### @usage: _SRC_lua_21(SRC [SRCFLAGS...]) # internal ### ### Compile LUA source file to object code using LUA 2.1 @@ -6068,7 +6068,7 @@ macro _SRC_lua_21(SRC, SRCFLAGS...) { .PEERDIR=$LUAJIT_21_PATH } -# tag:lua-specific +# tag:lua-specific ### @usage: COMPILE_LUA_21(Src, [NAME <import_name>]) ### ### Compile LUA source file to object code using LUA 2.1 @@ -6086,22 +6086,22 @@ otherwise { _MO_OUTPUT=${output;noauto;nopath;noext;tobindir:SRC.mo} } -# tag:src-processing +# tag:src-processing macro _SRC("po", SRC, SRCFLAGS...) { .CMD=$YMAKE_PYTHON ${input:"contrib/tools/python/src/Tools/i18n/msgfmt.py"} -o $_MO_OUTPUT ${input:SRC} } -# tag:ydl-specific +# tag:ydl-specific YDL_FLAGS= --force-color -I ${ARCADIA_ROOT} YDL_DESC_FLAGS= -# tag:src-processing tag:ydl-specific +# tag:src-processing tag:ydl-specific macro _SRC("ydl", SRC, SRCFLAGS...) { .CMD=${tool:"statbox/ydl/compiler/tooling/ydl/bin"} c $YDL_FLAGS --cpp-output-header ${output;suf=.h:SRC} --cpp-output-source ${output;suf=.cpp:SRC} ${input:SRC} ${output_include;hide:"statbox/ydl/runtime/cpp/gen_support/standard_includes.h"} ${kv;hide:"p YDL"} ${kv;hide:"pc yellow"} .PEERDIR+=statbox/ydl/runtime/cpp } -# tag:ydl-specific +# tag:ydl-specific ### @usage BUILD_YDL_DESC(Input Symbol Output) ### ### Generate a descriptor for a Symbol located in a ydl module Input, and put it to the file Output. @@ -6117,7 +6117,7 @@ macro BUILD_YDL_DESC(Input, Symbol, Output) { .CMD=${tool:"statbox/ydl/compiler/tooling/ydl/bin"} ti $YDL_FLAGS $YDL_DESC_FLAGS -o ${output;noauto:Output} ${input:Input} ${Symbol} ${kv;hide:"p YDL"} ${kv;hide:"pc yellow"} } -# tag:ydl-specific +# tag:ydl-specific ### @usage: YDL_DESC_USE_BINARY() ### ### Used in conjunction with BUILD_YDL_DESC. When enabled, all generated descriptors are binary. @@ -6164,112 +6164,112 @@ macro SRCS(FILES...) { } } -# tag:cpu tag:src-processing +# tag:cpu tag:src-processing ### @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 +# tag:cpu tag:src-processing ### @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 +# tag:cpu tag:src-processing ### @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 +# tag:cpu tag:src-processing ### @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 +# 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...) { _SRC(c $FILE $SSE4_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse4) } -# tag:cpu tag:src-processing +# tag:cpu tag:src-processing ### @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 +# tag:cpu tag:src-processing ### @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) } -# tag:cpu tag:src-processing +# tag:cpu tag:src-processing ### @usage SRC_CPP_PIC(File Flags...) ### Compile single .c-file with -fPIC and extra Flags. macro SRC_CPP_PIC(FILE, FLAGS...) { _SRC(cpp $FILE $PIC_CFLAGS $FLAGS) } -# tag:cpu tag:src-processing +# tag:cpu tag:src-processing ### @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 +# tag:cpu tag:src-processing ### @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 +# tag:cpu tag:src-processing ### @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 +# tag:cpu tag:src-processing ### @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 +# 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...) { _SRC(cpp $FILE $SSE4_CFLAGS $FLAGS COMPILE_OUT_SUFFIX .sse4) } -# tag:cpu tag:src-processing +# tag:cpu tag:src-processing ### @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 +# tag:cpu tag:src-processing ### @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 +# tag:python-processing tag:cython # TODO: use it in [.pyx] cmd ### @usage: BUILDWITH_CYTHON_CPP(Src Options...) ### @@ -6279,7 +6279,7 @@ macro BUILDWITH_CYTHON_CPP(Src, Options...) { ADDINCL(FOR cython contrib/tools/cython/Cython/Includes) } -# tag:python-processing tag:cython tag:internal +# 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. @@ -6289,7 +6289,7 @@ macro _BUILDWITH_CYTHON_CPP_DEP(Src, Dep, Options...) { ADDINCL(FOR cython contrib/tools/cython/Cython/Includes) } -# tag:python-processing tag:cython +# tag:python-processing tag:cython ### @usage: BUILDWITH_CYTHON_C(Src Options...) ### ### Generates .c file from .pyx. @@ -6298,7 +6298,7 @@ macro BUILDWITH_CYTHON_C(Src, Options...) { ADDINCL(FOR cython contrib/tools/cython/Cython/Includes) } -# tag:python-processing tag:cython tag:internal +# 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. @@ -6308,7 +6308,7 @@ macro _BUILDWITH_CYTHON_C_DEP(Src, Dep, Options...) { ADDINCL(FOR cython contrib/tools/cython/Cython/Includes) } -# tag:python-processing tag:cython tag:internal +# tag:python-processing tag:cython tag:internal ### @usage: _BUILDWITH_CYTHON_C_H(Src Dep Options...) # internal ### ### BUILDWITH_CYTHON_C without .pyx infix and with cdef public .h file. @@ -6317,7 +6317,7 @@ macro _BUILDWITH_CYTHON_C_H(Src, Dep, Options...) { ADDINCL(FOR cython contrib/tools/cython/Cython/Includes) } -# tag:python-processing tag:cython tag:internal +# tag:python-processing tag:cython tag:internal ### @usage: _BUILDWITH_CYTHON_C_API_H(Src Dep Options...) # internal ### ### BUILDWITH_CYTHON_C_H with cdef api _api.h file. @@ -6326,7 +6326,7 @@ macro _BUILDWITH_CYTHON_C_API_H(Src, Dep, Options...) { ADDINCL(FOR cython contrib/tools/cython/Cython/Includes) } -# tag:python-processing tag:internal +# tag:python-processing tag:internal ### @usage: _SWIG_PYTHON_CPP(Src, DstSubPrefix) # internal ### ### Run swig on Src to produce DstSubPrefix.py and DstSubPrefix_swg.cpp that @@ -6336,7 +6336,7 @@ macro _SWIG_PYTHON_CPP(Src, DstSubPrefix) { ADDINCL(FOR swig $_SWIG_LIBRARY/python FOR swig $_SWIG_LIBRARY) } -# tag:python-processing tag:internal +# tag:python-processing tag:internal ### @usage: _SWIG_PYTHON_C(Src, DstSubPrefix) # internal ### ### Like _SWIG_PYTHON_CPP but generate DstSubPrefix_swg.c. @@ -6352,7 +6352,7 @@ 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 +# tag:python-processing tag:internal # TODO: use it in [.pyx] cmd ### @usage: _PY_REGISTER() # internal ### @@ -6364,7 +6364,7 @@ macro _PY_REGISTER(Func) { SRCS(GLOBAL $Func.reg.cpp) } -# tag:python-processing tag:internal +# 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 @@ -6375,17 +6375,17 @@ macro _PY3_REGISTER(Func) { SRCS(GLOBAL $Func.reg3.cpp) } -# tag:python-processing tag:internal +# tag:python-processing tag:internal ### @usage: _PY_COMPILE_BYTECODE(SrcX Src) # internal ### -### Compile Python 2.x .py source file into Arcadia binary form suitable for PY2_PROGRAM +### 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"} } -# tag:python-processing tag:internal +# 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 @@ -6404,12 +6404,12 @@ 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 +# tag:yweb-specific macro PIRE_INLINE_CMD(SRC) { .CMD=${tool:"library/cpp/regex/pire/inline"} -o ${output:SRC} ${input:SRC} ${output_include;hide:SRC} ${kv;hide:"p PI"} ${kv;hide:"pc yellow"} } -# tag:yweb-specific +# tag:yweb-specific macro PIRE_INLINE(FILES...) { foreach (FILE : $FILES) { PIRE_INLINE_CMD($FILE) @@ -6483,7 +6483,7 @@ macro DECIMAL_MD5_LOWER_32_BITS(File, FUNCNAME="", Opts...) { .CMD=$YMAKE_PYTHON ${input:DECIMAL_MD5_SCRIPT} --fixed-output=${DECIMAL_MD5_FIXED} --func-name=${FUNCNAME} --lower-bits 32 --source-root=$ARCADIA_ROOT ${input;context=TEXT:Opts} ${output;stdout;chksum:File} ${kv;hide:"p SV"} ${kv;hide:"pc yellow"} ${hide;kv:"show_out"} } -# tag:internal +# tag:internal ### @usage $CFG_VARS # internal ### ### Mark commands that embed Configuration variables into files @@ -6508,7 +6508,7 @@ 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 +# tag: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. @@ -6538,7 +6538,7 @@ 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 +# tag:flags ### @usage: LDFLAGS(LinkerFlags...) ### ### Add flags to the link command line of executable or shared library/dll. @@ -6548,7 +6548,7 @@ macro LDFLAGS(Flags...) { SET_APPEND(LDFLAGS_GLOBAL $Flags) } -# tag:flags +# tag:flags ### @usage: CFLAGS([GLOBAL compiler_flag]* compiler_flags) ### ### Add the specified flags to the compilation command of C and C++ files. @@ -6558,14 +6558,14 @@ macro CFLAGS(Flags...) { SET_APPEND_WITH_GLOBAL(USER_CFLAGS $Flags) } -# tag:flags +# tag:flags ### @usage: MASMFLAGS(compiler flags) ### Add the specified flags to the compilation command of .masm files. macro MASMFLAGS(Flags...) { SET_APPEND(MASMFLAGS $Flags) } -# tag:flags +# tag:flags ### @usage: CONLYFLAGS([GLOBAL compiler_flag]* compiler_flags) ### Add the specified flags to the compilation command of .c (but not .cpp) files. ### @params: GLOBAL - Distributes these flags on dependent projects @@ -6573,21 +6573,21 @@ macro CONLYFLAGS(Flags...) { SET_APPEND_WITH_GLOBAL(USER_CONLYFLAGS $Flags) } -# tag:flags +# tag:flags ### @usage: CXXFLAGS(compiler_flags) ### Add the specified flags to the compilation command of .cpp (but not .c) files. macro CXXFLAGS(Flags...) { SET_APPEND_WITH_GLOBAL(USER_CXXFLAGS $Flags) } -# tag:flags +# tag:flags ### @usage: CUDA_NVCC_FLAGS(compiler flags) ### Add the specified flags to the compile line .cu-files. macro CUDA_NVCC_FLAGS(Flags...) { SET_APPEND(CUDA_NVCC_FLAGS $Flags) } -# tag:flags +# tag:flags ### @usage: NVCC_DEVICE_LINK(file.cu...) ### Run nvcc --device-link on objects compiled from srcs with --device-c. ### This generates a stub object devlink.o that supplies missing pieces for the @@ -6637,7 +6637,7 @@ macro NO_WSHADOW() { ENABLE(NO_WSHADOW) } -# tag:internal +# 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. @@ -6645,7 +6645,7 @@ macro NO_PLATFORM_RESOURCES() { ENABLE(NOPLATFORM_RESOURCES) } -# tag:internal tag:codenav +# 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. @@ -6694,7 +6694,7 @@ macro NO_PLATFORM() { ENABLE(NOPLATFORM) } -# tag:cpp-specific +# tag:cpp-specific ### @usage: USE_CXX() ### ### Add dependency on C++ runtime @@ -6712,21 +6712,21 @@ macro USE_UTIL() { DISABLE(NOUTIL) } -# tag:deprecated +# tag:deprecated ### @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 +# 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) } -# tag:sanitize +# tag:sanitize ### @usage: NO_SANITIZE() ### ### Disable all sanitizers for the module. @@ -6734,7 +6734,7 @@ macro NO_SANITIZE() { DISABLE(SANITIZER_TYPE) } -# tag:coverage tag:sanitize +# tag:coverage tag:sanitize ### @usage: NO_SANITIZE_COVERAGE() ### ### Disable lightweight coverage (-fsanitize-coverage) for the module. @@ -6742,7 +6742,7 @@ macro NO_SANITIZE_COVERAGE() { DISABLE(SANITIZE_COVERAGE) } -# tag:coverage +# tag:coverage ### @usage: NO_CLANG_COVERAGE() ### ### Disable heavyweight clang coverage for the module @@ -6754,7 +6754,7 @@ macro NO_CLANG_TIDY() { DISABLE(TIDY) } -# tag:python-specific tag:coverage +# tag:python-specific tag:coverage ### @usage: NO_PYTHON_COVERAGE() ### ### Disable python coverage for module @@ -6762,7 +6762,7 @@ macro NO_PYTHON_COVERAGE() { DISABLE(PYTHON_COVERAGE) } -# tag:python-specific tag:coverage tag:cython +# tag:python-specific tag:coverage tag:cython ### @usage: NO_CYTHON_COVERAGE() ### ### Disable cython and cythonized python coverage (CYTHONIZE_PY) @@ -6772,13 +6772,13 @@ macro NO_CYTHON_COVERAGE() { NO_CLANG_COVERAGE() } -# tag:lua-specific +# tag:lua-specific LUAJIT_PATH=${ARCADIA_ROOT}/contrib/libs/luajit 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 +# tag:lua-specific LUAJIT_21_PATH=${ARCADIA_ROOT}/contrib/libs/luajit_21 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"} @@ -6836,7 +6836,7 @@ macro DEB_VERSION(File) { BUILD_MN_SCRIPT=build/scripts/build_mn.py -# tag:matrixnet +# tag:matrixnet ### @usage: BUILD_MN([CHECK] [PTR] [MULTI] mninfo mnname) # matrixnet ### ### Generate MatrixNet data and access code using single command. @@ -6861,7 +6861,7 @@ macro _BUILD_MNS_HEADER(NAME="", CHECK?, RANKING_SUFFIX="", Files...) { # TODO: support foreach_in and keywords simultaneous usage (look at BUILD_MNS_FILES) -# tag:matrixnet +# 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. @@ -6908,7 +6908,7 @@ macro NO_NEED_CHECK(Flags...) { ENABLE(UNUSED_MACRO) } -# tag:deprecated +# tag:deprecated ### @usage: NEED_REVIEW() # deprecated ### ### Mark the project as needing review. @@ -6993,7 +6993,7 @@ macro RUN_PROGRAM(Tool, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{t .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 +# 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]) ### ### Run a lua script. @@ -7017,7 +7017,7 @@ macro LUA(ScriptPath, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{too .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 +# 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]) ### ### Run a python script with $(PYTHON)/python built from devtools/huge_python. @@ -7041,7 +7041,7 @@ macro PYTHON(ScriptPath, IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{ .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 +# 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...) { 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"} @@ -7078,7 +7078,7 @@ macro FROM_MDS(Key, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], FILE ADD_CHECK(check.mds $Key) } -# tag:internal +# 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). @@ -7089,12 +7089,12 @@ macro _FROM_EXTERNAL(File, OutFile, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_ #FIXME: add 'ADD_CHECK(check.external $File)' when proper testing is implemented } -### @usage LARGE_FILES([AUTOUPDATED] Files...) +### @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...) { +### 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) } @@ -7114,7 +7114,7 @@ otherwise { C_AS_CXX_FLAGS=-x c++ -std=c++17 } -# tag:cpp-specific +# tag:cpp-specific ### @usage: COMPILE_C_AS_CXX() ### ### Compile .c files as .cpp ones within a module. @@ -7251,7 +7251,7 @@ 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 +# tag:internal ### @usage TOUCH(Outputs...) # internal ### Just introduce outputs macro TOUCH(Outputs...) { @@ -7273,7 +7273,7 @@ macro NO_CHECK_IMPORTS(Masks...) { } -# tag:yasm-specific +# tag:yasm-specific _YASM_FMT_VALUE= _YASM_PLATFORM_FLAGS_VALUE= _YASM_PREDEFINED_FLAGS_VALUE= @@ -7302,11 +7302,11 @@ otherwise { ASM_PREFIX_VALUE= } -# tag:yasm-specific +# tag:yasm-specific YASM_FLAGS= YASM_PREINCLUDES_VALUE= -# tag:yasm-specific +# 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"} } @@ -7318,7 +7318,7 @@ macro ASM_PREINCLUDE(PREINCLUDES...) { SET_APPEND(YASM_PREINCLUDES_VALUE $PREINCLUDES) } -# tag:python-specific +# tag:python-specific ### @usage: RUN_PYTHON(Args...) ### ### Version of RUN() macro to invoke Python scripts @@ -7365,12 +7365,12 @@ macro RUN_ANTLR4_GO(GRAMMAR, OUTPUT_INCLUDES[], LISTENER?"GRAMMAR":"_ANTLR4_EMPT PEERDIR(${GOSTD}/fmt ${GOSTD}/reflect ${GOSTD}/strconv ${GOSTD}/unicode vendor/github.com/antlr/antlr4/runtime/Go/antlr) } -# tag:cpp-specific +# tag:cpp-specific macro CPP_ADDINCL(Dirs...) { ADDINCL($Dirs) } -# tag:internal +# tag:internal _WHOLE_ARCHIVE_PEERS_VALUE= ### @usage: WHOLE_ARCHIVE(dirnames...) # internal macro WHOLE_ARCHIVE(PEERS...) { @@ -7422,7 +7422,7 @@ macro TASKLET_REG_EXT(Name, Lang, Impl, Wrapper, Includes...) { SRCS(GLOBAL $Name.task.cpp) } -# tag:cpp-specific +# tag:cpp-specific _CPP_PROTO_MODULE_PREFIX= _CPP_PROTO_MODULE_SUFFIX= when ($MSVC == "yes" || $CYGWIN == "yes") { @@ -7445,7 +7445,7 @@ macro EXPOSE(Args...) { } -# tag:proto +# 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} } @@ -7515,7 +7515,7 @@ multimodule PROTO_LIBRARY { } } - module PY_PROTO: PY2_LIBRARY { + module PY_PROTO: PY2_LIBRARY { .ALIASES=SRCS=PY_SRCS .ALLOWED=OPTIMIZE_PY_PROTOS NO_OPTIMIZE_PY_PROTOS .PEERDIRSELF=CPP_PROTO @@ -7647,15 +7647,15 @@ multimodule PROTO_LIBRARY { } } -# tag:proto +# tag:proto _EXT_PROTO_DIR=_RAW_ -# tag:proto +# tag:proto ### This var defines the root of the tree for copied proto files from EXT_PROTO ### submodule of PROTO_LIBRARY module EXT_PROTO_ROOT=${ARCADIA_BUILD_ROOT}/${_EXT_PROTO_DIR} -# tag:proto +# tag:proto ### @usage: USE_EXT_PROTO(peerdir_tag...) ### ### Configure module to use proto files from existing PROTO_LIBRARY module. @@ -7666,7 +7666,7 @@ macro USE_EXT_PROTO(EXTRA_TAGS...) { SRCDIR(${EXT_PROTO_ROOT}) } -# tag:proto tag:internal +# tag:proto tag:internal ### @usage: _RAW_PROTO_SRCS(files...) # internal ### ### _RAW_PROTO_SRCS is a proxy macro to FILES macro which filters out @@ -7696,20 +7696,20 @@ module PROTO_REGISTRY: PROTO_DESCRIPTIONS { SET(MODULE_TYPE PROTO_REGISTRY) } -# tag:fbs +# tag:fbs _FBS_NAMESPACE_MAP_GLOBAL= -# tag:fbs +# tag:fbs macro _FBS_NAMESPACE_IMPL(NAMESPACE, PATH, DUMMY...) { SET_APPEND(_FBS_NAMESPACE_MAP_GLOBAL ${NAMESPACE}=${PATH}) } -# tag:fbs +# tag:fbs macro FBS_NAMESPACE(NAMESPACE, PATH...) { _FBS_NAMESPACE_IMPL($NAMESPACE $PATH $MODDIR) } -# tag:fbs +# tag:fbs ### @usage: FBS_LIBRARY() ### ### Build some variant of Flatbuffers library. @@ -7767,13 +7767,13 @@ multimodule FBS_LIBRARY { } } -# tag:java-specific +# 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"} -# tag:java-specific +# tag:java-specific COMPILE_JSRC_MF=$_COMPILE_JSRC && $GENERATE_MF -# tag:java-specific tag:internal +# tag:java-specific tag:internal ### @usage: JSRC_LIBRARY() # internal module JSRC_LIBRARY: _BARE_UNIT { .CMD=COMPILE_JSRC_MF @@ -7792,11 +7792,11 @@ module JSRC_LIBRARY: _BARE_UNIT { NO_RUNTIME() } -# tag:maps-specific -@import "${CONF_ROOT}/conf/project_specific/maps/asrc.conf" +# tag:maps-specific +@import "${CONF_ROOT}/conf/project_specific/maps/asrc.conf" -# tag:internal -### @usage: _PROXY_LIBRARY() # internal +# tag:internal +### @usage: _PROXY_LIBRARY() # internal ### ### The use of this module is strictly prohibited!!! module _PROXY_LIBRARY: LIBRARY { @@ -7810,14 +7810,14 @@ module _PROXY_LIBRARY: LIBRARY { NO_RUNTIME() } -# tag:maps-specific -@import "${CONF_ROOT}/conf/project_specific/maps/aar.conf" -@import "${CONF_ROOT}/conf/project_specific/maps/sproto.conf" -@import "${CONF_ROOT}/conf/project_specific/maps/mapkit.conf" - +# tag:maps-specific +@import "${CONF_ROOT}/conf/project_specific/maps/aar.conf" +@import "${CONF_ROOT}/conf/project_specific/maps/sproto.conf" +@import "${CONF_ROOT}/conf/project_specific/maps/mapkit.conf" + _PRIMARY_OUTPUT_VALUE= -# tag:internal +# tag:internal ### @usage: PRIMARY_OUTPUT_VALUE(Output) # internal ### ### The use of this module is strictly prohibited!!! @@ -7827,7 +7827,7 @@ macro PRIMARY_OUTPUT(OUTPUT) { _DLL_PROXY_LIBRARY_CMD=$GENERATE_MF && $COPY_CMD $_PRIMARY_OUTPUT_VALUE ${input;hide:_PRIMARY_OUTPUT_VALUE} ${TARGET} -# tag:internal +# tag:internal ### @usage: DLL_PROXY_LIBRARY() # internal ### ### The use of this module is strictly prohibited!!! @@ -7838,7 +7838,7 @@ module DLL_PROXY_LIBRARY: _PROXY_LIBRARY { _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 +# tag:internal ### @usage: PREBUILT_PROGRAM([programname]) # internal ### ### Program module which uses a prebuilt prgram as its output. @@ -7865,7 +7865,7 @@ macro COLLECT_JINJA_TEMPLATES(VAR, DIR) { _GLOB($VAR ${DIR}/**/*.jinja ${DIR}/**/*.yaml) } -# tag:go-specific +# tag:go-specific GO_HOST_OS=unknown when ($HOST_OS_LINUX) { GO_HOST_OS=linux @@ -7877,7 +7877,7 @@ elsewhen($HOST_OS_WINDOWS) { GO_HOST_OS=windows } -# tag:go-specific +# tag:go-specific GO_HOST_ARCH=unknown when ($HOST_ARCH_X86_64) { GO_HOST_ARCH=amd64 @@ -7886,7 +7886,7 @@ elsewhen($HOST_ARCH_ARM64) { GO_HOST_ARCH=arm64 } -# tag:go-specific +# tag:go-specific GO_TARG_OS=unknown when ($OS_LINUX) { GO_TARG_OS=linux @@ -7898,7 +7898,7 @@ elsewhen ($OS_WINDOWS) { GO_TARG_OS=windows } -# tag:go-specific +# tag:go-specific GO_TARG_ARCH=unknwon when ($ARCH_X86_64) { GO_TARG_ARCH=amd64 @@ -7910,10 +7910,10 @@ elsewhen ($ARCH_ARM64) { GO_TARG_ARCH=arm64 } -# tag:go-specific +# tag:go-specific GO_HOST_TARG_PARAMS=++host-os $GO_HOST_OS ++host-arch $GO_HOST_ARCH ++targ-os $GO_TARG_OS ++targ-arch $GO_TARG_ARCH -# tag:go-specific +# tag:go-specific GOSTD_VERSION=1.17.6 when ($GOSTD_VERSION == "1.17.6") { GOSTD=contrib/go/_std/src @@ -7925,38 +7925,38 @@ otherwise { GOSTD=__unsupported_go_std_library_version_[$GOSTD_VERSION]__ } -# tag:go-specific +# tag:go-specific GO_DEBUG_PATH_RELATIVE=no _GO_DEBUG_PATH__NO_UID__= _GO_COMPILE_SYMABIS_TRIMPATH__NO_UID__= -# tag:go-specific +# tag:go-specific _GO_IMPORT_PATH=${MODDIR} -# tag:go-specific +# tag:go-specific GO_VET=yolint GO_VET_TOOL= GO_VET_FLAGS= GO_VET_EXTRA_FLAGS= -# tag:go-specific +# tag:go-specific _GO_VET_ADD_CHECK=yes _GO_FMT_ADD_CHECK=yes _GO_YDX_FILE= -# tag:go-specific +# tag:go-specific _GO_CGO1_WRAPPER_FLAGS=--build-prefix=/-B --source-prefix=/-S _GO_LINK_EXE_EXT_CMD= -# tag:go-specific +# tag:go-specific GO_WITH_MUSL= -# tag:go-specific +# tag:go-specific GO_TOOLS_ROOT=${GO_TOOLS_RESOURCE_GLOBAL} GO_TEST_MINER=${tool:"tools/go_test_miner"} GO_TEST_IMPORT_PATH= -# tag:go-specific +# tag:go-specific GO_STD_LIB_PREFIX=${GOSTD}/ GO_ARCADIA_PROJECT_PREFIX=a.yandex-team.ru/ GO_CONTRIB_PROJECT_PREFIX=vendor/ @@ -7966,21 +7966,21 @@ GO_VET_REPORT_EXT=.vet.txt GO_VET_OUTPUT_INFO=${output;rootrel;hide;pre=${MODULE_PREFIX};suf=${MODULE_SUFFIX}${GO_VET_INFO_EXT}:REALPRJNAME} GO_VET_OUTPUT_REPORT=${output;rootrel;hide;pre=${MODULE_PREFIX};suf=${MODULE_SUFFIX}${GO_VET_REPORT_EXT}:REALPRJNAME} -# tag:go-specific tag:codenav +# tag:go-specific tag:codenav _GO_YNDEXER_EXT=.ydx.pb2 GO_YNDEXER_OUTPUT=${output;pre=${MODULE_PREFIX};suf=${MODULE_SUFFIX}${_GO_YNDEXER_EXT}:REALPRJNAME} -# tag:go-specific +# tag:go-specific GO_PROJECT_PREFIXES=++std-lib-prefix $GO_STD_LIB_PREFIX ++arc-project-prefix $GO_ARCADIA_PROJECT_PREFIX -# tag:go-specific +# tag:go-specific _GO_FAKEID=${FAKEID}.${BUILD_TYPE}.${GO_FAKEID} -# tag:go-specific +# tag:go-specific CGO2_CFLAGS_VALUE= CGO2_LDFLAGS_VALUE= -# tag:go-specific +# tag:go-specific GO_ASM_FLAGS_VALUE= ### @usage: GO_ASM_FLAGS(flags) ### Add the specified flags to the go asm compile command line. @@ -7988,7 +7988,7 @@ macro GO_ASM_FLAGS(Flags...) { SET_APPEND(GO_ASM_FLAGS_VALUE $Flags) } -# tag:go-specific +# tag:go-specific GO_CGO1_FLAGS_VALUE= ### @usage: GO_CGO1_FLAGS(flags) ### Add the specified flags to the go cgo compile command line. @@ -7996,7 +7996,7 @@ macro GO_CGO1_FLAGS(Flags...) { SET_APPEND(GO_CGO1_FLAGS_VALUE $Flags) } -# tag:go-specific +# tag:go-specific GO_CGO2_FLAGS_VALUE= ### @usage: GO_CGO2_FLAGS(flags) ### Add the specified flags to the go cgo compile command line. @@ -8004,7 +8004,7 @@ macro GO_CGO2_FLAGS(Flags...) { SET_APPEND(GO_CGO2_FLAGS_VALUE $Flags) } -# tag:go-specific +# tag:go-specific GO_COMPILE_FLAGS_VALUE=$USER_GO_COMPILE_FLAGS ### @usage: GO_COMPILE_FLAGS(flags) ### Add the specified flags to the go compile command line. @@ -8012,7 +8012,7 @@ macro GO_COMPILE_FLAGS(Flags...) { SET_APPEND(GO_COMPILE_FLAGS_VALUE $Flags) } -# tag:go-specific +# tag:go-specific GO_LINK_FLAGS_VALUE=$USER_GO_LINK_FLAGS ### @usage: GO_LINK_FLAGS(flags) ### Add the specified flags to the go link command line. @@ -8020,10 +8020,10 @@ macro GO_LINK_FLAGS(Flags...) { SET_APPEND(GO_LINK_FLAGS_VALUE $Flags) } -# tag:go-specific +# tag:go-specific _GO_TOOL_MODE= -# tag:go-specific +# tag:go-specific _GO_TOOL_COMMON_FLAGS=\ ++mode $_GO_TOOL_MODE \ $GO_PROJECT_PREFIXES \ @@ -8045,57 +8045,57 @@ _GO_TOOL_COMMON_FLAGS=\ $_GO_EMBED_VALUE \ $GO_TOOLCHAIN_ENV -# tag:go-specific +# tag:go-specific macro _GO_GEN_COVER_GO(GO_FILE, VAR_ID) { .CMD=${hide:_GO_FAKEID} $GO_TOOLS_ROOT/pkg/tool/${GO_HOST_OS}_${GO_HOST_ARCH}/cover -mode set -var $VAR_ID -o ${output;noext;suf=.cover.go:GO_FILE} ${input:GO_FILE} } -# tag:go-specific +# tag:go-specific macro _GO_COMPILE_SYMABIS(FLAGS[], ASM_FILES...) { .CMD=${hide:_GO_FAKEID} $GO_TOOLS_ROOT/pkg/tool/${GO_HOST_OS}_${GO_HOST_ARCH}/asm $_GO_COMPILE_SYMABIS_TRIMPATH__NO_UID__ ${pre=-I :_C__INCLUDE} -I $GO_TOOLS_ROOT/pkg/include -D GOOS_${GO_TARG_OS} -D GOARCH_${GO_TARG_ARCH} $FLAGS $GO_ASM_FLAGS_VALUE -gensymabis -o ${output:"gen.symabis"} ${input:ASM_FILES} ${kv;hide:"p go"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} .ADDINCL=build/scripts/go_fake_include } -# tag:go-specific +# tag:go-specific 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 +# 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"} _USE_LINKER() } -# tag:go-specific +# 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"} } -# tag:go-specific +# 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 } -# tag:go-specific +# 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"} } -# tag:go-specific +# tag:go-specific GO_LINK_LIB=$GENERATE_MF && $_GO_LINK_LIB_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_INPUTS $_GO_EMBED_INPUTS) GO_LINK_EXE=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $GENERATE_VCS_GO_INFO_NODEP && $_GO_LINK_EXE_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_INPUTS $_GO_EMBED_INPUTS) GO_LINK_TEST=$GENERATE_VCS_C_INFO_NODEP && $GENERATE_VCS_GO_INFO_NODEP && $_GO_LINK_TEST_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_INPUTS $_GO_EMBED_INPUTS GO_TEST_FILES $_GO_TEST_SRCS_VALUE GO_XTEST_FILES $_GO_XTEST_SRCS_VALUE) GO_LINK_DLL=$GO_LINK_EXE && $COPY_CMD $BINDIR/_cgo_export.h ${output;pre=${MODULE_PREFIX};suf=.h:REALPRJNAME} -# tag:go-specific +# tag:go-specific CGO_ENABLED=yes when ($OS_WINDOWS == "yes" || $SANITIZER_TYPE && $SANITIZER_TYPE != "no") { CGO_ENABLED=no } -# tag:go-specific +# tag:go-specific GO_PACKAGE_VALUE= ### @usage: GO_PACKAGE_NAME(Name) ### Override name of a Go package. @@ -8103,7 +8103,7 @@ macro GO_PACKAGE_NAME(NAME) { SET(GO_PACKAGE_VALUE $NAME) } -# tag:go-specific tag:internal +# 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. @@ -8113,7 +8113,7 @@ macro _GO_SRCS(FILES...) { SET_APPEND(_GO_SRCS_VALUE $FILES) } -# tag:go-specific +# tag:go-specific _GO_TEST_SRCS_VALUE= ### @usage: GO_TEST_SRCS(Files...) ### .go sources for internal tests of a module @@ -8122,7 +8122,7 @@ macro GO_TEST_SRCS(FILES...) { SET_APPEND(_GO_TEST_SRCS_VALUE $FILES) } -# tag:go-specific +# tag:go-specific _GO_XTEST_SRCS_VALUE= ### @usage: GO_XTEST_SRCS(Files...) ### .go sources for external tests of a module @@ -8131,12 +8131,12 @@ macro GO_XTEST_SRCS(FILES...) { SET_APPEND(_GO_XTEST_SRCS_VALUE $FILES) } -# tag:go-specific +# tag:go-specific macro _GO_UNUSED_SRCS(FLAGS...) { ENABLE(UNUSED_MACRO) } -# tag:go-specific +# tag:go-specific _CGO_SRCS_VALUE= ### @usage: CGO_SRCS(Files...) ### .go sources to be built with CGO @@ -8145,7 +8145,7 @@ macro CGO_SRCS(FILES...) { PEERDIR(${GOSTD}/syscall) } -# tag:go-specific +# tag:go-specific GO_LDFLAGS_GLOBAL= ### @usage: GO_LDFLAGS(Flags...) ### Link flags for GO_PROGRAM linking from .go sources @@ -8153,7 +8153,7 @@ macro GO_LDFLAGS(FLAGS...) { SET_APPEND(GO_LDFLAGS_GLOBAL $FLAGS) } -# tag:go-specific +# tag:go-specific CGO_CFLAGS_VALUE= ### @usage: CGO_CFLAGS(Flags...) ### Compiler flags specific to CGO compilation @@ -8162,7 +8162,7 @@ macro CGO_CFLAGS(FLAGS...) { CFLAGS($FLAGS) } -# tag:go-specific +# tag:go-specific CGO_LDFLAGS_VALUE= ### @usage: CGO_LDFLAGS(Files...) ### Linker flags specific to CGO linking @@ -8171,7 +8171,7 @@ macro CGO_LDFLAGS(FLAGS...) { GO_LDFLAGS($FLAGS) } -# tag:go-specific +# tag:go-specific _GO_SKIP_TEST_VALUE= ### @usage: GO_SKIP_TESTS(TestNames...) ### @@ -8182,7 +8182,7 @@ macro GO_SKIP_TESTS(TESTS...) { RESTRICT_PATH(vendor MSG This macro is prohibited to be used outside the vendor/ directory) } -# tag:go-specific tag:internal +# tag:go-specific tag:internal _GO_EMBED_VALUE= _GO_EMBED_INPUTS= ### @usage: _GO_EMBED_PATTERN(PATTERN) # internal @@ -8199,7 +8199,7 @@ macro _GO_EMBED_PATTERN(XTEST?"_xtest":"", PATTERN, IMPORT_PATH) { SET_APPEND(_GO_EMBED_INPUTS \$$_PATTERN_GLOB1 \$$_PATTERN_GLOB2) } -# tag:go-specific +# tag:go-specific ### @usage: GO_EMBED_PATTERN(PATTERN) ### ### Define an embed pattern. @@ -8207,7 +8207,7 @@ macro GO_EMBED_PATTERN(PATTERN) { _GO_EMBED_PATTERN($PATTERN $_GO_IMPORT_PATH) } -# tag:go-specific +# tag:go-specific ### @usage: GO_TEST_EMBED_PATTERN(PATTERN) ### ### Define an embed pattern for internal go tests. @@ -8215,7 +8215,7 @@ macro GO_TEST_EMBED_PATTERN(PATTERN) { _GO_EMBED_PATTERN($PATTERN $_GO_IMPORT_PATH) } -# tag:go-specific +# tag:go-specific ### @usage: GO_XTEST_EMBED_PATTERN(PATTERN) ### ### Define an embed pattern for external go tests. @@ -8223,7 +8223,7 @@ macro GO_XTEST_EMBED_PATTERN(PATTERN) { _GO_EMBED_PATTERN(XTEST $PATTERN $_GO_IMPORT_PATH) } -# tag:go-specific tag:internal +# tag:go-specific tag:internal ### @usage: _GO_EMBED_DIR(PATTERN) # internal ### ### Define an embed directory DIR. @@ -8235,7 +8235,7 @@ macro _GO_EMBED_DIR(XTEST?"_xtest":"", DIR, IMPORT_PATH) { SET_APPEND(_GO_EMBED_INPUTS \$$_PATTERN_GLOB) } -# tag:go-specific +# tag:go-specific ### @usage: GO_EMBED_DIR(DIR) ### ### Define an embed directory DIR. @@ -8243,7 +8243,7 @@ macro GO_EMBED_DIR(DIR) { _GO_EMBED_DIR($DIR $_GO_IMPORT_PATH) } -# tag:go-specific +# tag:go-specific ### @usage: GO_TEST_EMBED_DIR(DIR) ### ### Define an embed directory DIR for internal go tests. @@ -8251,7 +8251,7 @@ macro GO_EMBED_TEST_DIR(DIR) { _GO_EMBED_DIR($DIR $_GO_IMPORT_PATH) } -# tag:go-specific +# tag:go-specific ### @usage: GO_XTEST_EMBED_DIR(DIR) ### ### Define an embed directory DIR for external go tests. @@ -8259,7 +8259,7 @@ macro GO_EMBED_XTEST_DIR(DIR) { _GO_EMBED_DIR(XTEST $DIR $_GO_IMPORT_PATH) } -# tag:go-specific +# tag:go-specific _GO_TOOLCHAIN_ENV_GOARCH=unknown when ($ARCH_ARM64) { _GO_TOOLCHAIN_ENV_GOARCH=${env:"GOARCH=arm64"} @@ -8268,7 +8268,7 @@ elsewhen ($ARCH_X86_64) { _GO_TOOLCHAIN_ENV_GOARCH=${env:"GOARCH=amd64"} } -# tag:go-specific +# tag:go-specific _GO_TOOLCHAIN_ENV_GOOS=unknown when ($OS_DARWIN) { _GO_TOOLCHAIN_ENV_GOOS=${env:"GOOS=darwin"} @@ -8281,10 +8281,10 @@ elsewhen ($OS_WINDOWS) { } _GO_TOOLCHAIN_ENV_PATH= -# tag:go-specific +# tag:go-specific GO_TOOLCHAIN_ENV=$TOOLCHAIN_ENV $_GO_TOOLCHAIN_ENV_GOARCH $_GO_TOOLCHAIN_ENV_GOOS $_GO_TOOLCHAIN_ENV_PATH -# tag:go-specific +# tag:go-specific _GO_GRPC_WELLKNOWN=\ vendor/google.golang.org/grpc \ vendor/google.golang.org/grpc \ @@ -8292,13 +8292,13 @@ _GO_GRPC_WELLKNOWN=\ vendor/google.golang.org/grpc/grpclog \ vendor/google.golang.org/grpc/status -# tag:go-specific +# tag:go-specific macro _GO_GRPC() { SET(GO_PROTO_GEN_PLUGINS grpc) PEERDIR(${GOSTD}/context ${_GO_GRPC_WELLKNOWN}) } -# tag:go-specific +# tag:go-specific ### @usage: GO_GRPC_GATEWAY_SRCS() ### ### Use of grpc-gateway plugin (Supported for Go only). @@ -8306,7 +8306,7 @@ macro GO_GRPC_GATEWAY_SRCS(FILE...) { ENABLE(UNUSED_MACRO) } -# tag:go-specific +# tag:go-specific ### @usage: GO_GRPC_GATEWAY_SWAGGER_SRCS() ### ### Use of grpc-gateway plugin w/ swagger emission (Supported for Go only). @@ -8314,11 +8314,11 @@ macro GO_GRPC_GATEWAY_SWAGGER_SRCS(FILE...) { PEERDIR(vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options) } -# tag:go-specific +# tag:go-specific _GO_PROTO_GRPC_GATEWAY_OPTS= _GO_PROTO_GRPC_GATEWAY_OUTS= -# tag:go-specific +# tag:go-specific 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) @@ -8331,19 +8331,19 @@ macro _GO_GRPC_GATEWAY_SRCS_IMPL(Files...) { PEERDIR(vendor/google.golang.org/grpc/metadata) } -# tag:go-specific +# tag:go-specific 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}) } -# tag:go-specific +# tag:go-specific macro _GO_GRPC_GATEWAY_SRCS(Files...) { _SETUP_GO_GRPC_GATEWAY() _GO_GRPC_GATEWAY_SRCS_IMPL($Files) } -# tag:go-specific +# 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:)) @@ -8353,7 +8353,7 @@ macro _GO_GRPC_GATEWAY_SWAGGER_SRCS(Files...) { PEERDIR(vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options) } -# tag:go-specific +# tag:go-specific when ($MUSL == "yes") { _GO_DEFAULT_ALLOCATOR=$DEFAULT_ALLOCATOR } @@ -8361,7 +8361,7 @@ otherwise { _GO_DEFAULT_ALLOCATOR=FAKE } -# tag:go-specific tag:internal +# tag:go-specific tag:internal ### @usage _GO_BASE_UNIT # internal ### ### The base module of all golang modules. Defines common properties, dependencies and rules for go build. @@ -8523,7 +8523,7 @@ module _GO_BASE_UNIT: _BASE_UNIT { ADDINCL(${GOSTD}/runtime) } -# tag:go-specific +# tag:go-specific ### @usage: GO_LIBRARY([name]) ### ### Go library module definition. @@ -8541,7 +8541,7 @@ module GO_LIBRARY: _GO_BASE_UNIT { MODULE_SUFFIX=.a } -# tag:go-specific +# tag:go-specific ### @usage: GO_PROGRAM([name]) ### ### Go program module definition. @@ -8584,7 +8584,7 @@ module GO_PROGRAM: _GO_BASE_UNIT { } } -# tag:go-specific +# tag:go-specific module _GO_DLL_BASE_UNIT: GO_PROGRAM { .CMD=GO_LINK_DLL .SYMLINK_POLICY=SO @@ -8620,7 +8620,7 @@ module _GO_DLL_BASE_UNIT: GO_PROGRAM { } } -# tag:go-specific +# tag:go-specific ### @usage: GO_DLL(name major_ver [minor_ver] [PREFIX prefix]) ### ### Go ishared object module definition. @@ -8629,7 +8629,7 @@ module _GO_DLL_BASE_UNIT: GO_PROGRAM { module GO_DLL: _GO_DLL_BASE_UNIT { } -# tag:go-specific tag:test +# tag:go-specific tag:test ### @usage: GO_BENCH_TIMEOUT(x) ### ### Sets timeout in seconds for 1 Benchmark in go benchmark suite @@ -8639,7 +8639,7 @@ macro GO_BENCH_TIMEOUT(bench_timeout) { SET(GO_BENCH_TIMEOUT $bench_timeout) } -# tag:go-specific tag:test +# tag:go-specific tag:test ### @usage: GO_TEST([name]) ### ### Go test module definition. @@ -8669,18 +8669,18 @@ module GO_TEST: GO_PROGRAM { SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) } -# tag:go-specific +# tag:go-specific macro GO_MOCKGEN_FROM(Path) { SET(MOCKGEN_FROM ${Path}) } -# tag:go-specific +# tag:go-specific macro GO_MOCKGEN_TYPES(First, Rest...) { SET(MOCKGEN_FIRST $First) SET(MOCKGEN_REST $Rest) } - -# tag:go-specific + +# tag:go-specific macro GO_MOCKGEN_REFLECT() { PEERDIR(${GOSTD}/encoding/gob) PEERDIR(${GOSTD}/flag) @@ -8694,7 +8694,7 @@ macro GO_MOCKGEN_REFLECT() { RUN_PROGRAM(vendor/github.com/golang/mock/mockgen -prog_only a.yandex-team.ru/${MOCKGEN_FROM} $MOCKGEN_FIRST${pre=$__COMMA__:MOCKGEN_REST} STDOUT main.go) } -# tag:go-specific +# tag:go-specific macro GO_MOCKGEN_MOCKS() { PEERDIR(${GOSTD}/reflect) PEERDIR(vendor/github.com/golang/mock/gomock) @@ -8702,7 +8702,7 @@ macro GO_MOCKGEN_MOCKS() { RUN_PROGRAM(vendor/github.com/golang/mock/mockgen -package mocks -exec_only ${BINDIR}/gen/gen a.yandex-team.ru/${MOCKGEN_FROM} $MOCKGEN_FIRST${pre=$__COMMA__:MOCKGEN_REST} TOOL ${MODDIR}/gen STDOUT mocks.go) } -# tag:java-specific +# tag:java-specific JAVA_IGNORE_CLASSPATH_CLASH_VALUE= ### @usage: JAVA_IGNORE_CLASSPATH_CLASH_FOR([classes]) ### Ignore classpath clash test fails for classes @@ -8710,7 +8710,7 @@ macro JAVA_IGNORE_CLASSPATH_CLASH_FOR(Args...) { SET_APPEND(JAVA_IGNORE_CLASSPATH_CLASH_VALUE $Args) } -# tag:python-specific +# tag:python-specific ### @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. @@ -8726,13 +8726,13 @@ macro JAVA_IGNORE_CLASSPATH_CLASH_FOR(Args...) { ### ### @example ### -### PY2_LIBRARY(mymodule) +### 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 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. +### 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 @@ -8742,16 +8742,16 @@ macro PY_SRCS() { DEFAULT(PYTHON3 no) } -# tag:python-specific +# tag:python-specific _ALL_PY_FILES= -# tag:python-specific +# 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) } -# tag:python-specific +# 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. @@ -8768,7 +8768,7 @@ macro ALL_PY_SRCS(TOP_LEVEL?"TOP_LEVEL":"", NAMESPACE="", RECURSIVE?"RECURSIVE": _ALL_PY_SRCS2(${pre=NAMESPACE :NAMESPACE} ${TOP_LEVEL} ${RECURSIVE} REST .${pre=/:Files}) } -# tag:python-specific +# tag:python-specific _PY_EXTRA_LINT_FILES_VALUE= ### @usage: PY_EXTRA_LINT_FILES(files...) ### @@ -8778,16 +8778,16 @@ macro PY_EXTRA_LINT_FILES(FILES...) { SET_APPEND(_PY_EXTRA_LINT_FILES_VALUE $FILES) } -# tag:python-specific +# tag:python-specific ### @usage: PY23_LIBRARY([name]) ### -### Build PY2_LIBRARY or PY3_LIBRARY depending on incoming PEERDIR. +### 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 { - module PY2: PY2_LIBRARY { + module PY2: PY2_LIBRARY { OBJ_SUF=.py2 RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT } @@ -8803,31 +8803,31 @@ multimodule PY23_LIBRARY { } } -# tag:python-specific +# tag:python-specific ### @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. +### 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 ### -### @see [LIBRARY()](#module_LIBRARY), [PY2MODULE()](#module_PY2MODULE) +### @see [LIBRARY()](#module_LIBRARY), [PY2MODULE()](#module_PY2MODULE) multimodule PY23_NATIVE_LIBRARY { module PY2: LIBRARY { - .RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3 PYTHON3_ADDINCL + .RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3 PYTHON3_ADDINCL OBJ_SUF=.py2 - PYTHON2_ADDINCL() + PYTHON2_ADDINCL() SET(MODULE_LANG PY2) } module PY3: LIBRARY { - .RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3 - .ALIASES=PYTHON2_ADDINCL=PYTHON3_ADDINCL + .RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3 + .ALIASES=PYTHON2_ADDINCL=PYTHON3_ADDINCL PYTHON3_ADDINCL() SET(MODULE_LANG PY3) when ($MSVC == "yes" || $CYGWIN == "yes") { @@ -8841,31 +8841,31 @@ multimodule PY23_NATIVE_LIBRARY { } IBTOOL_PATH=$XCODE_TOOLS_ROOT_RESOURCE_GLOBAL/Xcode/Contents/Developer/usr/bin/ibtool -# tag:src-processing +# tag:src-processing STORYBOARD_FLAGS=--errors --warnings --notices --auto-activate-custom-fonts --output-format human-readable-text macro _SRC("storyboard", SRC, SRCFLAGS...) { .CMD=$IBTOOL_PATH $STORYBOARD_FLAGS --module $REALPRJNAME --output-partial-info-plist ${output;suf=.partial_plist:SRC} --compilation-directory $BINDIR ${input:SRC} && $YMAKE_PYTHON ${input:"build/scripts/tar_directory.py"} ${output;tobindir;suf=.compiled_storyboard_tar:SRC} $BINDIR/${nopath;suf=c:SRC} $BINDIR/${nopath;suf=c:SRC} } -# tag:src-processing +# tag:src-processing macro _SRC("xib", SRC, SRCFLAGS...) { .CMD=$IBTOOL_PATH $STORYBOARD_FLAGS --module $REALPRJNAME --output-partial-info-plist ${output;suf=.partial_plist:SRC} --compile ${output;tobindir;nopath;noext;suf=.nib:SRC} ${input:SRC} } ACTOOL_PATH=$XCODE_TOOLS_ROOT_RESOURCE_GLOBAL/Xcode/Contents/Developer/usr/bin/ibtool -# tag:ios-specific +# tag:ios-specific 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 } -# tag:ios-specific +# tag:ios-specific macro IOS_APP_COMMON_FLAGS(Flags...) { SET_APPEND(STORYBOARD_FLAGS $Flags) SET_APPEND(ASSETS_FLAGS $Flags) } -# tag:ios-specific +# tag:ios-specific macro IOS_APP_ASSETS_FLAGS(Flags...) { SET_APPEND(ASSETS_FLAGS $Flags) } @@ -8878,7 +8878,7 @@ macro DARWIN_SIGNED_RESOURCE(Resource, Relpath) { .CMD=$COPY_CMD $Resource $BINDIR/$Relpath && $YMAKE_PYTHON ${input:"build/scripts/tar_directory.py"} ${output;tobindir;suf=.signed_resource_tar:Relpath} $BINDIR/$Relpath $BINDIR } -# tag:ios-specific +# tag:ios-specific 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() @@ -8893,7 +8893,7 @@ module IOS_INTERFACE: _BARE_UNIT { PEERDIR+=build/platform/xcode/tools } -# tag:ios-specific +# tag:ios-specific module DEFAULT_IOS_INTERFACE: IOS_INTERFACE { SET(MODULE_SUFFIX .default.ios.interface) } @@ -8927,7 +8927,7 @@ otherwise { TEST_IOS_RUNTIME_TYPE_VALUE=$IOS_RUNTIME } -# tag:java-specific +# tag:java-specific ### @usage: MODULE_JDK(Version) ### ### Specify JDK version for module @@ -8936,7 +8936,7 @@ macro JDK_VERSION(Arg) { _JDK_VERSION_MACRO_CHECK($Arg) } -# tag:java-specific +# tag:java-specific when ($JDK_VERSION == "10") { JDK10=yes # remove this later } @@ -8945,7 +8945,7 @@ when ($JDK_VERSION == "8") { JAVA_PROGRAM_CP_USE_COMMAND_FILE=no } -# tag:kotlin-specific +# tag:kotlin-specific KOTLIN_JVM_TARGET= when ($JDK_VERSION == "8") { KOTLIN_JVM_TARGET=1.8 @@ -8959,7 +8959,7 @@ otherwise { KOTLIN_JVM_TARGET=$JDK_VERSION } -# tag:frontend-specific +# tag:frontend-specific ### @usage: COLLECT_FRONTEND_FILES(Varname, Dir) ### ### Recursively collect files with typical frontend extensions from Dir and save the result into variable Varname @@ -8967,13 +8967,13 @@ macro COLLECT_FRONTEND_FILES(Varname, Dir) { _GLOB($Varname $Dir/**/*.(css|ejs|jpg|js|jsx|png|styl|svg|ts|tsx|json|html)) } -# tag:java-specific +# tag:java-specific # local jdk and tools USE_SYSTEM_JDK= USE_SYSTEM_UBERJAR= USE_SYSTEM_ERROR_PRONE= -# tag:swift-specific +# tag:swift-specific CPP_XCODE_TOOLCHAIN_VERSION=9.2 SWIFT_XCODE_TOOLCHAIN_VERSION=9.2 XCODE_TOOLS_VERSION=10.1 @@ -9014,18 +9014,18 @@ when ($OPENGL_REQUIRED) { OPENGL_VERSION=18.0.5 } -# tag:python-specific +# tag:python-specific multimodule PY23_TEST { module PY2 : PYTEST_BIN { - MODULE_PREFIX=py2_ + MODULE_PREFIX=py2_ OBJ_SUF=.py2 - CANONIZE_SUB_PATH=py2test + CANONIZE_SUB_PATH=py2test RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT } module PY3TEST_PROGRAM: PY3TEST_BIN { .FINAL_TARGET=yes OBJ_SUF=.py3 - CANONIZE_SUB_PATH=py3test + CANONIZE_SUB_PATH=py3test RUN_CYTHON_SCRIPT=$YMAKE_PYTHON $CYTHON_SCRIPT } @@ -9036,18 +9036,18 @@ multimodule PY23_TEST { } } -# tag:windows-specific +# tag:windows-specific WINDOWS_MANIFEST= macro WINDOWS_MANIFEST(Manifest) { SET(WINDOWS_MANIFEST $Manifest) } -# tag:windows-specific +# tag:windows-specific when ($MSVC == "yes" && $WINDOWS_MANIFEST) { LDFLAGS+=/MANIFEST:EMBED /MANIFESTINPUT:${input:WINDOWS_MANIFEST} } -# tag:cpp-specific +# tag:cpp-specific _VISIBILITY_LEVEL= ### @usage: VISIBILITY(level) ### @@ -9065,7 +9065,7 @@ macro VISIBILITY(LEVEL) { ASSERT(_OK Unsupported value [$LEVEL] passed to VISIBILITY macro, expected values are DEFAULT, HIDDEN.) } -# tag:cpp-specific +# tag:cpp-specific _CFLAGS_VISIBILITY= when ($_VISIBILITY_LEVEL != "" && $IGNORE_VISIBILITY != "yes") { when ($CLANG == "yes" || $GCC == "yes") { @@ -9074,53 +9074,53 @@ when ($_VISIBILITY_LEVEL != "" && $IGNORE_VISIBILITY != "yes") { } CFLAGS+=$_CFLAGS_VISIBILITY -# tag:cpp-specific +# tag:cpp-specific macro SDBUS_CPP_ADAPTOR(File) { .CMD=${tool:"contrib/libs/sdbus-cpp/tools/xml2cpp-codegen"} --adaptor=${output;nopath;noext:File.adaptor.h} ${input:File} .PEERDIR=contrib/libs/sdbus-cpp } -# tag:cpp-specific +# tag:cpp-specific macro SDBUS_CPP_PROXY(File) { .CMD=${tool:"contrib/libs/sdbus-cpp/tools/xml2cpp-codegen"} --proxy=${output;nopath;noext:File.proxy.h} ${input:File} .PEERDIR=contrib/libs/sdbus-cpp } -# tag:python-specific +# tag:python-specific macro _PY_SSQLS_SRC(EXT, SRC, SRCFLAGS...) { #generic macro } -# tag:python-specific +# tag:python-specific macro _PY_SSQLS_SRC("ssqls", SRC, SRCFLAGS...) { .CMD=${tool:"metrika/core/tools/ssqls"} ${input;notransformbuilddir:SRC} -S $ARCADIA_ROOT -B $ARCADIA_BUILD_ROOT -L "python" -D $MODDIR $SRCFLAGS ${output;tobindir;noext;hide;pre=autogenerated/$MODDIR/:SRC.py} } -# tag:python-specific +# tag:python-specific macro _PY_SSQLS_SRCS(Srcs...) { foreach(Src: $Srcs) { _PY_SSQLS_SRC(${lastext:Src} $Src) } } -# tag:python-specific +# tag:python-specific macro PY_SSQLS_SRCS(Srcs...) { _PY_SSQLS_SRCS(KEEP_DIR_STRUCT $Srcs) PY_SRCS(${noext;pre=autogenerated/$MODDIR/:Srcs.py}) } -# tag:python-specific +# tag:python-specific macro _PY_ENUM_SERIALIZATION_TO_JSON(File) { .CMD=$ENUM_PARSER_TOOL ${input:File} --output ${output;chksum;noext;suf=.generated.h:File} --json-output ${output;noext:File.json} ${kv;hide:"p EN"} ${kv;hide:"pc yellow"} } -# tag:python-specific +# tag:python-specific macro _PY_ENUM_SERIALIZATION_TO_PY(File) { .CMD=${tool:"metrika/core/tools/python_enum_generator"} ${input;noext:File.json} -D ${MODDIR} --output ${output;noext:File.py} ${kv;hide:"p EN"} ${kv;hide:"pc yellow"} } -# tag:metrika +# tag:metrika multimodule SSQLS_LIBRARY { module CPP_SSQLS : LIBRARY { .ALIASES=ENUMS_SERIALIZATION=CPP_ENUMS_SERIALIZATION @@ -9141,18 +9141,18 @@ macro NGINX_MODULES(Modules...) { # Experimental: container as output. https://st.yandex-team.ru/DTCC-179 -# tag:external-build +# tag:external-build CONTAINER_LAYER_CMD=$YMAKE_PYTHON ${input:"devtools/experimental/solar/selfcontainer/scripts/make_container_layer.py"} -o $TARGET $AUTO_INPUT ${cwd:ARCADIA_BUILD_ROOT} ${kv;hide:"p CL"} ${kv;hide:"pc blue"} 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 +# tag:external-build module CONTAINER_LAYER: _BARE_UNIT { .CMD=CONTAINER_LAYER_CMD MODULE_SUFFIX=.container_layer } -# tag:external-build +# tag:external-build module CONTAINER: _BARE_UNIT { .NODE_TYPE=Bundle .PEERDIR_POLICY=as_build_from @@ -9160,11 +9160,11 @@ module CONTAINER: _BARE_UNIT { .CMD=CONTAINER_CMD } -# tag:external-build +# tag:external-build CUSTOM_BUILD_LIBRARY_USE= CUSTOM_BUILD_LIBRARY_CMD=$GENERATE_MF && ${tool:"devtools/experimental/solar/outbuild/runner"} ${hide:PEERS} --script=${input:CUSTOM_SCRIPT} --output $TARGET --python=${tool:"contrib/tools/python3"} --isolator=${tool:"devtools/experimental/solar/outbuild/isolator"} $CUSTOM_BUILD_LIBRARY_USE -# tag:external-build +# tag:external-build module CUSTOM_BUILD_LIBRARY: LIBRARY { .NODE_TYPE=Bundle .PEERDIR_POLICY=as_build_from @@ -9197,7 +9197,7 @@ macro OPENSOURCE_EXPORT_REPLACEMENT(CMAKE[], CMAKE_TARGET[], CMAKE_COMPONENET[], SET(CONAN_REFERENCE $CONAN) } -# tag:licence +# tag:licence CREDITS_FILE_EXTRA_EXT= CREDITS_FLAGS= CREDITS_TEXTS_FILE= @@ -9210,7 +9210,7 @@ macro LICENSE_TEXTS(Source) { SET(CREDITS_TEXTS_FILE $Source) } -# tag:licence +# tag:licence ### @usage: WITHOUT_LICENSE_TEXTS() ### ### This macro indicates that the module has no license text @@ -9218,7 +9218,7 @@ macro WITHOUT_LICENSE_TEXTS() { ENABLE(NO_CREDITS_TEXTS_FILE) } -# tag:licence +# tag:licence when ($WITH_CREDITS) { CREDITS_FLAGS+=--credits-output ${output;suf=${CREDITS_FILE_EXTRA_EXT}".CREDITS.txt":REALPRJNAME} } @@ -9242,7 +9242,7 @@ module MCU_PROGRAM: PROGRAM { .CMD=MCU_LINK_EXE } -# tag:deprecated +# tag:deprecated ### @usage: METAQUERYFILES(filenames...) #deprecated ### ### This macro does nothing and will be removed @@ -9250,7 +9250,7 @@ macro METAQUERYFILES(Files...) { ENABLE(UNUSED_MACRO) } -# tag:flags tag:internal tag:windows-specific +# tag:flags tag:internal tag:windows-specific ### @usage: _MSVC_FLAGS_WINDOWS_IMPL(target_platform compiler_flags) # internal ### ### Add CFLAGS when the firts argument is WINDOWS @@ -9258,7 +9258,7 @@ macro _MSVC_FLAGS_WINDOWS_IMPL(WINDOWS[], FLAGS...) { CFLAGS($WINDOWS) } -# tag:flags tag:windows-specific tag:cpp-specific +# tag:flags tag:windows-specific tag:cpp-specific ### @usage: MSVC_FLAGS([GLOBAL compiler_flag]* compiler_flags) ### ### Add the specified flags to the compilation line of C/C++files. diff --git a/build/ymake_conf.py b/build/ymake_conf.py index 30219eb85e..f0fcce7752 100755 --- a/build/ymake_conf.py +++ b/build/ymake_conf.py @@ -1,8 +1,8 @@ #!/usr/bin/env python # coding=utf-8 -from __future__ import print_function - +from __future__ import print_function + import base64 import itertools import json @@ -16,8 +16,8 @@ import subprocess import sys import tempfile -import six - +import six + logger = logging.getLogger(__name__ if __name__ != '__main__' else 'ymake_conf.py') @@ -169,7 +169,7 @@ class Platform(object): def find_in_dict(self, dict_, default=None): if dict_ is None: return default - for key in six.iterkeys(dict_): + for key in six.iterkeys(dict_): if self._parse_os(key) == self.os: return dict_[key] return default @@ -265,11 +265,11 @@ def to_strings(o): def emit(key, *value): - print('{0}={1}'.format(key, ' '.join(to_strings(value)))) + print('{0}={1}'.format(key, ' '.join(to_strings(value)))) def emit_with_comment(comment, key, *value): - print('# {}'.format(comment)) + print('# {}'.format(comment)) emit(key, *value) @@ -278,7 +278,7 @@ def emit_with_ignore_comment(key, *value): def append(key, *value): - print('{0}+={1}'.format(key, ' '.join(to_strings(value)))) + print('{0}+={1}'.format(key, ' '.join(to_strings(value)))) def emit_big(text): @@ -294,10 +294,10 @@ def emit_big(text): prefix += 1 if first: # Be pretty, prepend an empty line before the output - print() + print() first = False - print(line[prefix:]) + print(line[prefix:]) class Variables(dict): @@ -310,7 +310,7 @@ class Variables(dict): emit(k, self[k]) def update_from_presets(self): - for k in six.iterkeys(self): + for k in six.iterkeys(self): v = preset(k) if v is not None: self[k] = v @@ -320,8 +320,8 @@ class Variables(dict): def value_check(v_): return v_ is None - if any(map(value_check, six.itervalues(self))): - for k in six.iterkeys(self): + if any(map(value_check, six.itervalues(self))): + for k in six.iterkeys(self): self[k] = reset_value @@ -332,7 +332,7 @@ def format_env(env, list_separator=':'): def format(kv): return '${env:"%s=%s"}' % (kv[0], format_value(kv[1])) - return ' '.join(map(format, sorted(six.iteritems(env)))) + return ' '.join(map(format, sorted(six.iteritems(env)))) # TODO(somov): Проверить, используется ли это. Может быть, выпилить. @@ -364,7 +364,7 @@ def is_negative_str(s): def to_bool(s, default=None): - if isinstance(s, six.string_types): + if isinstance(s, six.string_types): if is_positive_str(s): return True if is_negative_str(s): @@ -419,7 +419,7 @@ class Options(object): argv = self.arguments if len(argv) < 4: - print('Usage: ArcRoot, --BuildType--, Verbosity, [Path to local.ymake]', file=sys.stderr) + print('Usage: ArcRoot, --BuildType--, Verbosity, [Path to local.ymake]', file=sys.stderr) sys.exit(1) self.arcadia_root = argv[1] @@ -674,12 +674,12 @@ class Build(object): """ def un_unicode(o): - if isinstance(o, six.text_type): - return six.ensure_str(o) + if isinstance(o, six.text_type): + return six.ensure_str(o) if isinstance(o, list): return [un_unicode(oo) for oo in o] if isinstance(o, dict): - return {un_unicode(k): un_unicode(v) for k, v in six.iteritems(o)} + return {un_unicode(k): un_unicode(v) for k, v in six.iteritems(o)} return o return un_unicode(json.loads(base64.b64decode(base64str))) @@ -702,7 +702,7 @@ class YMake(object): print('@import "${CONF_ROOT}/conf/jbuild.ymake.conf"') if presets: - print('# Variables set from command line by -D options') + print('# Variables set from command line by -D options') for key in sorted(presets): if key in ('MY_YMAKE_BIN', 'REAL_YMAKE_BIN'): emit_with_ignore_comment(key, opts().presets[key]) @@ -760,18 +760,18 @@ class System(object): def print_nix_host_const(): emit('WRITE_COMMAND', '/bin/echo', '-e') - print(''' + print(''' when ($USE_PYTHON) { C_DEFINES+= -DUSE_PYTHON -}''') +}''') @staticmethod def print_linux_const(): - print(''' + print(''' when (($USEMPROF == "yes") || ($USE_MPROF == "yes")) { C_SYSTEM_LIBRARIES_INTERCEPT+=-ldmalloc } -''') +''') def print_target_settings(self): emit('TARGET_PLATFORM', self.platform.os_compat) @@ -937,7 +937,7 @@ class ToolchainOptions(object): self.c_compiler = detector.c_compiler self.cxx_compiler = detector.cxx_compiler self.compiler_version_list = detector.version_list - self.compiler_version = '.'.join(map(lambda part: six.ensure_str(str(part)), self.compiler_version_list)) + self.compiler_version = '.'.join(map(lambda part: six.ensure_str(str(part)), self.compiler_version_list)) else: self.type = self.params['type'] @@ -948,7 +948,7 @@ class ToolchainOptions(object): # TODO(somov): Требовать номер версии всегда. self.compiler_version = self.params.get('gcc_version') or self.params.get('version') or '0' - self.compiler_version_list = list(map(int, self.compiler_version.split('.'))) + self.compiler_version_list = list(map(int, self.compiler_version.split('.'))) # TODO(somov): Посмотреть, можно ли спрятать это поле. self.name_marker = '$(%s)' % self.params.get('match_root', self._name.upper()) @@ -1002,7 +1002,7 @@ class ToolchainOptions(object): def get_env(self, convert_list=None): convert_list = convert_list or (lambda x: x) r = {} - for k, v in six.iteritems(self._env): + for k, v in six.iteritems(self._env): if isinstance(v, str): r[k] = v elif isinstance(v, list): @@ -2934,7 +2934,7 @@ class Perl(object): def _iter_config(self, config_keys): # Run perl -V:version -V:etc... perl_config = [self.perl] + ['-V:{}'.format(key) for key in config_keys] - config = six.ensure_str(get_stdout(perl_config) or '') + config = six.ensure_str(get_stdout(perl_config) or '') start = 0 while True: diff --git a/certs/tests/ya.make b/certs/tests/ya.make index 7064b67f51..d094cd3953 100644 --- a/certs/tests/ya.make +++ b/certs/tests/ya.make @@ -1,4 +1,4 @@ -PY2TEST() +PY2TEST() OWNER( g:util diff --git a/contrib/python/PyYAML/py2/ya.make b/contrib/python/PyYAML/py2/ya.make index 1ec5c0c301..d95565a6ba 100644 --- a/contrib/python/PyYAML/py2/ya.make +++ b/contrib/python/PyYAML/py2/ya.make @@ -1,4 +1,4 @@ -PY2_LIBRARY() +PY2_LIBRARY() LICENSE(MIT) diff --git a/contrib/python/Pygments/py2/ya.make b/contrib/python/Pygments/py2/ya.make index 978caf3d68..9adaf844e8 100644 --- a/contrib/python/Pygments/py2/ya.make +++ b/contrib/python/Pygments/py2/ya.make @@ -1,6 +1,6 @@ # Generated by devtools/yamaker (pypi). -PY2_LIBRARY() +PY2_LIBRARY() OWNER(blinkov g:python-contrib) diff --git a/contrib/python/ipython/py2/ya.make b/contrib/python/ipython/py2/ya.make index c356efb08c..827f48f03b 100644 --- a/contrib/python/ipython/py2/ya.make +++ b/contrib/python/ipython/py2/ya.make @@ -1,4 +1,4 @@ -PY2_LIBRARY() +PY2_LIBRARY() LICENSE(BSD-3-Clause) diff --git a/contrib/python/parso/py2/tests/ya.make b/contrib/python/parso/py2/tests/ya.make index a9c2a8e8d0..e2841ee6c4 100644 --- a/contrib/python/parso/py2/tests/ya.make +++ b/contrib/python/parso/py2/tests/ya.make @@ -1,4 +1,4 @@ -PY2TEST() +PY2TEST() OWNER(g:python-contrib) diff --git a/contrib/python/parso/py2/ya.make b/contrib/python/parso/py2/ya.make index 6ff4902360..603e4f63bc 100644 --- a/contrib/python/parso/py2/ya.make +++ b/contrib/python/parso/py2/ya.make @@ -1,6 +1,6 @@ # Generated by devtools/yamaker (pypi). -PY2_LIBRARY() +PY2_LIBRARY() OWNER(g:python-contrib) diff --git a/contrib/python/setuptools/py2/ya.make b/contrib/python/setuptools/py2/ya.make index 4c36dcf1ab..f6597f293e 100644 --- a/contrib/python/setuptools/py2/ya.make +++ b/contrib/python/setuptools/py2/ya.make @@ -1,4 +1,4 @@ -PY2_LIBRARY() +PY2_LIBRARY() LICENSE(MIT) diff --git a/contrib/python/traitlets/py2/tests/ya.make b/contrib/python/traitlets/py2/tests/ya.make index d2d3e3b9bf..3c47d72bca 100644 --- a/contrib/python/traitlets/py2/tests/ya.make +++ b/contrib/python/traitlets/py2/tests/ya.make @@ -1,4 +1,4 @@ -PY2TEST() +PY2TEST() OWNER(g:python-contrib borman nslus) diff --git a/contrib/restricted/boost/libs/python/arcadia_test/py2/ya.make b/contrib/restricted/boost/libs/python/arcadia_test/py2/ya.make index 2eb3461699..013bfa9c32 100644 --- a/contrib/restricted/boost/libs/python/arcadia_test/py2/ya.make +++ b/contrib/restricted/boost/libs/python/arcadia_test/py2/ya.make @@ -1,4 +1,4 @@ -PY2TEST() +PY2TEST() WITHOUT_LICENSE_TEXTS() diff --git a/library/cpp/accurate_accumulate/benchmark/metrics/ya.make b/library/cpp/accurate_accumulate/benchmark/metrics/ya.make index 5d532e1479..bcb310f04c 100644 --- a/library/cpp/accurate_accumulate/benchmark/metrics/ya.make +++ b/library/cpp/accurate_accumulate/benchmark/metrics/ya.make @@ -1,6 +1,6 @@ OWNER(yazevnul) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/library/cpp/codecs/static/tools/tests/ya.make b/library/cpp/codecs/static/tools/tests/ya.make index c5324eaf53..7ee83f07b1 100644 --- a/library/cpp/codecs/static/tools/tests/ya.make +++ b/library/cpp/codecs/static/tools/tests/ya.make @@ -1,4 +1,4 @@ -PY2TEST() +PY2TEST() OWNER(velavokr) diff --git a/library/cpp/cpuid_check/README.md b/library/cpp/cpuid_check/README.md index 9c0e8dfa59..74a94a86c5 100644 --- a/library/cpp/cpuid_check/README.md +++ b/library/cpp/cpuid_check/README.md @@ -7,7 +7,7 @@ Currently supported check are: sse4.2, pclmul, aes, avx, avx2 and fma. **Note:** the library depends on `util`. **Note:** the library adds stratup code and so if `PEERDIR`-ed from `LIBRARY` will do so for all `PROGRAM`-s that (transitively) use the `LIBRARY`. Don't do this! -You normally don't need to `PEERDIR` this library at all. Since making sse4 in Arcadia default this library is used implicitly. It is `PEERDIR`-ed from all `PROGRAM`-s and derived modules (e.g. `PY2_PROGRAM`, but not `GO_PROGRAM` or `JAVA_PROGRAM`). +You normally don't need to `PEERDIR` this library at all. Since making sse4 in Arcadia default this library is used implicitly. It is `PEERDIR`-ed from all `PROGRAM`-s and derived modules (e.g. `PY2_PROGRAM`, but not `GO_PROGRAM` or `JAVA_PROGRAM`). It is also not applied to `PROGRAM`-s where `NO_UTIL()`, `NO_PLATFORM()` or `ALLOCATOR(FAKE)` set to avoid undesired dependencied. To disable this implicit check use `NO_CPU_CHECK()` macro or `-DCPU_CHECK=no` ya make flag. diff --git a/library/cpp/string_utils/base64/bench/metrics/ya.make b/library/cpp/string_utils/base64/bench/metrics/ya.make index b0406516c3..71e232c5a2 100644 --- a/library/cpp/string_utils/base64/bench/metrics/ya.make +++ b/library/cpp/string_utils/base64/bench/metrics/ya.make @@ -3,7 +3,7 @@ OWNER( g:util ) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/library/cpp/testing/benchmark/examples/metrics/ya.make b/library/cpp/testing/benchmark/examples/metrics/ya.make index a9dbdca9fa..ab03d931aa 100644 --- a/library/cpp/testing/benchmark/examples/metrics/ya.make +++ b/library/cpp/testing/benchmark/examples/metrics/ya.make @@ -3,7 +3,7 @@ OWNER( yazevnul ) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/library/cpp/tvmauth/src/rw/ut_large/ya.make b/library/cpp/tvmauth/src/rw/ut_large/ya.make index 54f82065e7..7f71fdef03 100644 --- a/library/cpp/tvmauth/src/rw/ut_large/ya.make +++ b/library/cpp/tvmauth/src/rw/ut_large/ya.make @@ -1,4 +1,4 @@ -PY2TEST() +PY2TEST() OWNER(g:passport_infra) diff --git a/library/python/filelock/ut/py2/ya.make b/library/python/filelock/ut/py2/ya.make index 30b54e0232..1b7539a93a 100644 --- a/library/python/filelock/ut/py2/ya.make +++ b/library/python/filelock/ut/py2/ya.make @@ -1,6 +1,6 @@ OWNER(g:yatool) -PY2TEST() +PY2TEST() PEERDIR( library/python/filelock/ut/lib diff --git a/library/python/fs/clonefile.pyx b/library/python/fs/clonefile.pyx index 830bb894f2..fc2551039f 100644 --- a/library/python/fs/clonefile.pyx +++ b/library/python/fs/clonefile.pyx @@ -1,5 +1,5 @@ -import six - +import six + cdef extern from "sys/clonefile.h" nogil: int clonefile(const char * src, const char * dst, int flags) @@ -15,4 +15,4 @@ cdef int _macos_clone_file(const char* src, const char* dst) except? 0: return 1 def macos_clone_file(src, dst): - return _macos_clone_file(six.ensure_binary(src), six.ensure_binary(dst)) != 0 + return _macos_clone_file(six.ensure_binary(src), six.ensure_binary(dst)) != 0 diff --git a/library/python/resource/ut/py2/ya.make b/library/python/resource/ut/py2/ya.make index 5085610faf..55efe2469a 100644 --- a/library/python/resource/ut/py2/ya.make +++ b/library/python/resource/ut/py2/ya.make @@ -1,4 +1,4 @@ -PY2TEST() +PY2TEST() OWNER(pg) diff --git a/library/python/svn_version/ut/py2/ya.make b/library/python/svn_version/ut/py2/ya.make index c860e16536..fcff0957e2 100644 --- a/library/python/svn_version/ut/py2/ya.make +++ b/library/python/svn_version/ut/py2/ya.make @@ -1,4 +1,4 @@ -PY2TEST() +PY2TEST() OWNER(pg) diff --git a/library/python/symbols/python/ut/py2/ya.make b/library/python/symbols/python/ut/py2/ya.make index 214194de57..df468cbcad 100644 --- a/library/python/symbols/python/ut/py2/ya.make +++ b/library/python/symbols/python/ut/py2/ya.make @@ -1,4 +1,4 @@ -PY2TEST() +PY2TEST() OWNER(orivej) diff --git a/library/python/testing/yatest_common/yatest/common/path.py b/library/python/testing/yatest_common/yatest/common/path.py index 6fed7dda8a..361f554200 100644 --- a/library/python/testing/yatest_common/yatest/common/path.py +++ b/library/python/testing/yatest_common/yatest/common/path.py @@ -33,7 +33,7 @@ def change_dir(path): os.chdir(old) -def copytree(src, dst, symlinks=False, ignore=None, postprocessing=None): +def copytree(src, dst, symlinks=False, ignore=None, postprocessing=None): ''' Copy an entire directory of files into an existing directory instead of raising Exception what shtuil.copytree does @@ -47,13 +47,13 @@ def copytree(src, dst, symlinks=False, ignore=None, postprocessing=None): shutil.copytree(s, d, symlinks, ignore) else: shutil.copy2(s, d) - if postprocessing: - postprocessing(dst, False) - for root, dirs, files in os.walk(dst): - for path in dirs: - postprocessing(os.path.join(root, path), False) - for path in files: - postprocessing(os.path.join(root, path), True) + if postprocessing: + postprocessing(dst, False) + for root, dirs, files in os.walk(dst): + for path in dirs: + postprocessing(os.path.join(root, path), False) + for path in files: + postprocessing(os.path.join(root, path), True) def get_unique_file_path(dir_path, file_pattern, create_file=True, max_suffix=10000): diff --git a/library/python/windows/ut/ya.make b/library/python/windows/ut/ya.make index c39f1797b8..02c9651c3b 100644 --- a/library/python/windows/ut/ya.make +++ b/library/python/windows/ut/ya.make @@ -1,6 +1,6 @@ OWNER(g:yatool) -PY2TEST() +PY2TEST() TEST_SRCS(test_windows.py) diff --git a/tools/archiver/tests/ya.make b/tools/archiver/tests/ya.make index 445b4d3e70..6f66690177 100644 --- a/tools/archiver/tests/ya.make +++ b/tools/archiver/tests/ya.make @@ -1,6 +1,6 @@ OWNER(mvel) -PY2TEST() +PY2TEST() TEST_SRCS(test.py) diff --git a/util/charset/benchmark/to_lower/metrics/ya.make b/util/charset/benchmark/to_lower/metrics/ya.make index 5bb3461a8d..4b65433544 100644 --- a/util/charset/benchmark/to_lower/metrics/ya.make +++ b/util/charset/benchmark/to_lower/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( ) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/charset/benchmark/utf8_to_wide/metrics/ya.make b/util/charset/benchmark/utf8_to_wide/metrics/ya.make index c406e25bee..570ddce6eb 100644 --- a/util/charset/benchmark/utf8_to_wide/metrics/ya.make +++ b/util/charset/benchmark/utf8_to_wide/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( ) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/generic/benchmark/fastclp2/metrics/ya.make b/util/generic/benchmark/fastclp2/metrics/ya.make index b2d17ebad3..22dc27d838 100644 --- a/util/generic/benchmark/fastclp2/metrics/ya.make +++ b/util/generic/benchmark/fastclp2/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( ) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/generic/benchmark/log2/metrics/ya.make b/util/generic/benchmark/log2/metrics/ya.make index eb987e38d2..4cac9f345b 100644 --- a/util/generic/benchmark/log2/metrics/ya.make +++ b/util/generic/benchmark/log2/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( ) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/generic/benchmark/rotate_bits/metrics/ya.make b/util/generic/benchmark/rotate_bits/metrics/ya.make index ac27d2f845..eddb04640e 100644 --- a/util/generic/benchmark/rotate_bits/metrics/ya.make +++ b/util/generic/benchmark/rotate_bits/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( ) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/generic/benchmark/vector_count_ctor/metrics/ya.make b/util/generic/benchmark/vector_count_ctor/metrics/ya.make index c48f89b564..215248a9ee 100644 --- a/util/generic/benchmark/vector_count_ctor/metrics/ya.make +++ b/util/generic/benchmark/vector_count_ctor/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( ) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/memory/benchmark/pool/metrics/ya.make b/util/memory/benchmark/pool/metrics/ya.make index c671bc5c1c..a9eb25e1ed 100644 --- a/util/memory/benchmark/pool/metrics/ya.make +++ b/util/memory/benchmark/pool/metrics/ya.make @@ -1,7 +1,7 @@ OWNER(g:util) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/random/benchmark/prng/metrics/ya.make b/util/random/benchmark/prng/metrics/ya.make index 1f56aac0bd..38ed9241ad 100644 --- a/util/random/benchmark/prng/metrics/ya.make +++ b/util/random/benchmark/prng/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( ) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/string/benchmark/float_to_string/metrics/ya.make b/util/string/benchmark/float_to_string/metrics/ya.make index 4b8c4cc07d..2b33cfd0ce 100644 --- a/util/string/benchmark/float_to_string/metrics/ya.make +++ b/util/string/benchmark/float_to_string/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( ) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/string/benchmark/join/metrics/ya.make b/util/string/benchmark/join/metrics/ya.make index 08ff3a149f..bb64808d5c 100644 --- a/util/string/benchmark/join/metrics/ya.make +++ b/util/string/benchmark/join/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( ) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/string/benchmark/subst_global/metrics/ya.make b/util/string/benchmark/subst_global/metrics/ya.make index d8c30ad460..df744970a6 100644 --- a/util/string/benchmark/subst_global/metrics/ya.make +++ b/util/string/benchmark/subst_global/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( ) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/system/benchmark/cpu_id/metrics/ya.make b/util/system/benchmark/cpu_id/metrics/ya.make index 8c55def99b..c23255e4fb 100644 --- a/util/system/benchmark/cpu_id/metrics/ya.make +++ b/util/system/benchmark/cpu_id/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( ) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/system/benchmark/create_destroy_thread/metrics/ya.make b/util/system/benchmark/create_destroy_thread/metrics/ya.make index d526487e1a..7f97e0ba5b 100644 --- a/util/system/benchmark/create_destroy_thread/metrics/ya.make +++ b/util/system/benchmark/create_destroy_thread/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( ) SUBSCRIBER(g:util-subscribers) -PY2TEST() +PY2TEST() SIZE(LARGE) diff --git a/util/tests/sym_versions/ya.make b/util/tests/sym_versions/ya.make index 3957c60fc9..36fda99fb2 100644 --- a/util/tests/sym_versions/ya.make +++ b/util/tests/sym_versions/ya.make @@ -1,4 +1,4 @@ -PY2TEST() +PY2TEST() OWNER( pg diff --git a/ydb/library/yql/minikql/benchmark/pack_num/metrics/ya.make b/ydb/library/yql/minikql/benchmark/pack_num/metrics/ya.make index 203af2de49..720efaff51 100644 --- a/ydb/library/yql/minikql/benchmark/pack_num/metrics/ya.make +++ b/ydb/library/yql/minikql/benchmark/pack_num/metrics/ya.make @@ -4,7 +4,7 @@ OWNER( udovichenko-r ) -PY2TEST() +PY2TEST() SIZE(LARGE) |