summaryrefslogtreecommitdiffstats
path: root/github.mk
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2017-03-21 04:54:55 (GMT)
committerTony Theodore <tonyt@logyst.com>2017-03-21 04:59:32 (GMT)
commit6b40c10316fd1fa5cd46442a24e8bff86bc0b8f9 (patch)
tree4dc38734dc8592892fe214b73fc56c2873a385a4 /github.mk
parent0c2c6122ffded475d31c8057640751f4903b9aa3 (diff)
downloadmxe-6b40c10316fd1fa5cd46442a24e8bff86bc0b8f9.zip
mxe-6b40c10316fd1fa5cd46442a24e8bff86bc0b8f9.tar.gz
mxe-6b40c10316fd1fa5cd46442a24e8bff86bc0b8f9.tar.bz2
github: add check-gh-conf targets to verify updates and downloads
Diffstat (limited to 'github.mk')
-rw-r--r--github.mk21
1 files changed, 21 insertions, 0 deletions
diff --git a/github.mk b/github.mk
index 8e6409c..f6aef36 100644
--- a/github.mk
+++ b/github.mk
@@ -114,3 +114,24 @@ define MXE_GET_GH_TAG
| $(SORT) -V
| tail -1
endef
+
+GITHUB_PKGS = $(patsubst %_GH_CONF,%,$(filter %_GH_CONF,$(.VARIABLES)))
+
+# check-gh-conf : test updates and source directory
+# check-gh-conf-dl: removes downloads and tests above
+
+# a test of many package updates may hit rate limit of 60/hr
+# https://developer.github.com/v3/#rate-limiting
+
+.PHONY: check-gh-conf check-gh-conf-%
+check-gh-conf-dl: REMOVE_DOWNLOAD = true
+check-gh-conf-dl: MXE_NO_BACKUP_DL = true
+check-gh-conf-dl: check-gh-conf
+check-gh-conf-pkg-%: check-update-package-% download-only-%
+ @$(PRINTF_FMT) '[prep-src]' '$(*)' | $(RTRIM)
+ @($(MAKE) -f '$(MAKEFILE)' 'prepare-pkg-source-$(*)') > /dev/null
+ @rm -rf '$(call TMP_DIR,$(*))'
+
+# secondexpansion here since this file is included before pkg makefiles
+.SECONDEXPANSION:
+check-gh-conf: $$(addprefix check-gh-conf-pkg-,$$(GITHUB_PKGS))