summaryrefslogtreecommitdiffstats
path: root/make/include
diff options
context:
space:
mode:
authorKonaBlend <[email protected]>2015-10-27 20:53:42 -0400
committerBradley Sepos <[email protected]>2016-05-25 15:45:04 -0400
commitc9113cb0776dadb2978210c37945e403cd8a2d74 (patch)
tree57e9809002170d8d5a21b6a0678887efb073f440 /make/include
parent24d3dc934dbc4ec979c6376d3ed4f07607ba7bcd (diff)
Build: add target: contrib.verify
New target sits between extract and fetch. Thus every build ensures that exach tarball is not corrupt before extract.
Diffstat (limited to 'make/include')
-rw-r--r--make/include/contrib.defs29
1 files changed, 27 insertions, 2 deletions
diff --git a/make/include/contrib.defs b/make/include/contrib.defs
index 040a416e0..f48b57074 100644
--- a/make/include/contrib.defs
+++ b/make/include/contrib.defs
@@ -34,6 +34,15 @@ define import.CONTRIB.defs
endef
##
+ ## target: verify
+ ##
+ $(1).VERIFY.target = $$($(1).build/).stamp.verify
+ define $(1).VERIFY
+ $$(FETCH.exe) --config $(BUILD/)fetch.cfg --output-dir $$(dir $$($(1).FETCH.tar)) $$(if $$($(1).FETCH.md5),--md5 $$($(1).FETCH.md5)) $$($(1).FETCH.url)
+ $$(TOUCH.exe) $$@
+ endef
+
+ ##
## target: extract
##
$(1).EXTRACT.tarbase = $$(strip $$(foreach x,tar.bz2 tar.gz,$$(patsubst %.$$(x),%,$$(filter %.$$(x),$$(notdir $$($(1).FETCH.url))))))
@@ -213,7 +222,22 @@ define import.CONTRIB.rules
$($(1).name).fetch: $$($(1).FETCH.target)
$$($(1).FETCH.target): | $$(dir $$($(1).FETCH.target))
- $$($(1).FETCH)
+ @$$($(1).FETCH)
+
+##
+## target: verify
+##
+$($(1).name).verify: $$($(1).VERIFY.target)
+
+$$($(1).VERIFY.target): | $$(dir $$($(1).VERIFY.target))
+$$($(1).VERIFY.target): $$($(1).FETCH.target)
+ @$$($(1).VERIFY)
+
+$($(1).name).verify.touch:
+ $$(TOUCH.exe) $$($(1).VERIFY.target)
+
+$($(1).name).verify.untouch:
+ $$(RM.exe) -f $$($(1).VERIFY.target)
##
## target: extract
@@ -222,7 +246,7 @@ $$($(1).FETCH.target): | $$(dir $$($(1).FETCH.target))
$($(1).name).extract: $$($(1).EXTRACT.target)
$$($(1).EXTRACT.target): | $$(dir $$($(1).EXTRACT.target))
-$$($(1).EXTRACT.target): $$($(1).FETCH.target)
+$$($(1).EXTRACT.target): $$($(1).VERIFY.target)
$$($(1).EXTRACT)
$($(1).name).extract.touch:
@@ -320,6 +344,7 @@ $($(1).name): $($(1).name).build
## participate with global convenience targets
##
contrib.fetch: $($(1).name).fetch
+contrib.verify: $($(1).name).verify
contrib.extract: $($(1).name).extract
contrib.patch: $($(1).name).patch
contrib.configure: $($(1).name).configure