Index: install_wx.make =================================================================== --- install_wx.make (revision 6227) +++ install_wx.make (working copy) @@ -55,6 +55,36 @@ $(wx_archive)-url := ftp://ftp.wxwidgets.org/pub/$(wx_version)/$(wx_archive) +# If wx_commit_sha is defined on make command line, it overrides wx_version and +# the commit with this SHA is retrieved from github. Otherwise the official +# release wx_version (which can also be overridden on make command line) is +# downloaded. + +ifneq ($(wx_commit_sha),) + + ifneq "$(origin wx_md5)" "$(origin wx_commit_sha)" + $(error Please specify wx_md5 for $(wx_commit_sha) on make command line.) + endif + + wx_version := $(wx_commit_sha) + + wx_archive := wxWidgets-$(wx_commit_sha).zip + + $(wx_archive)-md5 := $(wx_md5) + + $(wx_archive)-url := https://github.com/wxWidgets/wxWidgets/archive/$(wx_commit_sha).zip +endif + + +foo: + @echo wx_commit_sha $(wx_commit_sha) + @echo wx_md5 $(wx_md5) + @echo wx_version $(wx_version) + @echo wx_archive $(wx_archive) + @echo $(wx_archive)-md5 $($(wx_archive)-md5) + @echo $(wx_archive)-url $($(wx_archive)-url) + + # Variables that normally should be left alone ################################# mingw_bin_dir := $(mingw_dir)/bin @@ -119,6 +149,7 @@ PATCH := patch RM := rm TAR := tar +UNZIP := unzip WGET := wget # Targets ###################################################################### @@ -154,6 +185,12 @@ cd $(cache_dir) && $(ECHO) "$(address@hidden) *$@" | $(MD5SUM) --check -$(TAR) --extract $(TARFLAGS) --directory=$(wx_dir) --file=$(cache_dir)/$@ +.PHONY: %.zip +%.zip: + cd $(cache_dir) && [ -e $@ ] || $(WGET) $(WGETFLAGS) --output-document=$@ $(address@hidden) + cd $(cache_dir) && $(ECHO) "$(address@hidden) *$@" | $(MD5SUM) --check + -$(UNZIP) $(cache_dir)/$@ -d $(wx_dir) + .PHONY: wx wx: ../configure $(config_options) && $(MAKE) && $(MAKE) install