summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-01-06 21:28:17 +0100
committerTor Lillqvist <tml@collabora.com>2016-01-07 08:44:28 +0000
commite9cd5087366f930efd89a95c0a5610fe8f375581 (patch)
tree77e83e7d88a8f6cf4a485b5f70686588661bc7a8
parent2e11a3e03ed37eb86cd87f68191c48d2a6e442cb (diff)
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@libreoffice.org> Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--Makefile.in2
-rw-r--r--config_host.mk.in3
-rw-r--r--configure.ac13
-rw-r--r--external/openssl/UnpackedTarball_openssl.mk2
-rwxr-xr-xexternal/python3/ExternalProject_python3.mk2
-rw-r--r--external/python33/ExternalProject_python3.mk2
-rw-r--r--postprocess/CustomTarget_images.mk6
-rw-r--r--postprocess/CustomTarget_registry.mk4
-rw-r--r--pyuno/CustomTarget_zipcore.mk2
-rw-r--r--solenv/gbuild/GeneratedPackage.mk2
-rw-r--r--solenv/gbuild/Module.mk2
-rw-r--r--solenv/gbuild/platform/com_GCC_class.mk2
-rw-r--r--solenv/gbuild/platform/com_MSC_class.mk2
13 files changed, 26 insertions, 18 deletions
diff --git a/Makefile.in b/Makefile.in
index 3bfd09f4aebd..aec7ea6751ce 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 9b59af3f6014..06ea207884be 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -184,7 +184,7 @@ export EPM_FLAGS=@EPM_FLAGS@
export ETONYEK_CFLAGS=$(gb_SPACE)@ETONYEK_CFLAGS@
export ETONYEK_LIBS=$(gb_SPACE)@ETONYEK_LIBS@
export debug=@ENABLE_DEBUG@
-@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@
@@ -492,6 +492,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 605726d10eee..35cffc131f1e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12772,19 +12772,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 b44f576e7715..6cc498781b31 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 200588fab072..76f8d886b314 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 098b1ea6957e..a3c4586a49a8 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 de2c21d1f3dd..d86b6009d6f8 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 7992a4e90901..6a9e2d19e457 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 0efd83093ac3..42b37a831b04 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 751e3296fb93..255295607fcf 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 c57492d9a822..468b80b4940a 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 b7c1e6537184..099c5d385fbe 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 2ed964955937..4dbdb903b49f 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 \
)