cross-build: JAVA_HOME is now build, not host

Miklos reported a Android configure error, which tried to run
autogen.sh for gb_Side=build, which is correctly forbidden. I
checked all the files timestamps for $(BUILDDIR)/config_host.mk
target - all ok, and somehow missed the JAVA_HOME test...

Since my commit 42aeb9f906
("cross-build: fix Java NI linking"), JAVA_HOME just makes
sense for the build side. So the tests just make sense for the
host side, if there was a --with-jdk-home supplied.

This results in a sensible, empty JAVA_HOME for the host side
and all Java builds I found already override JAVA_HOME with
JAVA_HOME_FOR_BUILD.

Change-Id: I1742a83466af70804f1700a1ca0cb6b6b77a7b12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102676
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
This commit is contained in:
Jan-Marek Glogowski 2020-09-14 15:24:37 +02:00
parent 89b385c233
commit abcc4eb907
2 changed files with 2 additions and 2 deletions

View file

@ -321,7 +321,7 @@ export JAVADOC=@JAVADOC@
export JAVADOCISGJDOC=@JAVADOCISGJDOC@
export JAVACFLAGS=@JAVACFLAGS@
export JAVAIFLAGS=@JAVAIFLAGS@
export JAVAIFLAGS_FOR_BUILD=@JAVAIFLAGS@
export JAVAIFLAGS_FOR_BUILD=@JAVAIFLAGS_FOR_BUILD@
export JAVA_CLASSPATH_NOT_SET=@JAVA_CLASSPATH_NOT_SET@
export JAVAINTERPRETER=@JAVAINTERPRETER@
export JAVA_HOME=@JAVA_HOME@

View file

@ -7901,7 +7901,7 @@ fi
AC_SUBST(JAVADOC)
AC_SUBST(JAVADOCISGJDOC)
if test "$ENABLE_JAVA" != ""; then
if test "$ENABLE_JAVA" != "" -a \( "$cross_compiling" != "yes" -o -n "$with_jdk_home" \); then
# check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then