[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - config_host.mk.in configure.ac external/openssl external/python3 external/python33 Makefile.in postprocess/CustomTarget_images.mk postprocess/CustomTarget_registry.mk pyuno/CustomTarget_zipcore.mk solenv/gbuild

Michael Stahl mstahl at redhat.com
Thu Jan 7 06:35:15 PST 2016


 Makefile.in                                  |    2 +-
 config_host.mk.in                            |    3 ++-
 configure.ac                                 |   13 ++++++++++---
 external/openssl/UnpackedTarball_openssl.mk  |    2 +-
 external/python3/ExternalProject_python3.mk  |    2 +-
 external/python33/ExternalProject_python3.mk |    2 +-
 postprocess/CustomTarget_images.mk           |    6 +++---
 postprocess/CustomTarget_registry.mk         |    4 ++--
 pyuno/CustomTarget_zipcore.mk                |    2 +-
 solenv/gbuild/GeneratedPackage.mk            |    2 +-
 solenv/gbuild/Module.mk                      |    2 +-
 solenv/gbuild/platform/com_GCC_class.mk      |    2 +-
 solenv/gbuild/platform/com_MSC_class.mk      |    2 +-
 13 files changed, 26 insertions(+), 18 deletions(-)

New commits:
commit c173aba39c3e49f4c9b8f85d0c2ce08664a38f0f
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jan 6 21:28:17 2016 +0100

    configure: hard-code /usr/bin/{sort,find} for Cygwin
    
    ... to avoid calling C:/Windows/system32/{sort,find}.exe, if those
    happen to be first in PATH.
    
    On a Windows 7 system, the other conflicts appear to be harmless,
    we don't use "more", "expand", "timeout", "whoami".
    
    Change-Id: Iceefeb7ee6725291b04c0eba465991bb1df96b57
    Reviewed-on: https://gerrit.libreoffice.org/21175
    Tested-by: Jenkins <ci at libreoffice.org>
    Tested-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    (cherry picked from commit e9cd5087366f930efd89a95c0a5610fe8f375581)
    Reviewed-on: https://gerrit.libreoffice.org/21205
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/Makefile.in b/Makefile.in
index 2a4748e..9803706 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -185,7 +185,7 @@ distclean : clean compilerplugins-clean
         $(BUILDDIR)/ios/lo.xcconfig \
         $(BUILDDIR)/lo.xcent \
         $(BUILDDIR)/sysui/desktop/macosx/Info.plist
-	find $(SRCDIR)/solenv/gdb -name "*.pyc" -exec rm {} \;
+	$(FIND) $(SRCDIR)/solenv/gdb -name "*.pyc" -exec rm {} \;
 
 #
 # custom command
diff --git a/config_host.mk.in b/config_host.mk.in
index 33c26b7..139e3af 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -185,7 +185,7 @@ export EPM_FLAGS=@EPM_FLAGS@
 export ETONYEK_CFLAGS=$(gb_SPACE)@ETONYEK_CFLAGS@
 export ETONYEK_LIBS=$(gb_SPACE)@ETONYEK_LIBS@
 export debug=@ENABLE_DEBUG@
- at x_Cygwin@ export FIND=@WIN_FIND@
+export FIND=@FIND@
 export FIREBIRD_CFLAGS=$(gb_SPACE)@FIREBIRD_CFLAGS@
 export FIREBIRD_LIBS=$(gb_SPACE)@FIREBIRD_LIBS@
 export FLEX=@FLEX@
@@ -494,6 +494,7 @@ export SERF_CFLAGS=$(gb_SPACE)@SERF_CFLAGS@
 export SERF_LIBS=$(gb_SPACE)@SERF_LIBS@
 export SHOWINCLUDES_PREFIX=@SHOWINCLUDES_PREFIX@
 export SOLARINC=@SOLARINC@
+export SORT=@SORT@
 export SPLIT_APP_MODULES=@SPLIT_APP_MODULES@
 export SPLIT_OPT_FEATURES=@SPLIT_OPT_FEATURES@
 export SRCDIR=@SRC_ROOT@
diff --git a/configure.ac b/configure.ac
index 96a6048..63bec8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12826,19 +12826,26 @@ if test "$build_os" = "cygwin"; then
     if test "$BITNESS_OVERRIDE" = 64; then
         ATL_LIB="$ATL_LIB/amd64"
     fi
+    # sort.exe and find.exe also exist in C:/Windows/system32 so need /usr/bin/
+    PathFormat "/usr/bin/find.exe"
+    FIND="$formatted_path"
+    PathFormat "/usr/bin/sort.exe"
+    SORT="$formatted_path"
     PathFormat "/usr/bin/grep.exe"
     WIN_GREP="$formatted_path"
-    PathFormat "/usr/bin/find.exe"
-    WIN_FIND="$formatted_path"
     PathFormat "/usr/bin/ls.exe"
     WIN_LS="$formatted_path"
     PathFormat "/usr/bin/touch.exe"
     WIN_TOUCH="$formatted_path"
+else
+    FIND=find
+    SORT=sort
 fi
 
 AC_SUBST(ATL_INCLUDE)
 AC_SUBST(ATL_LIB)
-AC_SUBST(WIN_FIND)
+AC_SUBST(FIND)
+AC_SUBST(SORT)
 AC_SUBST(WIN_GREP)
 AC_SUBST(WIN_LS)
 AC_SUBST(WIN_TOUCH)
diff --git a/external/openssl/UnpackedTarball_openssl.mk b/external/openssl/UnpackedTarball_openssl.mk
index b44f576..6cc4987 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -16,7 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,openssl,$(OPENSSL_TARBALL),,openssl
 ifeq ($(OS_FOR_BUILD),WNT)
 $(eval $(call gb_UnpackedTarball_set_pre_action,openssl,\
 	cd include/openssl && \
-	for header in `find . -type l` \; do \
+	for header in `$(FIND) . -type l` \; do \
 		cp --remove-destination `readlink $$$$header` $$$$header \; \
 	done && cd -))
 endif
diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk
index 200588f..76f8d88 100755
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -128,7 +128,7 @@ $(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_
 		$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
 		@executable_path/../../../../LibreOfficePython \
 		$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/Resources/Python.app/Contents/MacOS/LibreOfficePython
-	for file in $(shell find $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload -name "*.so") ; do \
+	for file in $(shell $(FIND) $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload -name "*.so") ; do \
 	$(INSTALL_NAME_TOOL) -change \
 		$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
 		@loader_path/../../../LibreOfficePython $$file ; done
diff --git a/external/python33/ExternalProject_python3.mk b/external/python33/ExternalProject_python3.mk
index 098b1ea..a3c4586 100644
--- a/external/python33/ExternalProject_python3.mk
+++ b/external/python33/ExternalProject_python3.mk
@@ -126,7 +126,7 @@ $(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_
 		$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
 		@executable_path/../../../../LibreOfficePython \
 		$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/Resources/Python.app/Contents/MacOS/LibreOfficePython
-	for file in $(shell find $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload -name "*.so") ; do \
+	for file in $(shell $(FIND) $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload -name "*.so") ; do \
 	$(INSTALL_NAME_TOOL) -change \
 		$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
 		@loader_path/../../../LibreOfficePython $$file ; done
diff --git a/postprocess/CustomTarget_images.mk b/postprocess/CustomTarget_images.mk
index de2c21d..d86b600 100644
--- a/postprocess/CustomTarget_images.mk
+++ b/postprocess/CustomTarget_images.mk
@@ -55,10 +55,10 @@ $(packimages_DIR)/%.zip : \
 $(packimages_DIR)/commandimagelist.ilst :
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
 	$(call gb_Helper_abbreviate_dirs, \
-		find $(SRCDIR)/icon-themes -name "*.png" -o -name "*.svg" | \
-			grep -e '/cmd/' | sed 's#^.*/icon-themes/[^/]*##' | sort | uniq | \
+		$(FIND) $(SRCDIR)/icon-themes -name "*.png" -o -name "*.svg" | \
+			grep -e '/cmd/' | sed 's#^.*/icon-themes/[^/]*##' | $(SORT) | uniq | \
 			sed "s#^#%MODULE%#" | \
-			LC_ALL=C sort > $@.tmp && \
+			LC_ALL=C $(SORT) > $@.tmp && \
 		$(PERL) $(SRCDIR)/solenv/bin/diffmv.pl $@.tmp $@ \
 			$(if $(findstring s,$(MAKEFLAGS)),2> /dev/null))
 
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index 7992a4e..6a9e2d1 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -579,7 +579,7 @@ $(call gb_CustomTarget_get_workdir,postprocess/registry)/Langpack-%.list :
 $(call gb_CustomTarget_get_workdir,postprocess/registry)/fcfg_langpack_%.list :
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),AWK,2)
 	$(call gb_Helper_abbreviate_dirs,\
-	    find $(call gb_XcuResTarget_get_target,fcfg_langpack/$*/)\
+	    $(FIND) $(call gb_XcuResTarget_get_target,fcfg_langpack/$*/) \
 	         -name *.xcu -size +0c \
 	        | $(gb_AWK) 'BEGIN{print "<list>"} \
 	                    {print "<filename>"$$0"</filename>"} \
@@ -589,7 +589,7 @@ $(call gb_CustomTarget_get_workdir,postprocess/registry)/fcfg_langpack_%.list :
 $(call gb_CustomTarget_get_workdir,postprocess/registry)/registry_%.list :
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),AWK,2)
 	$(call gb_Helper_abbreviate_dirs,\
-	    find $(call gb_XcuResTarget_get_target,registry/$*/)\
+	    $(FIND) $(call gb_XcuResTarget_get_target,registry/$*/) \
 	         $(if $(filter DBCONNECTIVITY,$(BUILD_TYPE)),\
 	             $(foreach driver,$(postprocess_DRIVERS),\
 	                 $(call gb_XcuResTarget_get_target,$(driver)/$*/)))\
diff --git a/pyuno/CustomTarget_zipcore.mk b/pyuno/CustomTarget_zipcore.mk
index 0efd830..42b37a8 100644
--- a/pyuno/CustomTarget_zipcore.mk
+++ b/pyuno/CustomTarget_zipcore.mk
@@ -29,6 +29,6 @@ $(call gb_CustomTarget_get_workdir,pyuno/zipcore)/$(pyuno_PYTHON_ARCHIVE_NAME) \
 		: $(call gb_ExternalPackage_get_target,python3) \
 		| $(call gb_CustomTarget_get_workdir,pyuno/zipcore)/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ZIP,1)
-	cd $(pyuno_PYTHON_LIB_DIR) && zip -q $@ $(shell cd $(pyuno_PYTHON_LIB_DIR) && find . -type f | grep -v "\.pyc" | grep -v "\.py~" | grep -v .orig | grep -v _failed)
+	cd $(pyuno_PYTHON_LIB_DIR) && zip -q $@ $(shell cd $(pyuno_PYTHON_LIB_DIR) && $(FIND) . -type f | grep -v "\.pyc" | grep -v "\.py~" | grep -v .orig | grep -v _failed)
 
 # vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/GeneratedPackage.mk b/solenv/gbuild/GeneratedPackage.mk
index 751e329..2552956 100644
--- a/solenv/gbuild/GeneratedPackage.mk
+++ b/solenv/gbuild/GeneratedPackage.mk
@@ -33,7 +33,7 @@ $(call gb_Helper_abbreviate_dirs,\
 	rm -rf $(foreach pair,$(PACKAGE_DIRS),$(call gb_GeneratedPackage__get_destdir,$(pair))) && \
 	$(foreach pair,$(PACKAGE_DIRS),\
 		$(call gb_GeneratedPackage__command_cp,$(call gb_GeneratedPackage__get_srcdir,$(pair)),$(call gb_GeneratedPackage__get_destdir,$(pair))) &&) \
-	find \
+	$(FIND) \
 		$(foreach pair,$(PACKAGE_DIRS),$(call gb_GeneratedPackage__get_destdir,$(pair))) \
 		\( -type f -o -type l \) -print \
 		> $(1) \
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index c57492d..468b80b 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -202,7 +202,7 @@ $(WORKDIR)/pot.done : $(foreach exec,cfgex helpex localize transex3 \
 	$(call gb_Output_announce,$(subst .pot,,$(subst $(WORKDIR)/,,$@)),$(true),POT,1)
 	$(call gb_Helper_abbreviate_dirs,\
 		mkdir -p $(dir $@) && $(call gb_Helper_execute,localize) $(SRCDIR) $(dir $@)/pot \
-		&& find $(dir $@)/pot -type f -printf "%P\n" | sed -e "s/\.pot/.po/" > $(dir $@)/LIST \
+		&& $(FIND) $(dir $@)/pot -type f -printf "%P\n" | sed -e "s/\.pot/.po/" > $(dir $@)/LIST \
 		&& touch $@)
 
 # enable if: no "-MODULE/" defined AND ["all" defined OR "MODULE/" defined]
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index b7c1e65..099c5d3 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -224,7 +224,7 @@ gb_ICU_PRECOMMAND := $(call gb_Helper_extend_ld_path,$(WORKDIR_FOR_BUILD)/Unpack
 # Mac OS X sort(1) cannot read a response file
 define gb_UIConfig__command
 $(call gb_Helper_abbreviate_dirs,\
-	sort -u $(UI_IMAGELISTS) /dev/null > $@ \
+	$(SORT) -u $(UI_IMAGELISTS) /dev/null > $@ \
 )
 
 endef
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 2ed9649..4dbdb90 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -578,7 +578,7 @@ define gb_UIConfig__command
 $(call gb_Helper_abbreviate_dirs,\
 	RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,$(if $(UI_IMAGELISTS),$(strip $(UI_IMAGELISTS)),/dev/null)) \
 	&& tr " " "\000" < $$RESPONSEFILE | tr -d "\r\n" > $$RESPONSEFILE.0 \
-	&& sort -u --files0-from=$$RESPONSEFILE.0 > $@ \
+	&& $(SORT) -u --files0-from=$$RESPONSEFILE.0 > $@ \
 	&& rm $$RESPONSEFILE $$RESPONSEFILE.0 \
 )
 


More information about the Libreoffice-commits mailing list