summaryrefslogtreecommitdiff
path: root/solenv/gbuild/platform
diff options
context:
space:
mode:
Diffstat (limited to 'solenv/gbuild/platform')
-rw-r--r--solenv/gbuild/platform/com_MSC_class.mk6
-rw-r--r--solenv/gbuild/platform/macosx.mk7
-rw-r--r--solenv/gbuild/platform/solaris.mk7
-rw-r--r--solenv/gbuild/platform/unxgcc.mk7
4 files changed, 7 insertions, 20 deletions
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index e0fa5b554f32..6a77d207f41b 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -189,11 +189,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(if $(filter YES,$(LIBRARY_X64)),$(LINK_X64_BINARY),$(gb_LINK)) \
-dump -exports $(ILIBTARGET) \
>> $(WORKDIR)/LinkTarget/$(2).exports.tmp && \
- if cmp -s $(WORKDIR)/LinkTarget/$(2).exports.tmp $(WORKDIR)/LinkTarget/$(2).exports; \
- then rm $(WORKDIR)/LinkTarget/$(2).exports.tmp; \
- else mv $(WORKDIR)/LinkTarget/$(2).exports.tmp $(WORKDIR)/LinkTarget/$(2).exports && \
- touch -r $(1) $(WORKDIR)/LinkTarget/$(2).exports; \
- fi) \
+ $(call gb_Helper_replace_if_different_and_touch,$(WORKDIR)/LinkTarget/$(2).exports.tmp,$(WORKDIR)/LinkTarget/$(2).exports,$(1)) \
; exit $$RC)
endef
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 96624b8edb81..5eac8ba43114 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -158,11 +158,8 @@ $(call gb_Helper_abbreviate_dirs,\
> $(WORKDIR)/LinkTarget/$(2).exports.tmp && \
$(NM) -g -P $(1) | cut -d' ' -f1-2 | grep -v U$$ \
>> $(WORKDIR)/LinkTarget/$(2).exports.tmp && \
- if cmp -s $(WORKDIR)/LinkTarget/$(2).exports.tmp $(WORKDIR)/LinkTarget/$(2).exports; \
- then rm $(WORKDIR)/LinkTarget/$(2).exports.tmp; \
- else mv $(WORKDIR)/LinkTarget/$(2).exports.tmp $(WORKDIR)/LinkTarget/$(2).exports && \
- touch -r $(1) $(WORKDIR)/LinkTarget/$(2).exports; \
- fi &&) \
+ $(call gb_Helper_replace_if_different_and_touch,$(WORKDIR)/LinkTarget/$(2).exports.tmp, \
+ $(WORKDIR)/LinkTarget/$(2).exports,$(1)) &&) \
:)
endef
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 7f1ce40018d5..61221906dc3b 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -186,11 +186,8 @@ $(call gb_Helper_abbreviate_dirs,\
$(NM) --dynamic --extern-only --defined-only --format=posix $(1) \
| cut -d' ' -f1-2 \
>> $(WORKDIR)/LinkTarget/$(2).exports.tmp && \
- if cmp -s $(WORKDIR)/LinkTarget/$(2).exports.tmp $(WORKDIR)/LinkTarget/$(2).exports; \
- then rm $(WORKDIR)/LinkTarget/$(2).exports.tmp; \
- else mv $(WORKDIR)/LinkTarget/$(2).exports.tmp $(WORKDIR)/LinkTarget/$(2).exports && \
- touch -r $(1) $(WORKDIR)/LinkTarget/$(2).exports; \
- fi))
+ $(call gb_Helper_replace_if_different_and_touch,$(WORKDIR)/LinkTarget/$(2).exports.tmp, \
+ $(WORKDIR)/LinkTarget/$(2).exports,$(1))))
endef
define gb_LinkTarget__command_staticlink
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 86be4061ae7a..17a6a033c017 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -187,11 +187,8 @@ $(call gb_Helper_abbreviate_dirs,\
$(NM) --dynamic --extern-only --defined-only --format=posix $(1) \
| cut -d' ' -f1-2 \
>> $(WORKDIR)/LinkTarget/$(2).exports.tmp && \
- if cmp -s $(WORKDIR)/LinkTarget/$(2).exports.tmp $(WORKDIR)/LinkTarget/$(2).exports; \
- then rm $(WORKDIR)/LinkTarget/$(2).exports.tmp; \
- else mv $(WORKDIR)/LinkTarget/$(2).exports.tmp $(WORKDIR)/LinkTarget/$(2).exports && \
- touch -r $(1) $(WORKDIR)/LinkTarget/$(2).exports; \
- fi))
+ $(call gb_Helper_replace_if_different_and_touch,$(WORKDIR)/LinkTarget/$(2).exports.tmp, \
+ $(WORKDIR)/LinkTarget/$(2).exports,$(1))))
endef
define gb_LinkTarget__command_staticlink