aboutsummaryrefslogtreecommitdiffstats
path: root/build/conf/project_specific/maps/asrc.conf
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-06-13 11:05:01 +0300
committeralexv-smirnov <alex@ydb.tech>2023-06-13 11:05:01 +0300
commitbf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch)
tree1d1df72c0541a59a81439842f46d95396d3e7189 /build/conf/project_specific/maps/asrc.conf
parent8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff)
downloadydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz
add ymake export to ydb
Diffstat (limited to 'build/conf/project_specific/maps/asrc.conf')
-rw-r--r--build/conf/project_specific/maps/asrc.conf121
1 files changed, 121 insertions, 0 deletions
diff --git a/build/conf/project_specific/maps/asrc.conf b/build/conf/project_specific/maps/asrc.conf
new file mode 100644
index 0000000000..c910e6abff
--- /dev/null
+++ b/build/conf/project_specific/maps/asrc.conf
@@ -0,0 +1,121 @@
+_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
+ .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
+}
+