diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2022-12-10 15:57:36 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2022-12-13 15:05:43 +0000 |
commit | 8b87e29c987c599058a70f6a2e0259a2a4100f04 (patch) | |
tree | a364c609609dffed68147983e8ac81af538cf25d /postprocess | |
parent | dad5becaca9e5ee97a0cfbf3336461d752d6064c (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 'postprocess')
-rw-r--r-- | postprocess/CustomTarget_components.mk | 9 | ||||
-rw-r--r-- | postprocess/CustomTarget_registry.mk | 5 |
2 files changed, 5 insertions, 9 deletions
diff --git a/postprocess/CustomTarget_components.mk b/postprocess/CustomTarget_components.mk index e193d2ce37c5..67969396fe3d 100644 --- a/postprocess/CustomTarget_components.mk +++ b/postprocess/CustomTarget_components.mk @@ -29,18 +29,15 @@ $(postprocess_WORKDIR)/services_componentfiles.list: \ $(foreach comp,$(gb_ComponentTarget__ALLCOMPONENTS),$(call gb_ComponentTarget_get_target,$(comp))) \ | $(postprocess_WORKDIR)/.dir $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,2) - TEMPFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)), \ - $(foreach comp,$(sort $(gb_ComponentTarget__ALLCOMPONENTS)),$(call gb_ComponentTarget_get_target,$(comp))$(gb_NEWLINE))) && \ - mv $$TEMPFILE $@ + $(file >$@,$(foreach comp,$(sort $(gb_ComponentTarget__ALLCOMPONENTS)),$(call gb_ComponentTarget_get_target,$(comp))$(gb_NEWLINE))) $(postprocess_WORKDIR)/services_constructors.list: \ $(SRCDIR)/solenv/bin/constructors.py \ $(postprocess_WORKDIR)/services_componentfiles.list \ | $(postprocess_WORKDIR)/.dir $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,2) - TEMPFILE=$(shell $(gb_MKTEMP)) && \ - $(call gb_Helper_abbreviate_dirs,$(call gb_ExternalExecutable_get_command,python) $^) > $$TEMPFILE && \ - $(call gb_Helper_replace_if_different_and_touch,$${TEMPFILE},$@) + $(call gb_Helper_abbreviate_dirs,$(call gb_ExternalExecutable_get_command,python) $^) > $@.tmp && \ + $(call gb_Helper_replace_if_different_and_touch,$@.tmp,$@) .PHONY: $(postprocess_WORKDIR)/services_componentfiles.list diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk index b97a7932b15d..66b205f9771c 100644 --- a/postprocess/CustomTarget_registry.mk +++ b/postprocess/CustomTarget_registry.mk @@ -652,10 +652,9 @@ $(call gb_CustomTarget_get_workdir,postprocess/registry)/registry_%.list : $(call gb_CustomTarget_get_workdir,postprocess/registry)/%.list : $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,2) $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) - mv $(call gb_var2file,$@.tmp,<list> $(foreach i,$(postprocess_DEPS_$*), <dependency file='$i'/>) \ + $(file >$@,<list> $(foreach i,$(postprocess_DEPS_$*), <dependency file='$i'/>) \ $(foreach i,$(postprocess_OPTDEPS_$*), <dependency file='$i' optional='true'/>) \ - $(foreach i,$(postprocess_FILES_$*), <filename>$(i)</filename>) </list>) \ - $@ + $(foreach i,$(postprocess_FILES_$*), <filename>$(i)</filename>) </list>) $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH) # vim: set noet sw=4 ts=4: |