change alternative use

Signed-off-by: madomado <wboy111@outlook.com>
This commit is contained in:
madomado
2023-07-20 16:32:25 +08:00
committed by GitHub
parent 3744c62071
commit ae7329fd0f
+5 -4
View File
@@ -39,10 +39,11 @@ PATH="$PATH:$PWD/mx-%mxver"
%dnl JAVA_HOME=$PWD/openjdk1.8.0_302-jvmci-%jvmci-fastdebug
cd graal/vm
# we can only access macro buildroot in install section
JAVA_HOME=%buildroot/usr/lib/jvm$(alternatives --list | grep jre_1.8.0_openjdk | sed -E 's@.+?/@/@g') mx --env ce build &
JAVA_HOME=%buildroot/usr/lib/jvm$(alternatives --list | grep jre_11_openjdk | sed -E 's@.+?/@/@g') mx --env ce build &
JAVA_HOME=%buildroot/usr/lib/jvm$(alternatives --list | grep jre_17_openjdk | sed -E 's@.+?/@/@g') mx --env ce build &
JAVA_HOME=%buildroot/usr/lib/jvm$(alternatives --list | grep jre_20_openjdk | sed -E 's@.+?/@/@g') mx --env ce build &
%define javahome() JAVA_HOME=%buildroot/usr/lib/jvm$(alternatives --list | grep jre_%1 | sed -E 's@.+?/@/@g' | grep -)
%{javahome 1.8.0} mx --env ce build &
%{javahome 11} mx --env ce build &
%{javahome 17} mx --env ce build &
%{javahome 20} mx --env ce build &
wait