diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-06-09 12:15:36 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-06-12 13:55:43 +0200 |
commit | 2804c1d71fe8134c855d65daf1d7f9b0ea501e4b (patch) | |
tree | 88d07a06f4663db24fed8517152e15aad7fed131 /solenv | |
parent | 276fb59ee66806709382d0eeef20f62a094a5995 (diff) |
gbuild: avoid leaving invalid .d files behind if build interrupted
The LinkTarget command builds the LinkTarget's dep-file as well as an
optimization so the next make does not restart; in this case the
dep-file is not the target so it will not be deleted by make in case the
build is interrupted, and the next make can choke on the partially
written .d file.
Change-Id: I13b1884f1a974b7ce10b00e1df1d0f30222f4790
(cherry picked from commit 7ea6e5412d067001da4ab5a45aeb0ce8d58cdbad)
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 773aa3f60ca5..6f51b42c9a13 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -457,7 +457,8 @@ endef define gb_LinkTarget__command_impl $(if $(gb_FULLDEPS),\ $(if $(findstring concat-deps,$(2)),,\ - $(call gb_LinkTarget__command_dep,$(call gb_LinkTarget_get_dep_target,$(2)),$(2)))) + $(call gb_LinkTarget__command_dep,$(call gb_LinkTarget_get_dep_target,$(2)).tmp,$(2)) \ + mv $(call gb_LinkTarget_get_dep_target,$(2)).tmp $(call gb_LinkTarget_get_dep_target,$(2)))) $(if $(filter $(2),$(foreach lib,$(gb_MERGEDLIBS) $(gb_URELIBS),$(call gb_Library__get_workdir_linktargetname,$(lib)))),\ $(if $(filter $(true),$(call gb_LinkTarget__is_build_lib,$(2))),\ $(call gb_LinkTarget__command,$(1),$(2)),\ |