summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2017-11-04 09:45:55 (GMT)
committerTony Theodore <tonyt@logyst.com>2017-11-18 05:19:55 (GMT)
commit51217e01d2c855de3994775e9c3e72c7c83f11eb (patch)
treeed304a1fbf081f3f0af9f739b4ae2c44a942dd59 /Makefile
parentcc1d4632b8165c214f5fbc01d20b1455a51933e3 (diff)
downloadmxe-51217e01d2c855de3994775e9c3e72c7c83f11eb.zip
mxe-51217e01d2c855de3994775e9c3e72c7c83f11eb.tar.gz
mxe-51217e01d2c855de3994775e9c3e72c7c83f11eb.tar.bz2
updates: move to separate file and add generic updater function
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile48
1 files changed, 2 insertions, 46 deletions
diff --git a/Makefile b/Makefile
index 5a2dd77..35bcc84 100644
--- a/Makefile
+++ b/Makefile
@@ -784,50 +784,6 @@ clean-pkg:
clean-junk: clean-pkg
rm -rf $(LOG_DIR) $(call TMP_DIR,*)
-COMPARE_VERSIONS = $(strip \
- $(if $($(1)_BRANCH),$(call seq,$($(1)_VERSION),$(2)),\
- $(filter $(2),$(shell printf '$($(1)_VERSION)\n$(2)' | $(SORT) -V | head -1))))
-
-.PHONY: update
-define UPDATE
- $(if $(2),
- $(if $(filter $($(1)_IGNORE),$(2)),
- $(info IGNORED $(1) $(2)),
- $(if $(COMPARE_VERSIONS),
- $(if $(filter $(2),$($(1)_VERSION)),
- $(info . $(1) $(2)),
- $(info OLD $(1) $($(1)_VERSION) --> $(2) ignoring)),
- $(info NEW $(1) $($(1)_VERSION) --> $(2))
- $(if $(findstring undefined, $(origin UPDATE_DRYRUN)),
- $(SED) -i 's/^\([^ ]*_VERSION *:=\).*/\1 $(2)/' '$($(1)_MAKEFILE)'
- $(MAKE) -f '$(MAKEFILE)' 'update-checksum-$(1)' \
- || { $(SED) -i 's/^\([^ ]*_VERSION *:=\).*/\1 $($(1)_VERSION)/' '$($(1)_MAKEFILE)'; \
- exit 1; }))),
- $(info Unable to update version number of package $(1) \
- $(newline)$(newline)$($(1)_UPDATE)$(newline)))
-
-endef
-update:
- $(foreach PKG,$(PKGS),\
- $(and $($(PKG)_UPDATE),$(call UPDATE,$(PKG),$(shell $($(PKG)_UPDATE)))))
-
-update-package-%:
- $(if $(call set_is_member,$*,$(PKGS)), \
- $(and $($*_UPDATE),$(call UPDATE,$*,$(shell $($*_UPDATE)))), \
- $(error Package $* not found))
- @echo -n
-
-check-update-package-%: UPDATE_DRYRUN = true
-check-update-package-%: update-package-% ;
-
-update-checksum-%: MXE_NO_BACKUP_DL = true
-update-checksum-%: SKIP_CHECHSUM = true
-update-checksum-%:
- $(if $(call set_is_member,$*,$(PKGS)), \
- $(call DOWNLOAD_PKG_ARCHIVE,$*) && \
- $(SED) -i 's/^\([^ ]*_CHECKSUM *:=\).*/\1 '"`$(call PKG_CHECKSUM,$*)`"'/' '$($*_MAKEFILE)', \
- $(error Package $* not found))
-
.PHONY: cleanup-style
define CLEANUP_STYLE
@$(SED) ' \
@@ -965,6 +921,6 @@ docs/packages.json: $(foreach 1,$(PKGS),$(PKG_MAKEFILES))
@echo ' "": null' >> $@
@echo '}' >> $@
-# for patch-tool-mxe
-
+# for other mxe functions
include patch.mk
+include updates.mk