summaryrefslogtreecommitdiff
path: root/solenv/gbuild/LinkTarget.mk
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2022-12-10 15:57:36 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2022-12-13 15:05:43 +0000
commit8b87e29c987c599058a70f6a2e0259a2a4100f04 (patch)
treea364c609609dffed68147983e8ac81af538cf25d /solenv/gbuild/LinkTarget.mk
parentdad5becaca9e5ee97a0cfbf3336461d752d6064c (diff)
use $(file …) directly instead of gb_var2file when not used as intermediate
i.e. when the temporary file is not uses as a responsefile for another command, but instead the point of running gb_var2file is to have that file as a result in the end. also move the helper into the main gbuild.mk and remove Tempfile.mk Change-Id: I79382bef5d7e8a155ba6a8e0750c6a17da42eb37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143912 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'solenv/gbuild/LinkTarget.mk')
-rw-r--r--solenv/gbuild/LinkTarget.mk12
1 files changed, 5 insertions, 7 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 6634649e5ade..880d13795b87 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -805,7 +805,7 @@ endef
# call gb_LinkTarget__command_objectlist,linktarget
define gb_LinkTarget__command_objectlist
-TEMPFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),\
+$(file >$(1),\
$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
$(foreach object,$(OBJCOBJECTS),$(call gb_ObjCObject_get_target,$(object))) \
@@ -819,8 +819,7 @@ TEMPFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),\
$(foreach object,$(GENNASMOBJECTS),$(call gb_GenNasmObject_get_target,$(object))) \
$(foreach object,$(GENCXXCLROBJECTS),$(call gb_GenCxxClrObject_get_target,$(object))) \
$(PCHOBJS) \
- $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),$(shell cat $(extraobjectlist)))) && \
-mv $${TEMPFILE} $(1)
+ $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),$(shell cat $(extraobjectlist))))
endef
@@ -893,10 +892,9 @@ define gb_LinkTarget__static_dep_x_template
define gb_LinkTarget__command_dep_$(1)
$$(call gb_Output_announce,LNK:$$(2).d.$(1),$$(true),DEP,1)
-mkdir -p $$(dir $$(1)) && \
-TEMPFILE=$$(call gb_var2file,$$(shell $$(gb_MKTEMP)),\
- $$(call gb_LinkTarget__get_all_$(1),$$(2))) && \
- $$(call gb_Helper_replace_if_different_and_touch,$$$${TEMPFILE},$$(1))
+$$(shell mkdir -p $$(dir $$(1)))
+$$(file >$$(1).tmp,$$(call gb_LinkTarget__get_all_$(1),$$(2)))
+$$(call gb_Helper_replace_if_different_and_touch,$$(1).tmp,$$(1))
endef