Kaydet (Commit) e9cd5087 authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Tor Lillqvist

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/21175Tested-by: 's avatarJenkins <ci@libreoffice.org>
Tested-by: 's avatarTor Lillqvist <tml@collabora.com>
Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
üst 2e11a3e0
...@@ -185,7 +185,7 @@ distclean : clean compilerplugins-clean ...@@ -185,7 +185,7 @@ distclean : clean compilerplugins-clean
$(BUILDDIR)/ios/lo.xcconfig \ $(BUILDDIR)/ios/lo.xcconfig \
$(BUILDDIR)/lo.xcent \ $(BUILDDIR)/lo.xcent \
$(BUILDDIR)/sysui/desktop/macosx/Info.plist $(BUILDDIR)/sysui/desktop/macosx/Info.plist
find $(SRCDIR)/solenv/gdb -name "*.pyc" -exec rm {} \; $(FIND) $(SRCDIR)/solenv/gdb -name "*.pyc" -exec rm {} \;
# #
# custom command # custom command
......
...@@ -184,7 +184,7 @@ export EPM_FLAGS=@EPM_FLAGS@ ...@@ -184,7 +184,7 @@ export EPM_FLAGS=@EPM_FLAGS@
export ETONYEK_CFLAGS=$(gb_SPACE)@ETONYEK_CFLAGS@ export ETONYEK_CFLAGS=$(gb_SPACE)@ETONYEK_CFLAGS@
export ETONYEK_LIBS=$(gb_SPACE)@ETONYEK_LIBS@ export ETONYEK_LIBS=$(gb_SPACE)@ETONYEK_LIBS@
export debug=@ENABLE_DEBUG@ export debug=@ENABLE_DEBUG@
@x_Cygwin@ export FIND=@WIN_FIND@ export FIND=@FIND@
export FIREBIRD_CFLAGS=$(gb_SPACE)@FIREBIRD_CFLAGS@ export FIREBIRD_CFLAGS=$(gb_SPACE)@FIREBIRD_CFLAGS@
export FIREBIRD_LIBS=$(gb_SPACE)@FIREBIRD_LIBS@ export FIREBIRD_LIBS=$(gb_SPACE)@FIREBIRD_LIBS@
export FLEX=@FLEX@ export FLEX=@FLEX@
...@@ -492,6 +492,7 @@ export SERF_CFLAGS=$(gb_SPACE)@SERF_CFLAGS@ ...@@ -492,6 +492,7 @@ export SERF_CFLAGS=$(gb_SPACE)@SERF_CFLAGS@
export SERF_LIBS=$(gb_SPACE)@SERF_LIBS@ export SERF_LIBS=$(gb_SPACE)@SERF_LIBS@
export SHOWINCLUDES_PREFIX=@SHOWINCLUDES_PREFIX@ export SHOWINCLUDES_PREFIX=@SHOWINCLUDES_PREFIX@
export SOLARINC=@SOLARINC@ export SOLARINC=@SOLARINC@
export SORT=@SORT@
export SPLIT_APP_MODULES=@SPLIT_APP_MODULES@ export SPLIT_APP_MODULES=@SPLIT_APP_MODULES@
export SPLIT_OPT_FEATURES=@SPLIT_OPT_FEATURES@ export SPLIT_OPT_FEATURES=@SPLIT_OPT_FEATURES@
export SRCDIR=@SRC_ROOT@ export SRCDIR=@SRC_ROOT@
......
...@@ -12772,19 +12772,26 @@ if test "$build_os" = "cygwin"; then ...@@ -12772,19 +12772,26 @@ if test "$build_os" = "cygwin"; then
if test "$BITNESS_OVERRIDE" = 64; then if test "$BITNESS_OVERRIDE" = 64; then
ATL_LIB="$ATL_LIB/amd64" ATL_LIB="$ATL_LIB/amd64"
fi 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" PathFormat "/usr/bin/grep.exe"
WIN_GREP="$formatted_path" WIN_GREP="$formatted_path"
PathFormat "/usr/bin/find.exe"
WIN_FIND="$formatted_path"
PathFormat "/usr/bin/ls.exe" PathFormat "/usr/bin/ls.exe"
WIN_LS="$formatted_path" WIN_LS="$formatted_path"
PathFormat "/usr/bin/touch.exe" PathFormat "/usr/bin/touch.exe"
WIN_TOUCH="$formatted_path" WIN_TOUCH="$formatted_path"
else
FIND=find
SORT=sort
fi fi
AC_SUBST(ATL_INCLUDE) AC_SUBST(ATL_INCLUDE)
AC_SUBST(ATL_LIB) AC_SUBST(ATL_LIB)
AC_SUBST(WIN_FIND) AC_SUBST(FIND)
AC_SUBST(SORT)
AC_SUBST(WIN_GREP) AC_SUBST(WIN_GREP)
AC_SUBST(WIN_LS) AC_SUBST(WIN_LS)
AC_SUBST(WIN_TOUCH) AC_SUBST(WIN_TOUCH)
......
...@@ -16,7 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,openssl,$(OPENSSL_TARBALL),,openssl ...@@ -16,7 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,openssl,$(OPENSSL_TARBALL),,openssl
ifeq ($(OS_FOR_BUILD),WNT) ifeq ($(OS_FOR_BUILD),WNT)
$(eval $(call gb_UnpackedTarball_set_pre_action,openssl,\ $(eval $(call gb_UnpackedTarball_set_pre_action,openssl,\
cd include/openssl && \ cd include/openssl && \
for header in `find . -type l` \; do \ for header in `$(FIND) . -type l` \; do \
cp --remove-destination `readlink $$$$header` $$$$header \; \ cp --remove-destination `readlink $$$$header` $$$$header \; \
done && cd -)) done && cd -))
endif endif
......
...@@ -128,7 +128,7 @@ $(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_ ...@@ -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 \ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
@executable_path/../../../../LibreOfficePython \ @executable_path/../../../../LibreOfficePython \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/Resources/Python.app/Contents/MacOS/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 \ $(INSTALL_NAME_TOOL) -change \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
@loader_path/../../../LibreOfficePython $$file ; done @loader_path/../../../LibreOfficePython $$file ; done
......
...@@ -126,7 +126,7 @@ $(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_ ...@@ -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 \ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
@executable_path/../../../../LibreOfficePython \ @executable_path/../../../../LibreOfficePython \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/Resources/Python.app/Contents/MacOS/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 \ $(INSTALL_NAME_TOOL) -change \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
@loader_path/../../../LibreOfficePython $$file ; done @loader_path/../../../LibreOfficePython $$file ; done
......
...@@ -55,10 +55,10 @@ $(packimages_DIR)/%.zip : \ ...@@ -55,10 +55,10 @@ $(packimages_DIR)/%.zip : \
$(packimages_DIR)/commandimagelist.ilst : $(packimages_DIR)/commandimagelist.ilst :
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
$(call gb_Helper_abbreviate_dirs, \ $(call gb_Helper_abbreviate_dirs, \
find $(SRCDIR)/icon-themes -name "*.png" -o -name "*.svg" | \ $(FIND) $(SRCDIR)/icon-themes -name "*.png" -o -name "*.svg" | \
grep -e '/cmd/' | sed 's#^.*/icon-themes/[^/]*##' | sort | uniq | \ grep -e '/cmd/' | sed 's#^.*/icon-themes/[^/]*##' | $(SORT) | uniq | \
sed "s#^#%MODULE%#" | \ sed "s#^#%MODULE%#" | \
LC_ALL=C sort > $@.tmp && \ LC_ALL=C $(SORT) > $@.tmp && \
$(PERL) $(SRCDIR)/solenv/bin/diffmv.pl $@.tmp $@ \ $(PERL) $(SRCDIR)/solenv/bin/diffmv.pl $@.tmp $@ \
$(if $(findstring s,$(MAKEFLAGS)),2> /dev/null)) $(if $(findstring s,$(MAKEFLAGS)),2> /dev/null))
......
...@@ -579,7 +579,7 @@ $(call gb_CustomTarget_get_workdir,postprocess/registry)/Langpack-%.list : ...@@ -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_CustomTarget_get_workdir,postprocess/registry)/fcfg_langpack_%.list :
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),AWK,2) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),AWK,2)
$(call gb_Helper_abbreviate_dirs,\ $(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 \ -name *.xcu -size +0c \
| $(gb_AWK) 'BEGIN{print "<list>"} \ | $(gb_AWK) 'BEGIN{print "<list>"} \
{print "<filename>"$$0"</filename>"} \ {print "<filename>"$$0"</filename>"} \
...@@ -589,7 +589,7 @@ $(call gb_CustomTarget_get_workdir,postprocess/registry)/fcfg_langpack_%.list : ...@@ -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_CustomTarget_get_workdir,postprocess/registry)/registry_%.list :
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),AWK,2) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),AWK,2)
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
find $(call gb_XcuResTarget_get_target,registry/$*/)\ $(FIND) $(call gb_XcuResTarget_get_target,registry/$*/) \
$(if $(filter DBCONNECTIVITY,$(BUILD_TYPE)),\ $(if $(filter DBCONNECTIVITY,$(BUILD_TYPE)),\
$(foreach driver,$(postprocess_DRIVERS),\ $(foreach driver,$(postprocess_DRIVERS),\
$(call gb_XcuResTarget_get_target,$(driver)/$*/)))\ $(call gb_XcuResTarget_get_target,$(driver)/$*/)))\
......
...@@ -29,6 +29,6 @@ $(call gb_CustomTarget_get_workdir,pyuno/zipcore)/$(pyuno_PYTHON_ARCHIVE_NAME) \ ...@@ -29,6 +29,6 @@ $(call gb_CustomTarget_get_workdir,pyuno/zipcore)/$(pyuno_PYTHON_ARCHIVE_NAME) \
: $(call gb_ExternalPackage_get_target,python3) \ : $(call gb_ExternalPackage_get_target,python3) \
| $(call gb_CustomTarget_get_workdir,pyuno/zipcore)/.dir | $(call gb_CustomTarget_get_workdir,pyuno/zipcore)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ZIP,1) $(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: # vim: set noet sw=4 ts=4:
...@@ -33,7 +33,7 @@ $(call gb_Helper_abbreviate_dirs,\ ...@@ -33,7 +33,7 @@ $(call gb_Helper_abbreviate_dirs,\
rm -rf $(foreach pair,$(PACKAGE_DIRS),$(call gb_GeneratedPackage__get_destdir,$(pair))) && \ rm -rf $(foreach pair,$(PACKAGE_DIRS),$(call gb_GeneratedPackage__get_destdir,$(pair))) && \
$(foreach pair,$(PACKAGE_DIRS),\ $(foreach pair,$(PACKAGE_DIRS),\
$(call gb_GeneratedPackage__command_cp,$(call gb_GeneratedPackage__get_srcdir,$(pair)),$(call gb_GeneratedPackage__get_destdir,$(pair))) &&) \ $(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))) \ $(foreach pair,$(PACKAGE_DIRS),$(call gb_GeneratedPackage__get_destdir,$(pair))) \
\( -type f -o -type l \) -print \ \( -type f -o -type l \) -print \
> $(1) \ > $(1) \
......
...@@ -202,7 +202,7 @@ $(WORKDIR)/pot.done : $(foreach exec,cfgex helpex localize transex3 \ ...@@ -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_Output_announce,$(subst .pot,,$(subst $(WORKDIR)/,,$@)),$(true),POT,1)
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && $(call gb_Helper_execute,localize) $(SRCDIR) $(dir $@)/pot \ 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 $@) && touch $@)
# enable if: no "-MODULE/" defined AND ["all" defined OR "MODULE/" defined] # enable if: no "-MODULE/" defined AND ["all" defined OR "MODULE/" defined]
......
...@@ -224,7 +224,7 @@ gb_ICU_PRECOMMAND := $(call gb_Helper_extend_ld_path,$(WORKDIR_FOR_BUILD)/Unpack ...@@ -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 # Mac OS X sort(1) cannot read a response file
define gb_UIConfig__command define gb_UIConfig__command
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
sort -u $(UI_IMAGELISTS) /dev/null > $@ \ $(SORT) -u $(UI_IMAGELISTS) /dev/null > $@ \
) )
endef endef
......
...@@ -578,7 +578,7 @@ define gb_UIConfig__command ...@@ -578,7 +578,7 @@ define gb_UIConfig__command
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,$(if $(UI_IMAGELISTS),$(strip $(UI_IMAGELISTS)),/dev/null)) \ RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,$(if $(UI_IMAGELISTS),$(strip $(UI_IMAGELISTS)),/dev/null)) \
&& tr " " "\000" < $$RESPONSEFILE | tr -d "\r\n" > $$RESPONSEFILE.0 \ && 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 \ && rm $$RESPONSEFILE $$RESPONSEFILE.0 \
) )
......
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