[Libreoffice-commits] core.git: i18npool/CustomTarget_localedata.mk solenv/gbuild
Stephan Bergmann
sbergman at redhat.com
Mon Nov 2 01:50:32 PST 2015
i18npool/CustomTarget_localedata.mk | 8 ++++----
solenv/gbuild/Helper.mk | 8 +++++++-
2 files changed, 11 insertions(+), 5 deletions(-)
New commits:
commit 4e4ea4bc733dc62e6c06eb42574ea0c5b0e5b826
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Nov 2 10:47:28 2015 +0100
Improve gb_Helper_print_on_error, and use in a CustomTarget
* always wrap the sub-command in ( ... )
* if no 2nd arg is given, use a temp file
Change-Id: I7b43214dda1e4f8ee5e9b9a7310d58adee2a6500
diff --git a/i18npool/CustomTarget_localedata.mk b/i18npool/CustomTarget_localedata.mk
index 481b3ee..c03bbbc 100644
--- a/i18npool/CustomTarget_localedata.mk
+++ b/i18npool/CustomTarget_localedata.mk
@@ -21,10 +21,10 @@ $(call gb_CustomTarget_get_workdir,i18npool/localedata)/localedata_$(1).cxx : \
$(call gb_Executable_get_runtime_dependencies,saxparser)
$$(call gb_Output_announce,$$(subst $(WORKDIR)/,,$$@),$(true),SAX,1)
$$(call gb_Helper_abbreviate_dirs, \
- $$(call gb_Helper_execute,saxparser) $(1) $$< $$@.tmp \
- -env:LO_LIB_DIR=$(call gb_Helper_make_url,$(INSTROOT_FOR_BUILD)/$(LIBO_LIB_FOLDER)) \
- -env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target_for_build,saxparser)) \
- $(if $(findstring s,$(MAKEFLAGS)),> /dev/null 2>&1) && \
+ $$(call gb_Helper_print_on_error, \
+ $$(call gb_Helper_execute,saxparser) $(1) $$< $$@.tmp \
+ -env:LO_LIB_DIR=$(call gb_Helper_make_url,$(INSTROOT_FOR_BUILD)/$(LIBO_LIB_FOLDER)) \
+ -env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target_for_build,saxparser))) && \
sed 's/\(^.*get[^;]*$$$$\)/SAL_DLLPUBLIC_EXPORT \1/' $$@.tmp > $$@ && \
rm $$@.tmp)
diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk
index bdc8e30..da6a9af 100644
--- a/solenv/gbuild/Helper.mk
+++ b/solenv/gbuild/Helper.mk
@@ -286,7 +286,13 @@ $(if $(filter $(1),$(BUILD_TYPE_FOR_HOST)),$(2))
endef
define gb_Helper_print_on_error
-$(if $(gb_QUIET_EXTERNAL),( $(1) ) > $(2) 2>&1 || ( cat $(2) && false ),$(1) )
+$(if $(gb_QUIET_EXTERNAL), \
+ $(if $(2), \
+ ( ( $(1) ) > $(2) 2>&1 || ( cat $(2) && false ) ), \
+ ( TEMPFILE=$(shell $(gb_MKTEMP)) && ( $(1) ) > $$TEMPFILE 2>&1 \
+ && rm $$TEMPFILE \
+ || ( cat $$TEMPFILE && rm $$TEMPFILE && false ) )), \
+ ( $(1) ))
endef
# vim: set noet sw=4 ts=4:
More information about the Libreoffice-commits
mailing list