1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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)
- }
- macro SET_LIST_PRE_SUF(OUT, PRE, SUF, IN...) {
- SET($OUT ${pre=${PRE};suf=${SUF}:IN})
- }
- ### @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: Macro is designed to reject any ya.make files in Dirs except current one
- macro USRV_ALL_SRCS(RECURSIVE?"RECURSIVE":"", SUFFIX="", EXCLUDE[], Dirs...) {
- _USRV_ALL_SRCS_HELPER(${SUFFIX} ${RECURSIVE} DIRS ./${Dirs} EXCLUDE ya.make $EXCLUDE)
- }
|