[ymake] Fix GLOBAL SRCS in Bundles and Programs
Ignore GLOBAL keyword in EXTERNAL_JAVA_LIBRARY SRCS
Make GlobalSrcs part of ContextUid
Issue:
@@ -2268,6 +2268,15 @@ macro PY_NAMESPACE(Arg) {
SET(PY_NAMESPACE_VALUE $Arg)
}
+### @usage: _SRCS_NO_GLOBAL(files...) # internal
+###
+### Proxy macro to SRCS macro which filters out GLOBAL keyword from the list of source files.
+### Useful for modules like EXTERNAL_JAVA_LIBRARY, where GLOBAL keyword cannot be applied properly.
+### Note: this macro changes order of source files.
+macro _SRCS_NO_GLOBAL(GLOBAL[], FILES...) {
+ SRCS($GLOBAL $FILES)
+}
+
COMPILE_JAVA_MF=$GENERATE_VCS_JAVA_INFO_NODEP && $COMPILE_JAVA && $GENERATE_MF
### @usage: EXTERNAL_JAVA_LIBRARY() #internal
@@ -2281,6 +2290,7 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT {
.CMD=COMPILE_JAVA_MF
.PEERDIR_POLICY=as_build_from
.FINAL_TARGET=no
+ .ALIASES=SRCS=_SRCS_NO_GLOBAL
PEERDIR(build/platform/java/jdk)
