aboutsummaryrefslogtreecommitdiffstats
path: root/build/conf/project_specific/uservices.conf
blob: 92f69e10ea2f8db998e06e36d6ff1453dd712dc3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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_include;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)
}