introduce new ALL_SRCS macro
@@ -1492,10 +1492,38 @@ macro USE_YQL() {
PEERDIR(yql/library/udf/service/terminate_policy)
}
+### @usage: GLOBAL_SRCS(filenames...)
+###
+### @brief Make all source files listed as GLOBAL
+### Call to GLOBAL_SRCS macro is equivalent to call to SRCS macro when each source file is marked with GLOBAL keyword.
+### Arcadia root relative or project dir relative paths are supported for filenames arguments. GLOBAL keyword is not
+### recognized for GLOBAL_SRCS in contrast to SRCS macro.
+###
+### @example:
+### Consider the file to ya.make:
+### LIBRARY()
+### GLOBAL_SRCS(foo.cpp bar.cpp)
+### END()
macro GLOBAL_SRCS(Files...) {
SRCS(${pre=GLOBAL :Files})
}
+### @usage: ALL_SRCS(filenames...)
+###
+### @brief Make all source files listed as GLOBAL or not depending on the keyword GLOBAL
+### Call to ALL_SRCS macro is equivalent to call to GLOBAL_SRCS macro when GLOBAL keyword is specified
+### as the first argument and is equivalent to call to SRCS macro otherwise.
+###
+### @example:
+### Consider the file to ya.make:
+### LIBRARY()
+### SET(MAKE_IT_GLOBAL GLOBAL)
+### ALL_SRCS(${MAKE_IT_GLOBAL} foo.cpp bar.cpp)
+### END()
+macro ALL_SRCS(GLOBAL?"GLOBAL":"", Files...) {
+ SRCS(${pre=$GLOBAL :Files})
+}
+
module _DLL_COMPATIBLE_LIBRARY: LIBRARY {
}
