aboutsummaryrefslogtreecommitdiffstats
path: root/build/conf/project_specific/uservices.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/uservices.conf
parent8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff)
downloadydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz
add ymake export to ydb
Diffstat (limited to 'build/conf/project_specific/uservices.conf')
-rw-r--r--build/conf/project_specific/uservices.conf40
1 files changed, 40 insertions, 0 deletions
diff --git a/build/conf/project_specific/uservices.conf b/build/conf/project_specific/uservices.conf
new file mode 100644
index 0000000000..5bb931744c
--- /dev/null
+++ b/build/conf/project_specific/uservices.conf
@@ -0,0 +1,40 @@
+macro _MOVE(Src, OUT="", OUT_NOAUTO="", CPP_DEPS[], OUTPUT_INCLUDES[]) {
+ .CMD=$MOVE_FILE ${input:Src} ${output;norel:OUT} ${output;noauto;norel:OUT_NOAUTO} ${induced_deps=h+cpp;hide:CPP_DEPS} ${output_includes;hide:OUTPUT_INCLUDES} ${kv;hide:"p MV"} ${kv;hide:"pc light-cyan"}
+}
+
+macro USRV_BUILD(FROM="Please specify generated .tar-file as FROM", DEPS_FILE="NO_DEPS", OUT_NOAUTO[], Files...) {
+ .CMD=${tool:"taxi/uservices/arc-gen/unpack-tar"} --source ${input:FROM} --target ${BINDIR} --suffix .usrv ${Files} ${OUT_NOAUTO} ${output;noauto;hide;suf=.usrv:OUT_NOAUTO} ${output;noauto;hide;suf=.usrv:Files} ${kv;hide:"p USB"} ${kv;hide:"pc light-cyan"}
+ _PROCESS_USRV_FILES(${DEPS_FILE} ${Files} OUT_NOAUTO ${OUT_NOAUTO})
+}
+
+macro _PROCESS_USRV_FILES(DepsFile, Files...) {
+ SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${DepsFile})
+}
+
+macro _USRV_ALL_SRCS_HELPER(SUFFIX, RECURSIVE?"/**/*${SUFFIX}.(c|cc|cpp|h|hpp|hxx|make)":"/*${SUFFIX}.(c|cc|cpp|h|hpp|hxx|make)", DIRS[], EXCLUDE[]) {
+ _GLOB(_ALL_USRV_SOURCES ${suf=${RECURSIVE}:DIRS} EXCLUDE $EXCLUDE)
+ SRCS($_ALL_USRV_SOURCES)
+}
+
+
+### @usage: USRV_ALL_SRCS([RECURSIVE] [Dirs...] [EXCLUDE <globs...>])
+###
+### SRCS for all C++ sources in current or given directories.
+### C++ files are ones with following extensions: `.c`, `.cc`, `.cpp`, `.h`, `.hpp` and `.hxx`.
+###
+### If dirs are omitted the current one is used.
+###
+### @params:
+### - `Dirs` - start directories for files lookup
+### - `RECURSIVE`- makes lookup recursive with resprect to Dirs
+### - `SUFFIX` - file name should end with the provided suffix
+### - `EXCLUDE` - glob pattern to be excluded from results. In recursive mode use recursive pattern (`**`) to
+### exclude files in subdirectories
+###
+### Note: Only one such macro per module is allowed
+### Note: This macro is restricted to taxi/uservices
+### Note: Macro is designed to reject any ya.make files in Dirs except current one
+macro USRV_ALL_SRCS(RECURSIVE?"RECURSIVE":"", SUFFIX="", EXCLUDE[], Dirs...) {
+ RESTRICT_PATH(devtools/dummy_arcadia/models/macros/uservices taxi/uservices)
+ _USRV_ALL_SRCS_HELPER(${SUFFIX} ${RECURSIVE} DIRS ./${Dirs} EXCLUDE ya.make $EXCLUDE)
+}