Kaydet (Commit) b949efe7 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Make check for ant a bit more robust

...by cd'ing to an empty dir first.  As reported in the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2018-June/080400.html> "Ant
not working ???", there appear to be Java toolchains that can be disturbed by
filenames with "accented" (non-UTF8?) characters, which people may happen to put
in their checked-out SRCDIR.

Change-Id: I9cf3523f4816c3b0e2d6f67fc490c2514c8e1263
Reviewed-on: https://gerrit.libreoffice.org/56158
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 105edc74
......@@ -11699,6 +11699,9 @@ if test "$ENABLE_JAVA" != "" -a "$NEED_ANT" = "TRUE"; then
done
AC_MSG_CHECKING([if $ANT works])
mkdir -p conftest.dir
a_cwd=$(pwd)
cd conftest.dir
cat > conftest.java << EOF
public class conftest {
int testmethod(int a, int b) {
......@@ -11733,7 +11736,8 @@ EOF
cat conftest.xml >&5
AC_MSG_ERROR([Ant does not work - Some Java projects will not build!])
fi
rm -f conftest* core core.* *.core
cd "$a_cwd"
rm -fr conftest.dir
fi
if test -z "$ANT_HOME"; then
ANT_HOME="NO_ANT_HOME"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment