[Libreoffice-commits] core.git: Branch 'feature/cib_contract891' - 4 commits - configure.ac Makefile.in solenv/gbuild

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Sep 2 01:32:28 UTC 2018


 Makefile.in                             |    2 
 configure.ac                            |  100 ++++++++++++++++++--------------
 solenv/gbuild/gbuild.mk                 |    4 +
 solenv/gbuild/platform/com_MSC_class.mk |    2 
 solenv/gbuild/platform/com_MSC_defs.mk  |    3 
 5 files changed, 66 insertions(+), 45 deletions(-)

New commits:
commit 59b19cf06bfd10fa03b4a0bd39e06694a4b54af1
Author:     Michael Stahl <mstahl at redhat.com>
AuthorDate: Wed Jul 23 13:55:32 2014 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Sun Sep 2 03:30:59 2018 +0200

    configure: stop calling native Win32 make "horribly slow"
    
    OTOH we do have sufficient data to start name-calling Cygwin make:
    http://lists.freedesktop.org/archives/libreoffice/2014-June/061727.html
    
    Change-Id: I290c39805d237c7da9a7aa954ec45a58c92fa2d2

diff --git a/configure.ac b/configure.ac
index f156951e7da1..7ee07eb3dae6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4906,7 +4906,7 @@ rm -rf $TESTGMAKEFILEFUNC
 AC_SUBST(HAVE_GNUMAKE_FILE_FUNC)
 AC_SUBST(GNUMAKE)
 
-_make_ver_check=`$GNUMAKE --version | grep LibreOffice`
+_make_ver_check=`$GNUMAKE --version | grep "Built for Windows"`
 STALE_MAKE=
 make_warning=
 if test "$_make_ver_check" = ""; then
@@ -12879,35 +12879,31 @@ fi
 
 if test "$STALE_MAKE" = "TRUE" -a "$build_os" = "cygwin"; then
 
-cygwin_arch=`echo $MACHTYPE | sed 's/-.*//'`
-if test "$cygwin_arch" = "x86_64"; then
-    download_make_url=http://users.freedesktop.org/~michael/x86_64/make
-else
-    download_make_url=http://dev-www.libreoffice.org/bin/cygwin/make
-fi
-
 cat << _EOS
 ****************************************************************************
 WARNING:
 Your make version is known to be horribly slow, and hard to debug
 problems with. To get a reasonably functional make please do:
 
-to install a pre-compiled binary make for cygwin
+to install a pre-compiled binary make for Win32
 
-mkdir -p /opt/lo/bin
-cd /opt/lo/bin
-wget $download_make_url
-chmod +x make
+ mkdir -p /opt/lo/bin
+ cd /opt/lo/bin
+ wget http://dev-www.libreoffice.org/bin/cygwin/make-85047eb-msvc.exe
+ cp make-85047eb-msvc.exe make
+ chmod +x make
 
 to install from source:
 place yourself in a working directory of you choice.
 
-git clone https://gerrit.libreoffice.org/p/gnu-make-lo.git
-cd gnu-make-lo
-autoreconf -i
-./configure --prefix=/opt/lo
-make
-make install
+ git clone git://git.savannah.gnu.org/make.git
+
+ [go to Start menu, click on "VS2012 x86 Native Tools Command Prompt"]
+ set PATH=%PATH%;C:\Cygwin\bin
+ cd .../path/to/make_git
+ build_w32.bat --without-guile
+
+should result in a WinRel/gnumake.exe
 
 Then re-run autogen.sh
 
commit 498384f37d31a6aeea5d37515100489e31ce9451
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu Jul 10 13:24:17 2014 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Sun Sep 2 03:30:50 2018 +0200

    Cleanup configure's make recommendations for stale make versions.
    
    Change-Id: Ib0c546e835bd3e6961632d4644901436061dc072

diff --git a/configure.ac b/configure.ac
index 629f98bfba82..f156951e7da1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12878,6 +12878,14 @@ fi
 
 
 if test "$STALE_MAKE" = "TRUE" -a "$build_os" = "cygwin"; then
+
+cygwin_arch=`echo $MACHTYPE | sed 's/-.*//'`
+if test "$cygwin_arch" = "x86_64"; then
+    download_make_url=http://users.freedesktop.org/~michael/x86_64/make
+else
+    download_make_url=http://dev-www.libreoffice.org/bin/cygwin/make
+fi
+
 cat << _EOS
 ****************************************************************************
 WARNING:
@@ -12888,14 +12896,15 @@ to install a pre-compiled binary make for cygwin
 
 mkdir -p /opt/lo/bin
 cd /opt/lo/bin
-wget http://dev-www.libreoffice.org/bin/cygwin/make
+wget $download_make_url
 chmod +x make
 
 to install from source:
 place yourself in a working directory of you choice.
 
-git clone git://anongit.freedesktop.org/libreoffice/contrib/dev-tools
-cd dev-tools/make-3.82-gbuild
+git clone https://gerrit.libreoffice.org/p/gnu-make-lo.git
+cd gnu-make-lo
+autoreconf -i
 ./configure --prefix=/opt/lo
 make
 make install
commit a884a62e6326ba5a868ae05f17acc93098681da1
Author:     Michael Stahl <mstahl at redhat.com>
AuthorDate: Wed Jun 4 22:21:53 2014 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Sun Sep 2 03:28:42 2018 +0200

    configure, gbuild: remove Cygwin paths from make environment
    
    All environment variables contain native Win32 paths.
    
    This allows building with Win32 make and Cygwin sh.exe,
    but Cygwin make cannot build any more with the Win32 entries in PATH.
    
    Requires adding "bash" detection to configure since /usr/bin/env
    can't be invoked by Win32 make and it's possible to install cygwin
    somewhere else than C:/cygwin.
    
    Change-Id: Ia8f4ee3c91222e8f5919cfbfc452f12ffbfadd40
    Reviewed-on: https://gerrit.libreoffice.org/9698
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/Makefile.in b/Makefile.in
index 206f5edbb400..f8663c033e03 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -11,7 +11,7 @@
 
 MAKECMDGOALS?=all
 
-SHELL=/usr/bin/env bash
+SHELL := @SHELL_BASH@
 SRCDIR := @SRC_ROOT@
 BUILDDIR := @BUILDDIR@
 GIT_BUILD := $(if $(wildcard $(SRCDIR)/.git),T)
diff --git a/configure.ac b/configure.ac
index 895e50151f35..629f98bfba82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,7 +39,7 @@ PathFormat()
             fi
         done
         if test "$pf_conv_to_dos" = "yes"; then
-            formatted_path=`cygpath -d "$formatted_path"`
+            formatted_path=`cygpath -sm "$formatted_path"`
             if test $? -ne 0;  then
                 AC_MSG_ERROR([path conversion failed for "$1".])
             fi
@@ -2219,15 +2219,15 @@ pathmunge ()
     if test -n "$1"; then
         if test "$build_os" = "cygwin"; then
             PathFormat "$1"
-            new_path=`cygpath -u "$formatted_path"`
+            new_path=`cygpath -sm "$formatted_path"`
         else
             new_path="$1"
         fi
         if ! echo "$LO_PATH" | $EGREP -q "(^|:)$1($|:)"; then
             if test "$2" = "after"; then
-                LO_PATH="$LO_PATH:$new_path"
+                LO_PATH="$LO_PATH${P_SEP}$new_path"
             else
-                LO_PATH="$new_path:$LO_PATH"
+                LO_PATH="$new_path${P_SEP}$LO_PATH"
             fi
         fi
         unset new_path
@@ -3508,8 +3508,7 @@ if test "$_os" = "WINNT"; then
             fi
         fi
 
-        VC_PRODUCT_DIR=`cygpath -d "$VC_PRODUCT_DIR"`
-        VC_PRODUCT_DIR=`cygpath -u "$VC_PRODUCT_DIR"`
+        VC_PRODUCT_DIR=`cygpath -sm "$VC_PRODUCT_DIR"`
         AC_MSG_RESULT([$VC_PRODUCT_DIR])
 
         dnl ===========================================================
@@ -3559,8 +3558,7 @@ if test "$_os" = "WINNT"; then
             fi
 
             # This gives us a posix path with 8.3 filename restrictions
-            CC=`cygpath -d "$CC"`
-            CC=`cygpath -u "$CC"`
+            CC=`cygpath -sm "$CC"`
         fi
 
         if test -n "$CC"; then
@@ -4808,17 +4806,11 @@ for a in "$MAKE" "$GNUMAKE" make gmake gnumake; do
         $a --version 2> /dev/null | grep GNU  2>&1 > /dev/null
         if test $? -eq 0;  then
             if test "$build_os" = "cygwin"; then
-                if test -n "$($a -v | grep 'Built for Windows')" ; then
-                    AC_MSG_NOTICE([$a is a native Win32 make, which is not supported on this old branch.])
-                    unset GNUMAKE
-                else
-                    GNUMAKE=`which $a`
-                    break
-                fi
+                GNUMAKE=$(cygpath -m $(which $(cygpath -u $a)))
             else
                 GNUMAKE=`which $a`
-                break
             fi
+            break
         fi
     fi
 done
@@ -4892,6 +4884,9 @@ fi
 # find if gnumake support file function
 AC_MSG_CHECKING([whether GNU make supports the 'file' function])
 TESTGMAKEFILEFUNC="`mktemp -d -t tst.XXXXXX`"
+if test "$build_os" = "cygwin"; then
+    TESTGMAKEFILEFUNC=`cygpath -m $TESTGMAKEFILEFUNC`
+fi
 $SED -e "s/<TAB>/$TAB/" > $TESTGMAKEFILEFUNC/Makefile << EOF
 \$(file >test.txt,Success )
 
@@ -4918,6 +4913,13 @@ if test "$_make_ver_check" = ""; then
    STALE_MAKE=TRUE
 fi
 
+if test "$build_os" = "cygwin"; then
+    SHELL_BASH=$(cygpath -m $(which bash))
+else
+    SHELL_BASH=`which bash`
+fi
+AC_SUBST(SHELL_BASH)
+
 HAVE_LD_HASH_STYLE=FALSE
 WITH_LINKER_HASH_STYLE=
 AC_MSG_CHECKING( for --hash-style gcc linker support )
@@ -5214,8 +5216,7 @@ if test "$build_os" = "cygwin"; then
     fi
 
     # Convert to posix path with 8.3 filename restrictions ( No spaces )
-    MIDL_PATH=`cygpath -d "$MIDL_PATH"`
-    MIDL_PATH=`cygpath -u "$MIDL_PATH"`
+    MIDL_PATH=`cygpath -sm "$MIDL_PATH"`
 
     dnl Check csc.exe
     AC_MSG_CHECKING([for csc.exe])
@@ -5229,8 +5230,7 @@ if test "$build_os" = "cygwin"; then
         AC_MSG_RESULT([$CSC_PATH/csc.exe])
     fi
 
-    CSC_PATH=`cygpath -d "$CSC_PATH"`
-    CSC_PATH=`cygpath -u "$CSC_PATH"`
+    CSC_PATH=`cygpath -sm "$CSC_PATH"`
 
     dnl Check al.exe
     AC_MSG_CHECKING([for al.exe])
@@ -5255,8 +5255,7 @@ if test "$build_os" = "cygwin"; then
         AC_MSG_RESULT([$AL_PATH/al.exe])
     fi
 
-    AL_PATH=`cygpath -d "$AL_PATH"`
-    AL_PATH=`cygpath -u "$AL_PATH"`
+    AL_PATH=`cygpath -sm "$AL_PATH"`
 
     dnl Check mscoree.lib / .NET Framework dir
     AC_MSG_CHECKING(.NET Framework)
@@ -6637,7 +6636,7 @@ if test "$ENABLE_JAVA" != ""; then
                 AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option pointing to a $bitness-bit JDK])
             fi
         else
-            test "$build_os" = "cygwin" && with_jdk_home=`cygpath -u "$with_jdk_home"`
+            test "$build_os" = "cygwin" && with_jdk_home=`cygpath -sm "$with_jdk_home"`
             howfound="you passed"
         fi
     fi
@@ -6671,8 +6670,7 @@ if test "$ENABLE_JAVA" != ""; then
         if test x`echo "$JAVAINTERPRETER" | $GREP -i '\.exe$'` = x; then
             JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
         fi
-        JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
-        JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
+        JAVAINTERPRETER=`cygpath -sm "$JAVAINTERPRETER"`
     elif test $_os = Darwin -a "$BITNESS_OVERRIDE" = ""; then
         dnl HACK:  There currently is only a 32 bit version of LibreOffice for Mac OS X,
         dnl and Tiger Java complains about -d32 while Snow Leopard Java needs it
@@ -6793,8 +6791,7 @@ if test "$ENABLE_JAVA" != ""; then
         if test x`echo "$JAVACOMPILER" | $GREP -i '\.exe$'` = x; then
             JAVACOMPILER="${JAVACOMPILER}.exe"
         fi
-        JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
-        JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
+        JAVACOMPILER=`cygpath -sm "$JAVACOMPILER"`
     fi
 
     if test `$JAVACOMPILER -version 2>&1 | $GREP -c "Eclipse Java Compiler"` -gt 0; then
@@ -6838,8 +6835,7 @@ if test "$ENABLE_JAVA" != ""; then
         if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then
             JAVADOC="${JAVADOC}.exe"
         fi
-        JAVADOC=`cygpath -d "$JAVADOC"`
-        JAVADOC=`cygpath -u "$JAVADOC"`
+        JAVADOC=`cygpath -sm "$JAVADOC"`
     fi
 
     if test `$JAVADOC --version 2>&1 | $GREP -c "gjdoc"` -gt 0; then
@@ -7499,6 +7495,9 @@ AC_PATH_PROG(GPERF, gperf)
 if test -z "$GPERF"; then
     AC_MSG_ERROR([gperf not found but needed. Install it.])
 fi
+if test "$build_os" = "cygwin"; then
+    GPERF=`cygpath -m $GPERF`
+fi
 AC_MSG_CHECKING([gperf version])
 if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then
     AC_MSG_RESULT([OK])
@@ -9789,6 +9788,9 @@ else
 fi
 
 AC_PATH_PROG(FLEX, flex)
+if test "$build_os" = "cygwin"; then
+    FLEX=`cygpath -m $FLEX`
+fi
 if test -z "$FLEX"; then
     AC_MSG_ERROR([no flex found in \$PATH, install it])
 else
@@ -9829,6 +9831,10 @@ else
     GNUPATCH=$PATCH
 fi
 
+if test "$build_os" = "cygwin"; then
+    GNUPATCH=`cygpath -m $GNUPATCH`
+fi
+
 dnl We also need to check for --with-gnu-cp
 
 if test -z "$with_gnu_cp"; then
@@ -9849,6 +9855,10 @@ else
     fi
 fi
 
+if test "$build_os" = "cygwin"; then
+    GNUCP=`cygpath -m $GNUCP`
+fi
+
 AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
 if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
     AC_MSG_RESULT([yes])
@@ -11936,6 +11946,7 @@ if test "$ENABLE_JAVA" != ""; then
         AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
     else
         if test "$_os" = "WINNT"; then
+            # AC_PATH_PROGS needs unix path
             with_ant_home=`cygpath -u "$with_ant_home"`
         fi
         AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
@@ -12008,7 +12019,7 @@ EOF
         PathFormat "$ANT_HOME"
         ANT_HOME="$formatted_path"
         PathFormat "$ANT"
-        ANT="$ANT"
+        ANT="$formatted_path"
     fi
     AC_SUBST(ANT_HOME)
     AC_SUBST(ANT)
@@ -12779,6 +12790,8 @@ else
         ;;
 
     cygwin*)
+        # Win32 make needs native paths
+        LO_PATH=`cygpath -p -m "$PATH"`
         pathmunge "$DOTNET_FRAMEWORK_HOME/bin" "before"
         pathmunge "$ASM_HOME" "before"
         pathmunge "$WINDOWS_SDK_HOME/bin" "before"
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 93eda58ea3ac..369c8d28a1e1 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -53,8 +53,12 @@ MAKEFLAGS += r
 ifdef gb_SHELL
 SHELL := $(gb_SHELL)
 else
+ifeq ($(OS_FOR_BUILD),WNT)
+SHELL := $(shell cygpath -m /bin/sh)
+else
 SHELL := /bin/sh
 endif
+endif
 
 true := T
 false :=
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 113c88b48f3c..a7a5cf89acfe 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -392,7 +392,7 @@ endef
 # CppunitTest class
 
 gb_CppunitTest_DEFS := -D_DLL
-gb_CppunitTest_CPPTESTPRECOMMAND := $(gb_Helper_set_ld_path):"$(shell cygpath -u $(gb_Library_DLLDIR)):$(shell cygpath -u $(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll,ReleaseDll))"
+gb_CppunitTest_CPPTESTPRECOMMAND := $(gb_Helper_set_ld_path);"$(shell cygpath -w $(gb_Library_DLLDIR));$(shell cygpath -w $(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll,ReleaseDll))"
 
 gb_CppunitTest_get_filename = test_$(1).dll
 gb_CppunitTest_get_ilibfilename = itest_$(1).lib
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index c4d640823729..7efedf2da758 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -293,6 +293,6 @@ gb_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL)
 
 # Helper class
 
-gb_Helper_set_ld_path := PATH="$$PATH:$(shell cygpath -u $(INSTDIR)/$(LIBO_URE_LIB_FOLDER)):$(shell cygpath -u $(INSTDIR)/$(LIBO_BIN_FOLDER))"
+gb_Helper_set_ld_path := PATH="$$PATH;$(shell cygpath -w $(INSTDIR)/$(LIBO_URE_LIB_FOLDER));$(shell cygpath -w $(INSTDIR)/$(LIBO_BIN_FOLDER))"
 
 # vim: set noet sw=4:
commit bdbf38c8f245460f9380de61c308c2c5fa896791
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Nov 29 17:27:21 2013 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Sun Sep 2 03:18:51 2018 +0200

    Fix Cygwin PATH composition
    
    Adding Windows-style paths (C:\foo\bar) happened to appear to work, as Cygwin
    translated that into two paths C;\foo\bar (where the former typically just does
    not exist and the latter is relative to the current drive, which is typically
    C).
    
    In theory, wrapping in $(shell cygpath -u ...) should not be necessary, but in
    practice S is set to a Windows-syte path (which is probably a bug?) after the
    paths of PATH would be shortened to use $I/$S/$W, which is prevented with the
    wrapper.
    
    In theory, the shell variable assignment PATH="$$PATH:... would more
    idiomatically read PATH=$$PATH:"... but e.g.
    unoidl/CustomTarget_unoidl-write_test.mk passes this variable assignment as a
    command line argument to exectest.pl in which case it would potentially be split
    into multiple arguments.
    
    Change-Id: If870e9eba8b650fe75b324ac54c49891d19fcc55

diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 603f0e0211d6..113c88b48f3c 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -392,7 +392,7 @@ endef
 # CppunitTest class
 
 gb_CppunitTest_DEFS := -D_DLL
-gb_CppunitTest_CPPTESTPRECOMMAND := $(gb_Helper_set_ld_path):"$(shell cygpath -w $(gb_Library_DLLDIR)):$(shell cygpath -w $(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll,ReleaseDll))"
+gb_CppunitTest_CPPTESTPRECOMMAND := $(gb_Helper_set_ld_path):"$(shell cygpath -u $(gb_Library_DLLDIR)):$(shell cygpath -u $(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll,ReleaseDll))"
 
 gb_CppunitTest_get_filename = test_$(1).dll
 gb_CppunitTest_get_ilibfilename = itest_$(1).lib
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index f002d51f8e71..c4d640823729 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -293,7 +293,6 @@ gb_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL)
 
 # Helper class
 
-# need windows path with backslashes here
-gb_Helper_set_ld_path := PATH="$(PATH);$(shell cygpath -w $(INSTDIR)/$(LIBO_URE_LIB_FOLDER));$(shell cygpath -w $(INSTDIR)/$(LIBO_BIN_FOLDER))"
+gb_Helper_set_ld_path := PATH="$$PATH:$(shell cygpath -u $(INSTDIR)/$(LIBO_URE_LIB_FOLDER)):$(shell cygpath -u $(INSTDIR)/$(LIBO_BIN_FOLDER))"
 
 # vim: set noet sw=4:


More information about the Libreoffice-commits mailing list