separate host/target platform java
@@ -2803,8 +2803,17 @@ macro SETUP_FROM_SANDBOX(Id, OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDE
.CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_sandbox.py"} --resource-id $Id $FILE . $OUT $OUT_NOAUTO $OUTPUT_INCLUDES ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${requirements;hide:"network:full"} ${kv;hide:"p SB"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"}
}
+when ($JDK10) {
+ REAL_JDK=$(JDK10)
+ NEED_RESOURCE_JDK=${kv;hide:"needs_resourceJDK10"}
+}
+otherwise {
+ REAL_JDK=$(JDK)
+ NEED_RESOURCE_JDK=${kv;hide:"needs_resourceJDK"}
+}
+
macro _RUN_JAVA(IN{input}[], OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], TOOL[], STDOUT="", CWD="", HIDE_OUTPUT?"stderr2stdout":"stdout2stderr", Args...) {
- .CMD=${cwd:CWD} $YMAKE_PYTHON ${input;pre=build/scripts/:HIDE_OUTPUT.py} $(JDK)/bin/java $Args ${tool;hide:TOOL} ${input;hide:IN} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} ${kv;hide:"needs_resourceJDK"}
+ .CMD=${cwd:CWD} $YMAKE_PYTHON ${input;pre=build/scripts/:HIDE_OUTPUT.py} $REAL_JDK/bin/java $Args ${tool;hide:TOOL} ${input;hide:IN} ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} $NEED_RESOURCE_JDK
}
### @usage: RUN_PROGRAM(tool_path args...
