summaryrefslogtreecommitdiff
path: root/solenv/gbuild/platform
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-02-24 12:02:33 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-02-25 08:58:15 +0100
commit9d17966632a8e756c26b6569ff5e282a719a1ac1 (patch)
treec43e6831c97842cca369a46ed7c2748f2a5fdbf8 /solenv/gbuild/platform
parent8491c5c4f1a4e01796dab8ce41904cf6593bd038 (diff)
gbuild: deduplicate by new gb_Helper_replace_if_different_and_touch
Change-Id: I98767944a74c2b6d90425e0232c40e20c8a6885a
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