diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-10-29 23:30:04 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-10-29 23:38:46 +0100 |
commit | 1f62a036155b7559703c08fcbc8204498ed7343c (patch) | |
tree | 1ac1c07947be9cebdc28af3272443b71917f95fe /solenv/gbuild | |
parent | 3f0f07c748375ec9165ea3a3d1751f84d3528972 (diff) |
gbuild: remove .a file before AR invocations:
Solves 2 problems:
1. it can happen that AR decides not to write to the .a file at all,
because no input file is newer than the archive content; then the
timestamp of the .a file does not get updated
2. if an object file is removed from the makefile the .a file would
still contain it after an incremental build
Change-Id: I30737c6454dc06c89ccf233e06d430d2ddc5bc33
Diffstat (limited to 'solenv/gbuild')
-rw-r--r-- | solenv/gbuild/platform/IOS_ARM_GCC.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/platform/WNT_INTEL_GCC.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/platform/macosx.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/platform/solaris.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 1 |
5 files changed, 5 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk index 9f2f54eef55b..5ef325b896f8 100644 --- a/solenv/gbuild/platform/IOS_ARM_GCC.mk +++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk @@ -169,6 +169,7 @@ endef define gb_LinkTarget__command_staticlink $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $(1)) && \ + rm -f $(1) && \ $(gb_AR) -rsu $(1) \ $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk index ae1e7857b0c6..c54a71097220 100644 --- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk +++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk @@ -167,6 +167,7 @@ endef define gb_LinkTarget__command_staticlinklibrary $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $(1)) && \ + rm -f $(1) && \ $(gb_AR) -rsu $(1) \ $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index 59f6c5639e7b..f6a75b6d8c96 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -219,6 +219,7 @@ endef define gb_LinkTarget__command_staticlink $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $(1)) && \ + rm -f $(1) && \ $(gb_AR) -rsu $(1) \ $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk index 31e8e05b7a19..52c7a0f49b09 100644 --- a/solenv/gbuild/platform/solaris.mk +++ b/solenv/gbuild/platform/solaris.mk @@ -204,6 +204,7 @@ endef define gb_LinkTarget__command_staticlink $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $(1)) && \ + rm -f $(1) && \ $(gb_AR) -rsu $(1) \ $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 843ec1813fdf..87e57a8a556e 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -209,6 +209,7 @@ endef define gb_LinkTarget__command_staticlink $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $(1)) && \ + rm -f $(1) && \ $(gb_AR) -rsu $(1) \ $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ |