diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-06-09 12:15:36 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-06-09 12:34:31 +0200 |
commit | 7ea6e5412d067001da4ab5a45aeb0ce8d58cdbad (patch) | |
tree | fbf60488b86932fd3cbd6917f0d3967a9a28b7b7 | |
parent | rebuild filter config. after makefile change (diff) | |
download | core-7ea6e5412d067001da4ab5a45aeb0ce8d58cdbad.tar.gz core-7ea6e5412d067001da4ab5a45aeb0ce8d58cdbad.zip |
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
-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)),\ |