[Libreoffice-commits] core.git: config_host.mk.in configure.ac external/apache-commons external/beanshell external/hsqldb external/jfreereport external/languagetool external/rhino solenv/gbuild

Jan-Marek Glogowski (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 11 18:29:59 UTC 2020


 config_host.mk.in                                                 |    6 
 configure.ac                                                      |  128 +++++++---
 external/apache-commons/ExternalProject_apache_commons_logging.mk |    1 
 external/beanshell/ExternalProject_beanshell.mk                   |    1 
 external/hsqldb/ExternalProject_hsqldb.mk                         |    1 
 external/jfreereport/ExternalProject_jfreereport_flow_engine.mk   |    1 
 external/jfreereport/ExternalProject_jfreereport_flute.mk         |    1 
 external/jfreereport/ExternalProject_jfreereport_libbase.mk       |    1 
 external/jfreereport/ExternalProject_jfreereport_libfonts.mk      |    1 
 external/jfreereport/ExternalProject_jfreereport_libformula.mk    |    1 
 external/jfreereport/ExternalProject_jfreereport_liblayout.mk     |    1 
 external/jfreereport/ExternalProject_jfreereport_libloader.mk     |    1 
 external/jfreereport/ExternalProject_jfreereport_librepository.mk |    1 
 external/jfreereport/ExternalProject_jfreereport_libserializer.mk |    1 
 external/jfreereport/ExternalProject_jfreereport_libxml.mk        |    1 
 external/jfreereport/ExternalProject_jfreereport_sac.mk           |    1 
 external/languagetool/ExternalProject_languagetool.mk             |    1 
 external/rhino/ExternalProject_rhino.mk                           |    1 
 solenv/gbuild/Jar.mk                                              |    2 
 solenv/gbuild/JavaClassSet.mk                                     |    2 
 20 files changed, 119 insertions(+), 35 deletions(-)

New commits:
commit 42aeb9f906ca4e23d118ff8563184f9315ef3b82
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Wed Jul 29 12:04:03 2020 +0200
Commit:     Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Fri Sep 11 20:29:11 2020 +0200

    cross-build: fix Java NI linking
    
    LibreOffice has a JNI component on Windows and Linux, the
    officebean. Therefore we need a host JDK for linkage to the
    jawt, and a build JDK to compile the Java code.
    
    Change-Id: I4138628ab3ea2ef5900a5b4e9281050ae84e4eb5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102483
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>

diff --git a/config_host.mk.in b/config_host.mk.in
index e3014b015a48..6cea6ccf795e 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -267,7 +267,6 @@ export HARFBUZZ_LIBS=$(gb_SPACE)@HARFBUZZ_LIBS@
 export GSSAPI_LIBS=@GSSAPI_LIBS@
 export GSTREAMER_1_0_CFLAGS=$(gb_SPACE)@GSTREAMER_1_0_CFLAGS@
 export GSTREAMER_1_0_LIBS=$(gb_SPACE)@GSTREAMER_1_0_LIBS@
-export GTHREAD_CFLAGS=$(gb_SPACE)@GTHREAD_CFLAGS@
 export GTK3_CFLAGS=$(gb_SPACE)@GTK3_CFLAGS@
 export GTK3_LIBS=$(gb_SPACE)@GTK3_LIBS@
 export USING_X11=@USING_X11@
@@ -320,15 +319,18 @@ export IWYU_PATH=@IWYU_PATH@
 export JAVACOMPILER=@JAVACOMPILER@
 export JAVADOC=@JAVADOC@
 export JAVADOCISGJDOC=@JAVADOCISGJDOC@
-export JAVAFLAGS=@JAVAFLAGS@
+export JAVACFLAGS=@JAVACFLAGS@
 export JAVAIFLAGS=@JAVAIFLAGS@
+export JAVAIFLAGS_FOR_BUILD=@JAVAIFLAGS@
 export JAVA_CLASSPATH_NOT_SET=@JAVA_CLASSPATH_NOT_SET@
 export JAVAINTERPRETER=@JAVAINTERPRETER@
 export JAVA_HOME=@JAVA_HOME@
+export JAVA_HOME_FOR_BUILD=@JAVA_HOME_FOR_BUILD@
 export JAVA_SOURCE_VER=@JAVA_SOURCE_VER@
 export JAVA_TARGET_VER=@JAVA_TARGET_VER@
 export JAWTLIB=@JAWTLIB@
 export JDK=@JDK@
+export JDK_FOR_BUILD=@JDK_FOR_BUILD@
 export JFREEREPORT_JAR=@JFREEREPORT_JAR@
 export JITC_PROCESSOR_TYPE=@JITC_PROCESSOR_TYPE@
 export JVM_ONE_PATH_CHECK=@JVM_ONE_PATH_CHECK@
diff --git a/configure.ac b/configure.ac
index 86772c2043c0..7dba20926e8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4932,7 +4932,18 @@ if test "$cross_compiling" = "yes"; then
     sub_conf_opts=""
     test -n "$enable_ccache" && sub_conf_opts="$sub_conf_opts --enable-ccache=$enable_ccache"
     test -n "$with_ant_home" && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
-    test $with_junit = no && sub_conf_opts="$sub_conf_opts --without-junit"
+    test "$with_junit" = "no" && sub_conf_opts="$sub_conf_opts --without-junit"
+    if test -n "$ENABLE_JAVA"; then
+        if test "$_os" != "iOS" -a "$_os" != "Android"; then
+            if ! echo "$with_build_platform_configure_options" | grep -q -- '--with-jdk-home='; then
+                AC_MSG_ERROR([Missing build JDK (see --with-build-platform-configure-options, --with-jdk-home and use 'cygpath -ms' on Windows)!])
+            fi
+        else
+            test -n "$with_jdk_home" && sub_conf_opts="$sub_conf_opts --with-jdk-home=$with_jdk_home"
+        fi
+    else
+        sub_conf_opts="$sub_conf_opts --without-java"
+    fi
     test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
     test "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" && sub_conf_opts="$sub_conf_opts --with-system-icu"
     sub_conf_opts="$sub_conf_opts $with_build_platform_configure_options"
@@ -4953,7 +4964,6 @@ if test "$cross_compiling" = "yes"; then
         --disable-skia \
         --enable-icecream="$enable_icecream" \
         --without-doxygen \
-        --without-java \
         --without-webdav \
         --with-parallelism="$with_parallelism" \
         --with-theme="$with_theme" \
@@ -5006,15 +5016,53 @@ if test "$cross_compiling" = "yes"; then
     mkdir -p ../config_build
     mv config_host/*.h ../config_build
 
+    # all these will get a _FOR_BUILD postfix
+    DIRECT_FOR_BUILD_SETTINGS="
+        CC
+        CXX
+        ILIB
+        JAVA_HOME
+        JAVAIFLAGS
+        JDK
+        LIBO_BIN_FOLDER
+        LIBO_LIB_FOLDER
+        LIBO_URE_LIB_FOLDER
+        LIBO_URE_MISC_FOLDER
+        OS
+        SDKDIRNAME
+        SYSTEM_LIBXML
+        SYSTEM_LIBXSLT
+"
+    # these overwrite host config with build config
+    OVERWRITING_SETTINGS="
+        ANT
+        ANT_HOME
+        ANT_LIB
+        HSQLDB_USE_JDBC_4_1
+        JAVA_CLASSPATH_NOT_SET
+        JAVA_SOURCE_VER
+        JAVA_TARGET_VER
+        JAVACFLAGS
+        JAVACOMPILER
+        JAVADOC
+        JAVADOCISGJDOC
+"
+    # these need some special handling
+    EXTRA_HANDLED_SETTINGS="
+        INSTDIR
+        INSTROOT
+        PATH
+        WORKDIR
+"
     OLD_PATH=$PATH
-    . ./bin/get_config_variables CC CXX ILIB INSTDIR INSTROOT LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER LIBO_URE_MISC_FOLDER OS PATH SDKDIRNAME SYSTEM_LIBXML SYSTEM_LIBXSLT WORKDIR
+    . ./bin/get_config_variables $DIRECT_FOR_BUILD_SETTINGS $OVERWRITING_SETTINGS $EXTRA_HANDLED_SETTINGS
     BUILD_PATH=$PATH
     PATH=$OLD_PATH
 
     line=`echo "LO_PATH_FOR_BUILD='${BUILD_PATH}'" | sed -e 's,/CONF-FOR-BUILD,,g'`
     echo "$line" >>build-config
 
-    for V in CC CXX ILIB LIBO_BIN_FOLDER LIBO_LIB_FOLDER LIBO_URE_LIB_FOLDER LIBO_URE_MISC_FOLDER OS SDKDIRNAME SYSTEM_LIBXML SYSTEM_LIBXSLT; do
+    for V in $DIRECT_FOR_BUILD_SETTINGS; do
         VV='$'$V
         VV=`eval "echo $VV"`
         if test -n "$VV"; then
@@ -5023,6 +5071,15 @@ if test "$cross_compiling" = "yes"; then
         fi
     done
 
+    for V in $OVERWRITING_SETTINGS; do
+        VV='$'$V
+        VV=`eval "echo $VV"`
+        if test -n "$VV"; then
+            line=${V}='${'${V}:-$VV'}'
+            echo "$line" >>build-config
+        fi
+    done
+
     for V in INSTDIR INSTROOT WORKDIR; do
         VV='$'$V
         VV=`eval "echo $VV"`
@@ -7730,11 +7787,9 @@ dnl ===================================================================
 dnl Checks for JDK.
 dnl ===================================================================
 
-# Note that JAVA_HOME as for now always means the *build* platform's
-# JAVA_HOME. Whether all the complexity here actually is needed any
-# more or not, no idea.
+# Whether all the complexity here actually is needed any more or not, no idea.
 
-if test "$ENABLE_JAVA" != ""; then
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
     _gij_longver=0
     AC_MSG_CHECKING([the installed JDK])
     if test -n "$JAVAINTERPRETER"; then
@@ -7770,21 +7825,27 @@ if test "$ENABLE_JAVA" != ""; then
             # set to limit VM usage for JunitTests
             JAVAIFLAGS=-Xmx64M
             # set to limit VM usage for javac
-            JAVAFLAGS=-J-Xmx128M
+            JAVACFLAGS=-J-Xmx128M
         fi
     else
         AC_MSG_ERROR([Java not found. You need at least JDK 9])
     fi
 else
-    dnl Java disabled
-    JAVA_HOME=
-    export JAVA_HOME
+    if test -z "$ENABLE_JAVA"; then
+        dnl Java disabled
+        JAVA_HOME=
+        export JAVA_HOME
+    elif test "$cross_compiling" = "yes"; then
+        # Just assume compatibility of build and host JDK
+        JDK=$JDK_FOR_BUILD
+        JAVAIFLAGS=$JAVAIFLAGS_FOR_BUILD
+    fi
 fi
 
 dnl ===================================================================
 dnl Checks for javac
 dnl ===================================================================
-if test "$ENABLE_JAVA" != ""; then
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
     javacompiler="javac"
     : ${JAVA_SOURCE_VER=8}
     : ${JAVA_TARGET_VER=8}
@@ -7811,7 +7872,7 @@ fi
 dnl ===================================================================
 dnl Checks for javadoc
 dnl ===================================================================
-if test "$ENABLE_JAVA" != ""; then
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
     if test -z "$with_jdk_home"; then
         AC_PATH_PROG(JAVADOC, javadoc)
     else
@@ -7837,6 +7898,7 @@ if test "$ENABLE_JAVA" != ""; then
     JAVADOCISGJDOC="yes"
     fi
 fi
+AC_SUBST(JAVADOC)
 AC_SUBST(JAVADOCISGJDOC)
 
 if test "$ENABLE_JAVA" != ""; then
@@ -8064,16 +8126,18 @@ if test -n "$ENABLE_JAVA" -a -z "$JAVAINC"; then
 fi
 SOLARINC="$SOLARINC $JAVAINC"
 
+AC_SUBST(JAVACFLAGS)
 AC_SUBST(JAVACOMPILER)
-AC_SUBST(JAVADOC)
 AC_SUBST(JAVAINTERPRETER)
 AC_SUBST(JAVAIFLAGS)
-AC_SUBST(JAVAFLAGS)
+AC_SUBST(JAVAIFLAGS_FOR_BUILD)
 AC_SUBST(JAVA_CLASSPATH_NOT_SET)
 AC_SUBST(JAVA_HOME)
+AC_SUBST(JAVA_HOME_FOR_BUILD)
+AC_SUBST(JDK)
+AC_SUBST(JDK_FOR_BUILD)
 AC_SUBST(JAVA_SOURCE_VER)
 AC_SUBST(JAVA_TARGET_VER)
-AC_SUBST(JDK)
 
 
 dnl ===================================================================
@@ -9295,7 +9359,7 @@ fi
 dnl ===================================================================
 dnl Check for system hsqldb
 dnl ===================================================================
-if test "$with_java" != "no"; then
+if test "$with_java" != "no" -a "$cross_compiling" != "yes"; then
     HSQLDB_USE_JDBC_4_1=
     AC_MSG_CHECKING([which hsqldb to use])
     if test "$with_system_hsqldb" = "yes"; then
@@ -9357,10 +9421,14 @@ if test "$with_java" != "no"; then
             AC_MSG_RESULT([no])
         fi
     fi
-    AC_SUBST(SYSTEM_HSQLDB)
-    AC_SUBST(HSQLDB_JAR)
-    AC_SUBST([HSQLDB_USE_JDBC_4_1])
+else
+    if test "$with_java" != "no" -a -z "$HSQLDB_JAR"; then
+        BUILD_TYPE="$BUILD_TYPE HSQLDB"
+    fi
 fi
+AC_SUBST(SYSTEM_HSQLDB)
+AC_SUBST(HSQLDB_JAR)
+AC_SUBST([HSQLDB_USE_JDBC_4_1])
 
 dnl ===================================================================
 dnl Check for PostgreSQL stuff
@@ -12635,7 +12703,7 @@ dnl ===================================================================
 dnl Test for the presence of Ant and that it works
 dnl ===================================================================
 
-if test "$ENABLE_JAVA" != "" -a "$NEED_ANT" = "TRUE"; then
+if test "$ENABLE_JAVA" != "" -a "$NEED_ANT" = "TRUE" -a "$cross_compiling" != "yes"; then
     ANT_HOME=; export ANT_HOME
     WITH_ANT_HOME=; export WITH_ANT_HOME
     if test -z "$with_ant_home" -a -n "$LODE_HOME" ; then
@@ -12726,8 +12794,6 @@ EOF
         PathFormat "$ANT"
         ANT="$formatted_path"
     fi
-    AC_SUBST(ANT_HOME)
-    AC_SUBST(ANT)
 
     dnl Checking for ant.jar
     if test "$ANT_HOME" != "NO_ANT_HOME"; then
@@ -12761,7 +12827,6 @@ EOF
         ANT_LIB="$formatted_path"
         AC_MSG_RESULT([Ant lib directory found.])
     fi
-    AC_SUBST(ANT_LIB)
 
     ant_minver=1.6.0
     ant_minminor1=`echo $ant_minver | cut -d"." -f2`
@@ -12783,9 +12848,13 @@ EOF
 
     rm -f conftest* core core.* *.core
 fi
+AC_SUBST(ANT)
+AC_SUBST(ANT_HOME)
+AC_SUBST(ANT_LIB)
 
 OOO_JUNIT_JAR=
-if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
+HAMCREST_JAR=
+if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no" -a "$cross_compiling" != "yes"; then
     AC_MSG_CHECKING([for JUnit 4])
     if test "$with_junit" = "yes"; then
         if test -n "$LODE_HOME" -a -e "$LODE_HOME/opt/share/java/junit.jar" ; then
@@ -12815,13 +12884,9 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
     fi
     rm -f conftest.class conftest.java
     if test $OOO_JUNIT_JAR != ""; then
-    BUILD_TYPE="$BUILD_TYPE QADEVOOO"
+        BUILD_TYPE="$BUILD_TYPE QADEVOOO"
     fi
-fi
-AC_SUBST(OOO_JUNIT_JAR)
 
-HAMCREST_JAR=
-if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
     AC_MSG_CHECKING([for included Hamcrest])
     printf 'import org.hamcrest.BaseDescription;' > conftest.java
     if "$JAVACOMPILER" -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
@@ -12852,6 +12917,7 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
     fi
     rm -f conftest.class conftest.java
 fi
+AC_SUBST(OOO_JUNIT_JAR)
 AC_SUBST(HAMCREST_JAR)
 
 
diff --git a/external/apache-commons/ExternalProject_apache_commons_logging.mk b/external/apache-commons/ExternalProject_apache_commons_logging.mk
index 640810d9c1ed..7c689d18c443 100644
--- a/external/apache-commons/ExternalProject_apache_commons_logging.mk
+++ b/external/apache-commons/ExternalProject_apache_commons_logging.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,apache_commons_logging,\
 $(call gb_ExternalProject_get_state_target,apache_commons_logging,build) :
 	$(call gb_Trace_StartRange,apache_commons_logging,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+	JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 	ANT_OPTS="$$ANT_OPTS -Dfile.encoding=ISO-8859-1" \
 	$(ICECREAM_RUN) "$(ANT)" \
 		$(if $(verbose),-v,-q) \
diff --git a/external/beanshell/ExternalProject_beanshell.mk b/external/beanshell/ExternalProject_beanshell.mk
index d6ce0af49ebe..450ac2b706dd 100644
--- a/external/beanshell/ExternalProject_beanshell.mk
+++ b/external/beanshell/ExternalProject_beanshell.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,beanshell,\
 $(call gb_ExternalProject_get_state_target,beanshell,build) :
 	$(call gb_Trace_StartRange,beanshell,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+	JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 	$(ICECREAM_RUN) "$(ANT)" \
 		$(if $(verbose),-v,-q) \
 		-f build.xml \
diff --git a/external/hsqldb/ExternalProject_hsqldb.mk b/external/hsqldb/ExternalProject_hsqldb.mk
index d253334549b7..4d5f5f8786f0 100644
--- a/external/hsqldb/ExternalProject_hsqldb.mk
+++ b/external/hsqldb/ExternalProject_hsqldb.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,hsqldb,\
 $(call gb_ExternalProject_get_state_target,hsqldb,build) :
 	$(call gb_Trace_StartRange,hsqldb,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build/build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk b/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk
index ffa12623d191..6a782b4dc4ff 100644
--- a/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_flow_engine,\
 $(call gb_ExternalProject_get_state_target,jfreereport_flow_engine,build) :
 	$(call gb_Trace_StartRange,jfreereport_flow_engine,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_flute.mk b/external/jfreereport/ExternalProject_jfreereport_flute.mk
index a9cb63819c87..120c98cbdbb4 100644
--- a/external/jfreereport/ExternalProject_jfreereport_flute.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_flute.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_flute,\
 $(call gb_ExternalProject_get_state_target,jfreereport_flute,build) :
 	$(call gb_Trace_StartRange,jfreereport_flute,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_libbase.mk b/external/jfreereport/ExternalProject_jfreereport_libbase.mk
index 2e236d192143..6d97ffa5762a 100644
--- a/external/jfreereport/ExternalProject_jfreereport_libbase.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_libbase.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_libbase,\
 $(call gb_ExternalProject_get_state_target,jfreereport_libbase,build) :
 	$(call gb_Trace_StartRange,jfreereport_libbase,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_libfonts.mk b/external/jfreereport/ExternalProject_jfreereport_libfonts.mk
index b14644c80c3b..9a6edf0b891f 100644
--- a/external/jfreereport/ExternalProject_jfreereport_libfonts.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_libfonts.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_libfonts,\
 $(call gb_ExternalProject_get_state_target,jfreereport_libfonts,build) :
 	$(call gb_Trace_StartRange,jfreereport_libfonts,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_libformula.mk b/external/jfreereport/ExternalProject_jfreereport_libformula.mk
index 95c650e8fe64..1182873e66aa 100644
--- a/external/jfreereport/ExternalProject_jfreereport_libformula.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_libformula.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_libformula,\
 $(call gb_ExternalProject_get_state_target,jfreereport_libformula,build) :
 	$(call gb_Trace_StartRange,jfreereport_libformula,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_liblayout.mk b/external/jfreereport/ExternalProject_jfreereport_liblayout.mk
index 519368c2b649..fb3f2b9fc67a 100644
--- a/external/jfreereport/ExternalProject_jfreereport_liblayout.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_liblayout.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_liblayout,\
 $(call gb_ExternalProject_get_state_target,jfreereport_liblayout,build) :
 	$(call gb_Trace_StartRange,jfreereport_liblayout,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_libloader.mk b/external/jfreereport/ExternalProject_jfreereport_libloader.mk
index 2b37d9a224b8..ddb34e3d8614 100644
--- a/external/jfreereport/ExternalProject_jfreereport_libloader.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_libloader.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_libloader,\
 $(call gb_ExternalProject_get_state_target,jfreereport_libloader,build) :
 	$(call gb_Trace_StartRange,jfreereport_libloader,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_librepository.mk b/external/jfreereport/ExternalProject_jfreereport_librepository.mk
index e95610b854c6..59fa203fbe63 100644
--- a/external/jfreereport/ExternalProject_jfreereport_librepository.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_librepository.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_librepository,\
 $(call gb_ExternalProject_get_state_target,jfreereport_librepository,build) :
 	$(call gb_Trace_StartRange,jfreereport_librepository,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_libserializer.mk b/external/jfreereport/ExternalProject_jfreereport_libserializer.mk
index 34614fb08b6a..1226e14206d4 100644
--- a/external/jfreereport/ExternalProject_jfreereport_libserializer.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_libserializer.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_libserializer,\
 $(call gb_ExternalProject_get_state_target,jfreereport_libserializer,build) :
 	$(call gb_Trace_StartRange,jfreereport_libserializer,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_libxml.mk b/external/jfreereport/ExternalProject_jfreereport_libxml.mk
index 478a75747dc6..295573ec67ab 100644
--- a/external/jfreereport/ExternalProject_jfreereport_libxml.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_libxml.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_libxml,\
 $(call gb_ExternalProject_get_state_target,jfreereport_libxml,build) :
 	$(call gb_Trace_StartRange,jfreereport_libxml,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build.xml \
diff --git a/external/jfreereport/ExternalProject_jfreereport_sac.mk b/external/jfreereport/ExternalProject_jfreereport_sac.mk
index b78d8a970b15..a33186183ee7 100644
--- a/external/jfreereport/ExternalProject_jfreereport_sac.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_sac.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,jfreereport_sac,\
 $(call gb_ExternalProject_get_state_target,jfreereport_sac,build) :
 	$(call gb_Trace_StartRange,jfreereport_sac,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build.xml \
diff --git a/external/languagetool/ExternalProject_languagetool.mk b/external/languagetool/ExternalProject_languagetool.mk
index 70b22a6aa10f..ed70df41ad69 100644
--- a/external/languagetool/ExternalProject_languagetool.mk
+++ b/external/languagetool/ExternalProject_languagetool.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_ExternalProject_use_jars,languagetool,\
 $(call gb_ExternalProject_get_state_target,languagetool,build) : \
         $(call gb_Jar_get_target,libreoffice)
 	cd "$(call gb_UnpackedTarball_get_dir,languagetool)" && \
+	JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 	$(ICECREAM_RUN) "$(ANT)" \
 		$(if $(verbose),-v,-q) \
 		-f build.xml \
diff --git a/external/rhino/ExternalProject_rhino.mk b/external/rhino/ExternalProject_rhino.mk
index 4d1b3e54409c..6ef30ca34f24 100644
--- a/external/rhino/ExternalProject_rhino.mk
+++ b/external/rhino/ExternalProject_rhino.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,rhino,\
 $(call gb_ExternalProject_get_state_target,rhino,build) :
 	$(call gb_Trace_StartRange,rhino,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
+		JAVA_HOME=$(JAVA_HOME_FOR_BUILD) \
 		$(ICECREAM_RUN) "$(ANT)" \
 			$(if $(verbose),-v,-q) \
 			-f build.xml \
diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk
index 1bbfeca166eb..9592fbbad6a6 100644
--- a/solenv/gbuild/Jar.mk
+++ b/solenv/gbuild/Jar.mk
@@ -64,7 +64,7 @@ define gb_Jar__command
 	$(gb_Jar_JARCOMMAND) cfm $(2) $(call gb_Jar_get_manifest_target,$(1)) \
 		META-INF $(PACKAGEROOTS) $(PACKAGEFILES) \
 	$(foreach root,$(PACKAGEDIRS),&& cd $(dir $(root)) && $(gb_Jar_JARCOMMAND) uf $(2) $(notdir $(root))) \
-	|| (rm $(2); false) )
+	|| (rm -f $(2); false) )
 endef
 
 # clean target reuses clean target of ClassSet
diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
index 2c3f2dc31c94..39887dee6e5b 100644
--- a/solenv/gbuild/JavaClassSet.mk
+++ b/solenv/gbuild/JavaClassSet.mk
@@ -17,7 +17,7 @@
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
 
-gb_JavaClassSet_JAVACCOMMAND = $(ICECREAM_RUN) $(JAVACOMPILER) $(JAVAFLAGS) \
+gb_JavaClassSet_JAVACCOMMAND = $(ICECREAM_RUN) $(JAVACOMPILER) $(JAVACFLAGS) \
     -encoding utf8 \
     --release $(1) \
     $(if $(JAVA_CLASSPATH_NOT_SET),-Xlint:-options)


More information about the Libreoffice-commits mailing list