summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-01-06 16:05:34 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-01-06 17:30:26 +0100
commit0bb6bb7729f159f05100e33797ed667fd9d13ab7 (patch)
treef7e7997ec7f0f2347d08f93696bffdfe3e24565f /odk
parent0ab8ae4d98122f7de50365a062675d001ef0ca6a (diff)
Avoid $(shell $(gb_MKTEMP))
...which, when included in a ifneq ($(MACOSX_SHELL_HACK),) block, appears to be executed every time the surrounding odk_build-examples_test macro is evaluated, even in builds (like a Linux build) where MACOSX_SHELL_HACK is empty. (And which thus caused spurious empty gbuild.* files to be left behind in the tmp dir by such builds.) Change-Id: I8ef0204817f089cd977340a0ce3b6a17a347b209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86279 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'odk')
-rw-r--r--odk/build-examples_common.mk17
1 files changed, 7 insertions, 10 deletions
diff --git a/odk/build-examples_common.mk b/odk/build-examples_common.mk
index 23c552efd177..abcb3a3e2593 100644
--- a/odk/build-examples_common.mk
+++ b/odk/build-examples_common.mk
@@ -35,11 +35,10 @@ ifneq ($(gb_SUPPRESS_TESTS),)
else
$$(call gb_Output_announce,$(subst $(WORKDIR)/,,$(1)),$(true),CHK,1)
rm -fr $(call gb_CustomTarget_get_workdir,$(1))/{out,user}
-ifneq ($(MACOSX_SHELL_HACK),)
- $(eval ODK_BUILD_SHELL := $(shell $(gb_MKTEMP)))
- cp /bin/sh "$(ODK_BUILD_SHELL)"
- chmod 0700 "$(ODK_BUILD_SHELL)"
-endif
+ $(if $(MACOSX_SHELL_HACK), \
+ ODK_BUILD_SHELL=$$$$($(gb_MKTEMP)) && \
+ cp /bin/sh "$$$$ODK_BUILD_SHELL" && \
+ chmod 0700 "$$$$ODK_BUILD_SHELL" &&) \
(saved_library_path=$$$${$(gb_Helper_LIBRARY_PATH_VAR)} && . $$< \
$(if $(filter MACOSX,$(OS)),, \
&& $(gb_Helper_LIBRARY_PATH_VAR)=$$$$saved_library_path) \
@@ -49,15 +48,13 @@ endif
&& (cd $(INSTDIR)/$(SDKDIRNAME)/examples/$(my_dir) \
&& printf 'yes\n' | LC_ALL=C make \
CC="$(CXX)" LINK="$(CXX)" LIB="$(CXX)" \
- $(if $(MACOSX_SHELL_HACK), SHELL=$(ODK_BUILD_SHELL), )))) \
+ $(if $(MACOSX_SHELL_HACK), SHELL="$$$$ODK_BUILD_SHELL", ))) \
+ $(if $(MACOSX_SHELL_HACK),&& rm -f "$$$$ODK_BUILD_SHELL")) \
>$(call gb_CustomTarget_get_workdir,$(1))/log 2>&1 \
|| (RET=$$$$? \
- $(if $(MACOSX_SHELL_HACK), && rm -f $(ODK_BUILD_SHELL) , ) \
+ $(if $(MACOSX_SHELL_HACK), && rm -f "$$$$ODK_BUILD_SHELL" , ) \
&& cat $(call gb_CustomTarget_get_workdir,$(1))/log \
&& exit $$$$RET)
-ifneq ($(MACOSX_SHELL_HACK),)
- -rm -f $(ODK_BUILD_SHELL)
-endif
endif
$(call gb_CustomTarget_get_workdir,$(1))/setsdkenv: \