asrc.conf 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. _BUNDLE_DELIM_JAVA=__DELIM_JAVA__
  2. _BUNDLE_DELIM_RES=__DELIM_RES__
  3. _BUNDLE_DELIM_ASSETS=__DELIM_ASSETS__
  4. _BUNDLE_DELIM_AIDL=__DELIM_AIDL__
  5. _BUNDLE_EXTRA_INPUTS_VALUE=
  6. ### @usage: BUNDLE_EXTRA_INPUTS(filenames...) # internal
  7. macro BUNDLE_EXTRA_INPUTS(INPUTS...) {
  8. SET_APPEND(_BUNDLE_EXTRA_INPUTS_VALUE $INPUTS)
  9. }
  10. _BUNDLE_AIDL_SRCS_VALUE=
  11. ### @usage: BUNDLE_AIDL_SRCS(dirname filenames...) # internal
  12. macro BUNDLE_AIDL_SRCS(PREFIX, ABSOLUTE[], FILES...) {
  13. SET_APPEND(_BUNDLE_AIDL_SRCS_VALUE $_BUNDLE_DELIM_AIDL $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE})
  14. BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE})
  15. }
  16. _BUNDLE_JAVA_SRCS_VALUE=
  17. ### @usage: BUNDLE_JAVA_SRCS(dirname filenames...) # internal
  18. macro BUNDLE_JAVA_SRCS(PREFIX, ABSOLUTE[], FILES...) {
  19. SET_APPEND(_BUNDLE_JAVA_SRCS_VALUE $_BUNDLE_DELIM_JAVA $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE})
  20. BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE})
  21. }
  22. _BUNDLE_RES_SRCS_VALUE=
  23. ### @usage: BUNDLE_RES_SRCS(dirname filenames...) # internal
  24. macro BUNDLE_RES_SRCS(PREFIX, ABSOLUTE[], FILES...) {
  25. SET_APPEND(_BUNDLE_RES_SRCS_VALUE $_BUNDLE_DELIM_RES $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE})
  26. BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE})
  27. }
  28. _BUNDLE_ASSETS_SRCS_VALUE=
  29. ### @usage: BUNDLE_ASSETS_SRCS(dirname filenames...) # internal
  30. macro BUNDLE_ASSETS_SRCS(PREFIX, ABSOLUTE[], FILES...) {
  31. SET_APPEND(_BUNDLE_ASSETS_SRCS_VALUE $_BUNDLE_DELIM_ASSETS $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE})
  32. BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE})
  33. }
  34. _BUNDLE_SRCS_VALUE=$_BUNDLE_AIDL_SRCS_VALUE $_BUNDLE_ASSETS_SRCS_VALUE $_BUNDLE_JAVA_SRCS_VALUE $_BUNDLE_RES_SRCS_VALUE
  35. macro _COMPILE_ASRC_IMPL(EXTRA_INPUTS...) {
  36. .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output $TARGET ${kv;hide:"p AC"} $kv;hide:"pc light-blue"} ${kv;hide:"show_out"}
  37. }
  38. _COMPILE_ASRC=$_COMPILE_ASRC_IMPL($_ASRC_EXTRA_INPUTS_VALUE)
  39. COMPILE_ASRC_MF=$_COMPILE_ASRC && $GENERATE_MF
  40. ### @usage: ASRC_LIBRARY() # internal
  41. module ASRC_LIBRARY: _BASE_UNIT {
  42. .CMD=COMPILE_ASRC_MF
  43. .ALL_INS_TO_OUT=no
  44. .PEERDIR_POLICY=as_include
  45. .FINAL_TARGET=no
  46. PEERDIR_TAGS=JAVA_PROTO JAVA_IDL
  47. MODULE_TYPE=Library
  48. SET(MODULE_SUFFIX .asrc)
  49. SET(DONT_RESOLVE_INCLUDES yes)
  50. SET(NEED_PLATFORM_PEERDIRS no)
  51. NO_RUNTIME()
  52. }
  53. macro _MOBILE_LIBRARY_PREREQUISITES_IMPL(OUTPUT, EXTRA_INPUTS...) {
  54. .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --input $_BUNDLE_SRCS_VALUE --output $OUTPUT ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"}
  55. }
  56. macro _MOBILE_LIBRARY_PREREQUISITES_CMD(OUTPUT, EXTRA_INPUTS...) {
  57. .CMD=${output;hide:OUTPUT} ${input;hide:EXTRA_INPUTS} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} $_MOBILE_LIBRARY_PREREQUISITES_IMPL($OUTPUT $EXTRA_INPUTS)
  58. }
  59. when ($OS_ANDROID == "yes") {
  60. LINK_MOBILE_LIB=$LINK_LIB && $_MOBILE_LIBRARY_PREREQUISITES_CMD(${BINDIR}/$MODULE_PREFIX$REALPRJNAME$MODULE_SUFFIX.asrc $_BUNDLE_EXTRA_INPUTS_VALUE)
  61. }
  62. otherwise {
  63. LINK_MOBILE_LIB=$LINK_LIB
  64. }
  65. ### @usage: MOBILE_LIBRARY() # internal
  66. module MOBILE_LIBRARY: LIBRARY {
  67. .CMD=LINK_MOBILE_LIB
  68. DISABLE(NEED_ADD_FAKE_SRC)
  69. }
  70. _JSRC_PROXY_MOBILE_LIBRARY_CMDLINE=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --jsrcs ${ext=.jsrc;tags_in=local:PEERS} --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.asrc:REALPRJNAME} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"}
  71. macro _JSRC_PROXY_MOBILE_LIBRARY_CMD_IMPL(EXTRA_INPUTS...) {
  72. .CMD=$_JSRC_PROXY_MOBILE_LIBRARY_CMDLINE
  73. }
  74. JSRC_PROXY_MOBILE_LIBRARY_CMD=$LINK_LIB && $_JSRC_PROXY_MOBILE_LIBRARY_CMD_IMPL($_BUNDLE_EXTRA_INPUTS_VALUE)
  75. ### @usage: JSRC_PROXY_MOBILE_LIBRARY() # internal
  76. module JSRC_PROXY_MOBILE_LIBRARY: MOBILE_LIBRARY {
  77. .CMD=JSRC_PROXY_MOBILE_LIBRARY_CMD
  78. .PEERDIR_POLICY=as_build_from
  79. .PROXY=yes
  80. SET(MODULE_TYPE LIBRARY)
  81. DISABLE(NEED_ADD_FAKE_SRC)
  82. PEERDIR_TAGS=JAVA_PROTO JAVA_IDL
  83. SET(BIN_TMP_DIR ${BINDIR}/tmp)
  84. NO_UTIL()
  85. }
  86. _MOBILE_DLL_PREREQUISITES_CMDLINE=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --asrcs ${PEERS.arcs} --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.asrc:REALPRJNAME} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"}
  87. macro _MOBILE_DLL_PREREQUISITES_CMD(EXTRA_INPUTS...) {
  88. .CMD=$_MOBILE_DLL_PREREQUISITES_CMDLINE
  89. }
  90. when ($OS_ANDROID == "yes") {
  91. LINK_MOBILE_DLL=$LINK_DYN_LIB && $_MOBILE_DLL_PREREQUISITES_CMD($_BUNDLE_EXTRA_INPUTS_VALUE)
  92. }
  93. otherwise {
  94. LINK_MOBILE_DLL=$LINK_DYN_LIB
  95. }